openshiftclusters

package
v0.20230728.1102029 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

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

The openshiftclusters SDK allows for interaction with the Azure Resource Manager Service redhatopenshift (API Version 2022-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-sdk/resource-manager/redhatopenshift/2022-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 := openshiftclusters.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 := openshiftclusters.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 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
}

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 added in v0.20230516.1215417

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

type FipsValidatedModules

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

func (*FipsValidatedModules) UnmarshalJSON added in v0.20230516.1215417

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 {
	Items []OpenShiftCluster
}

type ListByResourceGroupOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	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 {
	PodCidr     *string `json:"podCidr,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"`
}

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(api environments.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 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) 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 added in v0.20230516.1215417

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
}

type Visibility

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

func (*Visibility) UnmarshalJSON added in v0.20230516.1215417

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