openshiftclusters

package
v0.20240212.1141705 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/openshiftclusters Documentation

The openshiftclusters SDK allows for interaction with the Azure Resource Manager Service redhatopenshift (API Version 2023-09-04).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/openshiftclusters"

Client Initialization

client := openshiftclusters.NewOpenShiftClustersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: OpenShiftClustersClient.CreateOrUpdate

ctx := context.TODO()
id := openshiftclusters.NewProviderOpenShiftClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue")

payload := openshiftclusters.OpenShiftCluster{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: OpenShiftClustersClient.Delete

ctx := context.TODO()
id := openshiftclusters.NewProviderOpenShiftClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: OpenShiftClustersClient.Get

ctx := context.TODO()
id := openshiftclusters.NewProviderOpenShiftClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: OpenShiftClustersClient.List

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: OpenShiftClustersClient.ListAdminCredentials

ctx := context.TODO()
id := openshiftclusters.NewProviderOpenShiftClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue")

read, err := client.ListAdminCredentials(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: OpenShiftClustersClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: OpenShiftClustersClient.ListCredentials

ctx := context.TODO()
id := openshiftclusters.NewProviderOpenShiftClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue")

read, err := client.ListCredentials(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: OpenShiftClustersClient.Update

ctx := context.TODO()
id := openshiftclusters.NewProviderOpenShiftClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "openShiftClusterValue")

payload := openshiftclusters.OpenShiftClusterUpdate{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForEncryptionAtHost

func PossibleValuesForEncryptionAtHost() []string

func PossibleValuesForFipsValidatedModules

func PossibleValuesForFipsValidatedModules() []string

func PossibleValuesForOutboundType

func PossibleValuesForOutboundType() []string

func PossibleValuesForPreconfiguredNSG

func PossibleValuesForPreconfiguredNSG() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForVisibility

func PossibleValuesForVisibility() []string

func ValidateProviderOpenShiftClusterID

func ValidateProviderOpenShiftClusterID(input interface{}, key string) (warnings []string, errors []error)

ValidateProviderOpenShiftClusterID checks that 'input' can be parsed as a Provider Open Shift Cluster ID

Types

type APIServerProfile

type APIServerProfile struct {
	IP         *string     `json:"ip,omitempty"`
	Url        *string     `json:"url,omitempty"`
	Visibility *Visibility `json:"visibility,omitempty"`
}

type ClusterProfile

type ClusterProfile struct {
	Domain               *string               `json:"domain,omitempty"`
	FipsValidatedModules *FipsValidatedModules `json:"fipsValidatedModules,omitempty"`
	PullSecret           *string               `json:"pullSecret,omitempty"`
	ResourceGroupId      *string               `json:"resourceGroupId,omitempty"`
	Version              *string               `json:"version,omitempty"`
}

type ConsoleProfile

type ConsoleProfile struct {
	Url *string `json:"url,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OpenShiftCluster
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type EncryptionAtHost

type EncryptionAtHost string
const (
	EncryptionAtHostDisabled EncryptionAtHost = "Disabled"
	EncryptionAtHostEnabled  EncryptionAtHost = "Enabled"
)

func (*EncryptionAtHost) UnmarshalJSON

func (s *EncryptionAtHost) UnmarshalJSON(bytes []byte) error

type FipsValidatedModules

type FipsValidatedModules string
const (
	FipsValidatedModulesDisabled FipsValidatedModules = "Disabled"
	FipsValidatedModulesEnabled  FipsValidatedModules = "Enabled"
)

func (*FipsValidatedModules) UnmarshalJSON

func (s *FipsValidatedModules) UnmarshalJSON(bytes []byte) error

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OpenShiftCluster
}

type IngressProfile

type IngressProfile struct {
	IP         *string     `json:"ip,omitempty"`
	Name       *string     `json:"name,omitempty"`
	Visibility *Visibility `json:"visibility,omitempty"`
}

type ListAdminCredentialsOperationResponse

type ListAdminCredentialsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OpenShiftClusterAdminKubeconfig
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []OpenShiftCluster
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]OpenShiftCluster
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []OpenShiftCluster
}

type ListCredentialsOperationResponse

type ListCredentialsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OpenShiftClusterCredentials
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]OpenShiftCluster
}

type MasterProfile

type MasterProfile struct {
	DiskEncryptionSetId *string           `json:"diskEncryptionSetId,omitempty"`
	EncryptionAtHost    *EncryptionAtHost `json:"encryptionAtHost,omitempty"`
	SubnetId            *string           `json:"subnetId,omitempty"`
	VMSize              *string           `json:"vmSize,omitempty"`
}

type NetworkProfile

type NetworkProfile struct {
	OutboundType     *OutboundType     `json:"outboundType,omitempty"`
	PodCidr          *string           `json:"podCidr,omitempty"`
	PreconfiguredNSG *PreconfiguredNSG `json:"preconfiguredNSG,omitempty"`
	ServiceCidr      *string           `json:"serviceCidr,omitempty"`
}

type OpenShiftCluster

type OpenShiftCluster struct {
	Id         *string                     `json:"id,omitempty"`
	Location   string                      `json:"location"`
	Name       *string                     `json:"name,omitempty"`
	Properties *OpenShiftClusterProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData      `json:"systemData,omitempty"`
	Tags       *map[string]string          `json:"tags,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type OpenShiftClusterAdminKubeconfig

type OpenShiftClusterAdminKubeconfig struct {
	Kubeconfig *string `json:"kubeconfig,omitempty"`
}

type OpenShiftClusterCredentials

type OpenShiftClusterCredentials struct {
	KubeadminPassword *string `json:"kubeadminPassword,omitempty"`
	KubeadminUsername *string `json:"kubeadminUsername,omitempty"`
}

type OpenShiftClusterOperationPredicate

type OpenShiftClusterOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (OpenShiftClusterOperationPredicate) Matches

type OpenShiftClusterProperties

type OpenShiftClusterProperties struct {
	ApiserverProfile        *APIServerProfile        `json:"apiserverProfile,omitempty"`
	ClusterProfile          *ClusterProfile          `json:"clusterProfile,omitempty"`
	ConsoleProfile          *ConsoleProfile          `json:"consoleProfile,omitempty"`
	IngressProfiles         *[]IngressProfile        `json:"ingressProfiles,omitempty"`
	MasterProfile           *MasterProfile           `json:"masterProfile,omitempty"`
	NetworkProfile          *NetworkProfile          `json:"networkProfile,omitempty"`
	ProvisioningState       *ProvisioningState       `json:"provisioningState,omitempty"`
	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
	WorkerProfiles          *[]WorkerProfile         `json:"workerProfiles,omitempty"`
	WorkerProfilesStatus    *[]WorkerProfile         `json:"workerProfilesStatus,omitempty"`
}

type OpenShiftClusterUpdate

type OpenShiftClusterUpdate struct {
	Properties *OpenShiftClusterProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData      `json:"systemData,omitempty"`
	Tags       *map[string]string          `json:"tags,omitempty"`
}

type OpenShiftClustersClient

type OpenShiftClustersClient struct {
	Client *resourcemanager.Client
}

func NewOpenShiftClustersClientWithBaseURI

func NewOpenShiftClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenShiftClustersClient, error)

func (OpenShiftClustersClient) CreateOrUpdate

CreateOrUpdate ...

func (OpenShiftClustersClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (OpenShiftClustersClient) Delete

Delete ...

func (OpenShiftClustersClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (OpenShiftClustersClient) Get

Get ...

func (OpenShiftClustersClient) List

List ...

func (OpenShiftClustersClient) ListAdminCredentials

ListAdminCredentials ...

func (OpenShiftClustersClient) ListByResourceGroup

ListByResourceGroup ...

func (OpenShiftClustersClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (OpenShiftClustersClient) ListByResourceGroupCompleteMatchingPredicate

func (c OpenShiftClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate OpenShiftClusterOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (OpenShiftClustersClient) ListComplete

ListComplete retrieves all the results into a single object

func (OpenShiftClustersClient) ListCompleteMatchingPredicate

func (c OpenShiftClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate OpenShiftClusterOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (OpenShiftClustersClient) ListCredentials

ListCredentials ...

func (OpenShiftClustersClient) Update

Update ...

func (OpenShiftClustersClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type OutboundType

type OutboundType string
const (
	OutboundTypeLoadbalancer       OutboundType = "Loadbalancer"
	OutboundTypeUserDefinedRouting OutboundType = "UserDefinedRouting"
)

func (*OutboundType) UnmarshalJSON

func (s *OutboundType) UnmarshalJSON(bytes []byte) error

type PreconfiguredNSG

type PreconfiguredNSG string
const (
	PreconfiguredNSGDisabled PreconfiguredNSG = "Disabled"
	PreconfiguredNSGEnabled  PreconfiguredNSG = "Enabled"
)

func (*PreconfiguredNSG) UnmarshalJSON

func (s *PreconfiguredNSG) UnmarshalJSON(bytes []byte) error

type ProviderOpenShiftClusterId

type ProviderOpenShiftClusterId struct {
	SubscriptionId       string
	ResourceGroupName    string
	OpenShiftClusterName string
}

ProviderOpenShiftClusterId is a struct representing the Resource ID for a Provider Open Shift Cluster

func NewProviderOpenShiftClusterID

func NewProviderOpenShiftClusterID(subscriptionId string, resourceGroupName string, openShiftClusterName string) ProviderOpenShiftClusterId

NewProviderOpenShiftClusterID returns a new ProviderOpenShiftClusterId struct

func ParseProviderOpenShiftClusterID

func ParseProviderOpenShiftClusterID(input string) (*ProviderOpenShiftClusterId, error)

ParseProviderOpenShiftClusterID parses 'input' into a ProviderOpenShiftClusterId

func ParseProviderOpenShiftClusterIDInsensitively

func ParseProviderOpenShiftClusterIDInsensitively(input string) (*ProviderOpenShiftClusterId, error)

ParseProviderOpenShiftClusterIDInsensitively parses 'input' case-insensitively into a ProviderOpenShiftClusterId note: this method should only be used for API response data and not user input

func (*ProviderOpenShiftClusterId) FromParseResult

func (id *ProviderOpenShiftClusterId) FromParseResult(input resourceids.ParseResult) error

func (ProviderOpenShiftClusterId) ID

ID returns the formatted Provider Open Shift Cluster ID

func (ProviderOpenShiftClusterId) Segments

Segments returns a slice of Resource ID Segments which comprise this Provider Open Shift Cluster ID

func (ProviderOpenShiftClusterId) String

func (id ProviderOpenShiftClusterId) String() string

String returns a human-readable description of this Provider Open Shift Cluster ID

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAdminUpdating ProvisioningState = "AdminUpdating"
	ProvisioningStateCreating      ProvisioningState = "Creating"
	ProvisioningStateDeleting      ProvisioningState = "Deleting"
	ProvisioningStateFailed        ProvisioningState = "Failed"
	ProvisioningStateSucceeded     ProvisioningState = "Succeeded"
	ProvisioningStateUpdating      ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type ServicePrincipalProfile

type ServicePrincipalProfile struct {
	ClientId     *string `json:"clientId,omitempty"`
	ClientSecret *string `json:"clientSecret,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OpenShiftCluster
}

type Visibility

type Visibility string
const (
	VisibilityPrivate Visibility = "Private"
	VisibilityPublic  Visibility = "Public"
)

func (*Visibility) UnmarshalJSON

func (s *Visibility) UnmarshalJSON(bytes []byte) error

type WorkerProfile

type WorkerProfile struct {
	Count               *int64            `json:"count,omitempty"`
	DiskEncryptionSetId *string           `json:"diskEncryptionSetId,omitempty"`
	DiskSizeGB          *int64            `json:"diskSizeGB,omitempty"`
	EncryptionAtHost    *EncryptionAtHost `json:"encryptionAtHost,omitempty"`
	Name                *string           `json:"name,omitempty"`
	SubnetId            *string           `json:"subnetId,omitempty"`
	VMSize              *string           `json:"vmSize,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL