armredhatopenshift

package module
v0.0.0-...-45adee8 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 14 Imported by: 0

README

Azure RedHat Open Shift Module for Go

The armredhatopenshift module provides operations for working with Azure RedHat Open Shift.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure RedHat Open Shift module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure RedHat Open Shift. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure RedHat Open Shift module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armredhatopenshift.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armredhatopenshift.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewMachinePoolsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the RedHat Open Shift label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServerProfile

type APIServerProfile struct {
	// API server visibility.
	Visibility *Visibility

	// READ-ONLY; The IP of the cluster API server.
	IP *string

	// READ-ONLY; The URL to access the cluster API server.
	URL *string
}

APIServerProfile represents an API server profile.

func (APIServerProfile) MarshalJSON

func (a APIServerProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type APIServerProfile.

func (*APIServerProfile) UnmarshalJSON

func (a *APIServerProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type APIServerProfile.

type ClientFactory

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewMachinePoolsClient

func (c *ClientFactory) NewMachinePoolsClient() *MachinePoolsClient

NewMachinePoolsClient creates a new instance of MachinePoolsClient.

func (*ClientFactory) NewOpenShiftClustersClient

func (c *ClientFactory) NewOpenShiftClustersClient() *OpenShiftClustersClient

NewOpenShiftClustersClient creates a new instance of OpenShiftClustersClient.

func (*ClientFactory) NewOpenShiftVersionsClient

func (c *ClientFactory) NewOpenShiftVersionsClient() *OpenShiftVersionsClient

NewOpenShiftVersionsClient creates a new instance of OpenShiftVersionsClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewSecretsClient

func (c *ClientFactory) NewSecretsClient() *SecretsClient

NewSecretsClient creates a new instance of SecretsClient.

func (*ClientFactory) NewSyncIdentityProvidersClient

func (c *ClientFactory) NewSyncIdentityProvidersClient() *SyncIdentityProvidersClient

NewSyncIdentityProvidersClient creates a new instance of SyncIdentityProvidersClient.

func (*ClientFactory) NewSyncSetsClient

func (c *ClientFactory) NewSyncSetsClient() *SyncSetsClient

NewSyncSetsClient creates a new instance of SyncSetsClient.

type ClusterProfile

type ClusterProfile struct {
	// The domain for the cluster.
	Domain *string

	// If FIPS validated crypto modules are used
	FipsValidatedModules *FipsValidatedModules

	// The pull secret for the cluster.
	PullSecret *string

	// The ID of the cluster resource group.
	ResourceGroupID *string

	// The version of the cluster.
	Version *string
}

ClusterProfile represents a cluster profile.

func (ClusterProfile) MarshalJSON

func (c ClusterProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterProfile.

func (*ClusterProfile) UnmarshalJSON

func (c *ClusterProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProfile.

type ConsoleProfile

type ConsoleProfile struct {
	// READ-ONLY; The URL to access the cluster console.
	URL *string
}

ConsoleProfile represents a console profile.

func (ConsoleProfile) MarshalJSON

func (c ConsoleProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConsoleProfile.

func (*ConsoleProfile) UnmarshalJSON

func (c *ConsoleProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConsoleProfile.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type Display

type Display struct {
	// Friendly name of the operation.
	Description *string

	// Operation type: read, write, delete, listKeys/action, etc.
	Operation *string

	// Friendly name of the resource provider.
	Provider *string

	// Resource type on which the operation is performed.
	Resource *string
}

Display represents the display details of an operation.

func (Display) MarshalJSON

func (d Display) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Display.

func (*Display) UnmarshalJSON

func (d *Display) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Display.

type EffectiveOutboundIP

type EffectiveOutboundIP struct {
	// The fully qualified Azure resource id of an IP address resource.
	ID *string
}

EffectiveOutboundIP represents an effective outbound IP resource of the cluster public load balancer.

func (EffectiveOutboundIP) MarshalJSON

func (e EffectiveOutboundIP) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EffectiveOutboundIP.

func (*EffectiveOutboundIP) UnmarshalJSON

func (e *EffectiveOutboundIP) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveOutboundIP.

type EncryptionAtHost

type EncryptionAtHost string

EncryptionAtHost - EncryptionAtHost represents encryption at host state

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

func PossibleEncryptionAtHostValues

func PossibleEncryptionAtHostValues() []EncryptionAtHost

PossibleEncryptionAtHostValues returns the possible values for the EncryptionAtHost const type.

type FipsValidatedModules

type FipsValidatedModules string

FipsValidatedModules - FipsValidatedModules determines if FIPS is used.

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

func PossibleFipsValidatedModulesValues

func PossibleFipsValidatedModulesValues() []FipsValidatedModules

PossibleFipsValidatedModulesValues returns the possible values for the FipsValidatedModules const type.

type IngressProfile

type IngressProfile struct {
	// The ingress profile name.
	Name *string

	// Ingress visibility.
	Visibility *Visibility

	// READ-ONLY; The IP of the ingress.
	IP *string
}

IngressProfile represents an ingress profile.

func (IngressProfile) MarshalJSON

func (i IngressProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IngressProfile.

func (*IngressProfile) UnmarshalJSON

func (i *IngressProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IngressProfile.

type LoadBalancerProfile

type LoadBalancerProfile struct {
	// The desired managed outbound IPs for the cluster public load balancer.
	ManagedOutboundIPs *ManagedOutboundIPs

	// READ-ONLY; The list of effective outbound IP addresses of the public load balancer.
	EffectiveOutboundIPs []*EffectiveOutboundIP
}

LoadBalancerProfile represents the profile of the cluster public load balancer.

func (LoadBalancerProfile) MarshalJSON

func (l LoadBalancerProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LoadBalancerProfile.

func (*LoadBalancerProfile) UnmarshalJSON

func (l *LoadBalancerProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerProfile.

type MachinePool

type MachinePool struct {
	// The MachinePool Properties
	Properties *MachinePoolProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

MachinePool represents a MachinePool

func (MachinePool) MarshalJSON

func (m MachinePool) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachinePool.

func (*MachinePool) UnmarshalJSON

func (m *MachinePool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachinePool.

type MachinePoolList

type MachinePoolList struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of Machine Pools.
	Value []*MachinePool
}

MachinePoolList represents a list of MachinePools

func (MachinePoolList) MarshalJSON

func (m MachinePoolList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachinePoolList.

func (*MachinePoolList) UnmarshalJSON

func (m *MachinePoolList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachinePoolList.

type MachinePoolProperties

type MachinePoolProperties struct {
	Resources *string
}

MachinePoolProperties represents the properties of a MachinePool

func (MachinePoolProperties) MarshalJSON

func (m MachinePoolProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachinePoolProperties.

func (*MachinePoolProperties) UnmarshalJSON

func (m *MachinePoolProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachinePoolProperties.

type MachinePoolUpdate

type MachinePoolUpdate struct {
	// The MachinePool Properties
	Properties *MachinePoolProperties

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData
}

MachinePoolUpdate - MachinePool represents a MachinePool

func (MachinePoolUpdate) MarshalJSON

func (m MachinePoolUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachinePoolUpdate.

func (*MachinePoolUpdate) UnmarshalJSON

func (m *MachinePoolUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachinePoolUpdate.

type MachinePoolsClient

type MachinePoolsClient struct {
	// contains filtered or unexported fields
}

MachinePoolsClient contains the methods for the MachinePools group. Don't use this type directly, use NewMachinePoolsClient() instead.

func NewMachinePoolsClient

func NewMachinePoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MachinePoolsClient, error)

NewMachinePoolsClient creates a new instance of MachinePoolsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MachinePoolsClient) CreateOrUpdate

func (client *MachinePoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters MachinePool, options *MachinePoolsClientCreateOrUpdateOptions) (MachinePoolsClientCreateOrUpdateResponse, error)

CreateOrUpdate - The operation returns properties of a MachinePool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the MachinePool resource.
  • parameters - The MachinePool resource.
  • options - MachinePoolsClientCreateOrUpdateOptions contains the optional parameters for the MachinePoolsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/MachinePools_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMachinePoolsClient().CreateOrUpdate(ctx, "resourceGroup", "resourceName", "childResourceName", armredhatopenshift.MachinePool{
		Properties: &armredhatopenshift.MachinePoolProperties{
			Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiTWFjaGluZVBvb2wiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3Rlci13b3JrZXIiLAogICAgICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LVhYWFhYWFhYWFhYWCIKICAgIH0sCiAgICAic3BlYyI6IHsKICAgICAgICAiY2x1c3RlckRlcGxveW1lbnRSZWYiOiB7CiAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICB9LAogICAgICAgICJuYW1lIjogIndvcmtlciIsCiAgICAgICAgInBsYXRmb3JtIjogewogICAgICAgICAgICAiYXdzIjogewogICAgICAgICAgICAgICAgInJvb3RWb2x1bWUiOiB7CiAgICAgICAgICAgICAgICAgICAgImlvcHMiOiAwLAogICAgICAgICAgICAgICAgICAgICJzaXplIjogMzAwLAogICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImdwMyIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidHlwZSI6ICJtNS54bGFyZ2UiLAogICAgICAgICAgICAgICAgInpvbmVzIjogWwogICAgICAgICAgICAgICAgICAgICJ1cy1lYXN0LTFhIgogICAgICAgICAgICAgICAgXQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAicmVwbGljYXMiOiAyCiAgICB9LAogICAgInN0YXR1cyI6IHsKICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICBdCiAgICB9Cn0K"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MachinePool = armredhatopenshift.MachinePool{
	// 	Name: to.Ptr("myMachinePool"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/MachinePools"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/machinePools/myMachinePool"),
	// 	Properties: &armredhatopenshift.MachinePoolProperties{
	// 		Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiTWFjaGluZVBvb2wiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3Rlci13b3JrZXIiLAogICAgICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LVhYWFhYWFhYWFhYWCIKICAgIH0sCiAgICAic3BlYyI6IHsKICAgICAgICAiY2x1c3RlckRlcGxveW1lbnRSZWYiOiB7CiAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICB9LAogICAgICAgICJuYW1lIjogIndvcmtlciIsCiAgICAgICAgInBsYXRmb3JtIjogewogICAgICAgICAgICAiYXdzIjogewogICAgICAgICAgICAgICAgInJvb3RWb2x1bWUiOiB7CiAgICAgICAgICAgICAgICAgICAgImlvcHMiOiAwLAogICAgICAgICAgICAgICAgICAgICJzaXplIjogMzAwLAogICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImdwMyIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidHlwZSI6ICJtNS54bGFyZ2UiLAogICAgICAgICAgICAgICAgInpvbmVzIjogWwogICAgICAgICAgICAgICAgICAgICJ1cy1lYXN0LTFhIgogICAgICAgICAgICAgICAgXQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAicmVwbGljYXMiOiAyCiAgICB9LAogICAgInN0YXR1cyI6IHsKICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICBdCiAgICB9Cn0K"),
	// 	},
	// }
}

func (*MachinePoolsClient) Delete

func (client *MachinePoolsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *MachinePoolsClientDeleteOptions) (MachinePoolsClientDeleteResponse, error)

Delete - The operation returns nothing. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the MachinePool resource.
  • options - MachinePoolsClientDeleteOptions contains the optional parameters for the MachinePoolsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/MachinePools_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewMachinePoolsClient().Delete(ctx, "resourceGroup", "resourceName", "childResourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}

func (*MachinePoolsClient) Get

func (client *MachinePoolsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *MachinePoolsClientGetOptions) (MachinePoolsClientGetResponse, error)

Get - The operation returns properties of a MachinePool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the MachinePool resource.
  • options - MachinePoolsClientGetOptions contains the optional parameters for the MachinePoolsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/MachinePools_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMachinePoolsClient().Get(ctx, "resourceGroup", "resourceName", "childResourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MachinePool = armredhatopenshift.MachinePool{
	// 	Name: to.Ptr("myMachinePool"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/MachinePools"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/machinePools/myMachinePool"),
	// 	Properties: &armredhatopenshift.MachinePoolProperties{
	// 		Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiTWFjaGluZVBvb2wiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3Rlci13b3JrZXIiLAogICAgICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LVhYWFhYWFhYWFhYWCIKICAgIH0sCiAgICAic3BlYyI6IHsKICAgICAgICAiY2x1c3RlckRlcGxveW1lbnRSZWYiOiB7CiAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICB9LAogICAgICAgICJuYW1lIjogIndvcmtlciIsCiAgICAgICAgInBsYXRmb3JtIjogewogICAgICAgICAgICAiYXdzIjogewogICAgICAgICAgICAgICAgInJvb3RWb2x1bWUiOiB7CiAgICAgICAgICAgICAgICAgICAgImlvcHMiOiAwLAogICAgICAgICAgICAgICAgICAgICJzaXplIjogMzAwLAogICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImdwMyIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidHlwZSI6ICJtNS54bGFyZ2UiLAogICAgICAgICAgICAgICAgInpvbmVzIjogWwogICAgICAgICAgICAgICAgICAgICJ1cy1lYXN0LTFhIgogICAgICAgICAgICAgICAgXQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAicmVwbGljYXMiOiAyCiAgICB9LAogICAgInN0YXR1cyI6IHsKICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICBdCiAgICB9Cn0K"),
	// 	},
	// }
}

func (*MachinePoolsClient) NewListPager

func (client *MachinePoolsClient) NewListPager(resourceGroupName string, resourceName string, options *MachinePoolsClientListOptions) *runtime.Pager[MachinePoolsClientListResponse]

NewListPager - The operation returns properties of each MachinePool.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • options - MachinePoolsClientListOptions contains the optional parameters for the MachinePoolsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/MachinePools_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMachinePoolsClient().NewListPager("resourceGroup", "resourceName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.MachinePoolList = armredhatopenshift.MachinePoolList{
		// 	Value: []*armredhatopenshift.MachinePool{
		// 		{
		// 			Name: to.Ptr("myMachinePool"),
		// 			Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/MachinePools"),
		// 			ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/machinePools/myMachinePool"),
		// 			Properties: &armredhatopenshift.MachinePoolProperties{
		// 				Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiTWFjaGluZVBvb2wiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3Rlci13b3JrZXIiLAogICAgICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LVhYWFhYWFhYWFhYWCIKICAgIH0sCiAgICAic3BlYyI6IHsKICAgICAgICAiY2x1c3RlckRlcGxveW1lbnRSZWYiOiB7CiAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICB9LAogICAgICAgICJuYW1lIjogIndvcmtlciIsCiAgICAgICAgInBsYXRmb3JtIjogewogICAgICAgICAgICAiYXdzIjogewogICAgICAgICAgICAgICAgInJvb3RWb2x1bWUiOiB7CiAgICAgICAgICAgICAgICAgICAgImlvcHMiOiAwLAogICAgICAgICAgICAgICAgICAgICJzaXplIjogMzAwLAogICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImdwMyIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidHlwZSI6ICJtNS54bGFyZ2UiLAogICAgICAgICAgICAgICAgInpvbmVzIjogWwogICAgICAgICAgICAgICAgICAgICJ1cy1lYXN0LTFhIgogICAgICAgICAgICAgICAgXQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAicmVwbGljYXMiOiAyCiAgICB9LAogICAgInN0YXR1cyI6IHsKICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICBdCiAgICB9Cn0K"),
		// 			},
		// 	}},
		// }
	}
}

func (*MachinePoolsClient) Update

func (client *MachinePoolsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters MachinePoolUpdate, options *MachinePoolsClientUpdateOptions) (MachinePoolsClientUpdateResponse, error)

Update - The operation returns properties of a MachinePool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the MachinePool resource.
  • parameters - The MachinePool resource.
  • options - MachinePoolsClientUpdateOptions contains the optional parameters for the MachinePoolsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/MachinePools_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMachinePoolsClient().Update(ctx, "resourceGroup", "resourceName", "childResourceName", armredhatopenshift.MachinePoolUpdate{
		Properties: &armredhatopenshift.MachinePoolProperties{
			Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiTWFjaGluZVBvb2wiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3Rlci13b3JrZXIiLAogICAgICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LVhYWFhYWFhYWFhYWCIKICAgIH0sCiAgICAic3BlYyI6IHsKICAgICAgICAiY2x1c3RlckRlcGxveW1lbnRSZWYiOiB7CiAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICB9LAogICAgICAgICJuYW1lIjogIndvcmtlciIsCiAgICAgICAgInBsYXRmb3JtIjogewogICAgICAgICAgICAiYXdzIjogewogICAgICAgICAgICAgICAgInJvb3RWb2x1bWUiOiB7CiAgICAgICAgICAgICAgICAgICAgImlvcHMiOiAwLAogICAgICAgICAgICAgICAgICAgICJzaXplIjogMzAwLAogICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImdwMyIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidHlwZSI6ICJtNS54bGFyZ2UiLAogICAgICAgICAgICAgICAgInpvbmVzIjogWwogICAgICAgICAgICAgICAgICAgICJ1cy1lYXN0LTFhIgogICAgICAgICAgICAgICAgXQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAicmVwbGljYXMiOiAyCiAgICB9LAogICAgInN0YXR1cyI6IHsKICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICBdCiAgICB9Cn0K"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MachinePool = armredhatopenshift.MachinePool{
	// 	Name: to.Ptr("myMachinePool"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/MachinePools"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/machinePools/myMachinePool"),
	// 	Properties: &armredhatopenshift.MachinePoolProperties{
	// 		Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiTWFjaGluZVBvb2wiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3Rlci13b3JrZXIiLAogICAgICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LVhYWFhYWFhYWFhYWCIKICAgIH0sCiAgICAic3BlYyI6IHsKICAgICAgICAiY2x1c3RlckRlcGxveW1lbnRSZWYiOiB7CiAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICB9LAogICAgICAgICJuYW1lIjogIndvcmtlciIsCiAgICAgICAgInBsYXRmb3JtIjogewogICAgICAgICAgICAiYXdzIjogewogICAgICAgICAgICAgICAgInJvb3RWb2x1bWUiOiB7CiAgICAgICAgICAgICAgICAgICAgImlvcHMiOiAwLAogICAgICAgICAgICAgICAgICAgICJzaXplIjogMzAwLAogICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImdwMyIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidHlwZSI6ICJtNS54bGFyZ2UiLAogICAgICAgICAgICAgICAgInpvbmVzIjogWwogICAgICAgICAgICAgICAgICAgICJ1cy1lYXN0LTFhIgogICAgICAgICAgICAgICAgXQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAicmVwbGljYXMiOiAyCiAgICB9LAogICAgInN0YXR1cyI6IHsKICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICBdCiAgICB9Cn0K"),
	// 	},
	// }
}

type MachinePoolsClientCreateOrUpdateOptions

type MachinePoolsClientCreateOrUpdateOptions struct {
}

MachinePoolsClientCreateOrUpdateOptions contains the optional parameters for the MachinePoolsClient.CreateOrUpdate method.

type MachinePoolsClientCreateOrUpdateResponse

type MachinePoolsClientCreateOrUpdateResponse struct {
	// MachinePool represents a MachinePool
	MachinePool
}

MachinePoolsClientCreateOrUpdateResponse contains the response from method MachinePoolsClient.CreateOrUpdate.

type MachinePoolsClientDeleteOptions

type MachinePoolsClientDeleteOptions struct {
}

MachinePoolsClientDeleteOptions contains the optional parameters for the MachinePoolsClient.Delete method.

type MachinePoolsClientDeleteResponse

type MachinePoolsClientDeleteResponse struct {
}

MachinePoolsClientDeleteResponse contains the response from method MachinePoolsClient.Delete.

type MachinePoolsClientGetOptions

type MachinePoolsClientGetOptions struct {
}

MachinePoolsClientGetOptions contains the optional parameters for the MachinePoolsClient.Get method.

type MachinePoolsClientGetResponse

type MachinePoolsClientGetResponse struct {
	// MachinePool represents a MachinePool
	MachinePool
}

MachinePoolsClientGetResponse contains the response from method MachinePoolsClient.Get.

type MachinePoolsClientListOptions

type MachinePoolsClientListOptions struct {
}

MachinePoolsClientListOptions contains the optional parameters for the MachinePoolsClient.NewListPager method.

type MachinePoolsClientListResponse

type MachinePoolsClientListResponse struct {
	// MachinePoolList represents a list of MachinePools
	MachinePoolList
}

MachinePoolsClientListResponse contains the response from method MachinePoolsClient.NewListPager.

type MachinePoolsClientUpdateOptions

type MachinePoolsClientUpdateOptions struct {
}

MachinePoolsClientUpdateOptions contains the optional parameters for the MachinePoolsClient.Update method.

type MachinePoolsClientUpdateResponse

type MachinePoolsClientUpdateResponse struct {
	// MachinePool represents a MachinePool
	MachinePool
}

MachinePoolsClientUpdateResponse contains the response from method MachinePoolsClient.Update.

type ManagedOutboundIPs

type ManagedOutboundIPs struct {
	// Count represents the desired number of IPv4 outbound IPs created and managed by Azure for the cluster public load balancer.
	// Allowed values are in the range of 1 - 20. The default value is 1.
	Count *int32
}

ManagedOutboundIPs represents the desired managed outbound IPs for the cluster public load balancer.

func (ManagedOutboundIPs) MarshalJSON

func (m ManagedOutboundIPs) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedOutboundIPs.

func (*ManagedOutboundIPs) UnmarshalJSON

func (m *ManagedOutboundIPs) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedOutboundIPs.

type MasterProfile

type MasterProfile struct {
	// The resource ID of an associated DiskEncryptionSet, if applicable.
	DiskEncryptionSetID *string

	// Whether master virtual machines are encrypted at host.
	EncryptionAtHost *EncryptionAtHost

	// The Azure resource ID of the master subnet.
	SubnetID *string

	// The size of the master VMs.
	VMSize *string
}

MasterProfile represents a master profile.

func (MasterProfile) MarshalJSON

func (m MasterProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MasterProfile.

func (*MasterProfile) UnmarshalJSON

func (m *MasterProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MasterProfile.

type NetworkProfile

type NetworkProfile struct {
	// The cluster load balancer profile.
	LoadBalancerProfile *LoadBalancerProfile

	// The OutboundType used for egress traffic.
	OutboundType *OutboundType

	// The CIDR used for OpenShift/Kubernetes Pods.
	PodCidr *string

	// Specifies whether subnets are pre-attached with an NSG
	PreconfiguredNSG *PreconfiguredNSG

	// The CIDR used for OpenShift/Kubernetes Services.
	ServiceCidr *string
}

NetworkProfile represents a network profile.

func (NetworkProfile) MarshalJSON

func (n NetworkProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkProfile.

func (*NetworkProfile) UnmarshalJSON

func (n *NetworkProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile.

type OpenShiftCluster

type OpenShiftCluster struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The cluster properties.
	Properties *OpenShiftClusterProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

OpenShiftCluster represents an Azure Red Hat OpenShift cluster.

func (OpenShiftCluster) MarshalJSON

func (o OpenShiftCluster) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenShiftCluster.

func (*OpenShiftCluster) UnmarshalJSON

func (o *OpenShiftCluster) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftCluster.

type OpenShiftClusterAdminKubeconfig

type OpenShiftClusterAdminKubeconfig struct {
	// The base64-encoded kubeconfig file.
	Kubeconfig *string
}

OpenShiftClusterAdminKubeconfig represents an OpenShift cluster's admin kubeconfig.

func (OpenShiftClusterAdminKubeconfig) MarshalJSON

func (o OpenShiftClusterAdminKubeconfig) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenShiftClusterAdminKubeconfig.

func (*OpenShiftClusterAdminKubeconfig) UnmarshalJSON

func (o *OpenShiftClusterAdminKubeconfig) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftClusterAdminKubeconfig.

type OpenShiftClusterCredentials

type OpenShiftClusterCredentials struct {
	// The password for the kubeadmin user.
	KubeadminPassword *string

	// The username for the kubeadmin user.
	KubeadminUsername *string
}

OpenShiftClusterCredentials represents an OpenShift cluster's credentials.

func (OpenShiftClusterCredentials) MarshalJSON

func (o OpenShiftClusterCredentials) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenShiftClusterCredentials.

func (*OpenShiftClusterCredentials) UnmarshalJSON

func (o *OpenShiftClusterCredentials) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftClusterCredentials.

type OpenShiftClusterList

type OpenShiftClusterList struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of OpenShift clusters.
	Value []*OpenShiftCluster
}

OpenShiftClusterList represents a list of OpenShift clusters.

func (OpenShiftClusterList) MarshalJSON

func (o OpenShiftClusterList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenShiftClusterList.

func (*OpenShiftClusterList) UnmarshalJSON

func (o *OpenShiftClusterList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftClusterList.

type OpenShiftClusterProperties

type OpenShiftClusterProperties struct {
	// The cluster API server profile.
	ApiserverProfile *APIServerProfile

	// The cluster profile.
	ClusterProfile *ClusterProfile

	// The console profile.
	ConsoleProfile *ConsoleProfile

	// The cluster ingress profiles.
	IngressProfiles []*IngressProfile

	// The cluster master profile.
	MasterProfile *MasterProfile

	// The cluster network profile.
	NetworkProfile *NetworkProfile

	// The cluster provisioning state.
	ProvisioningState *ProvisioningState

	// The cluster service principal profile.
	ServicePrincipalProfile *ServicePrincipalProfile

	// The cluster worker profiles.
	WorkerProfiles []*WorkerProfile

	// READ-ONLY; The cluster worker profiles status.
	WorkerProfilesStatus []*WorkerProfile
}

OpenShiftClusterProperties represents an OpenShift cluster's properties.

func (OpenShiftClusterProperties) MarshalJSON

func (o OpenShiftClusterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenShiftClusterProperties.

func (*OpenShiftClusterProperties) UnmarshalJSON

func (o *OpenShiftClusterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftClusterProperties.

type OpenShiftClusterUpdate

type OpenShiftClusterUpdate struct {
	// The cluster properties.
	Properties *OpenShiftClusterProperties

	// The resource tags.
	Tags map[string]*string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData
}

OpenShiftClusterUpdate - OpenShiftCluster represents an Azure Red Hat OpenShift cluster.

func (OpenShiftClusterUpdate) MarshalJSON

func (o OpenShiftClusterUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenShiftClusterUpdate.

func (*OpenShiftClusterUpdate) UnmarshalJSON

func (o *OpenShiftClusterUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftClusterUpdate.

type OpenShiftClustersClient

type OpenShiftClustersClient struct {
	// contains filtered or unexported fields
}

OpenShiftClustersClient contains the methods for the OpenShiftClusters group. Don't use this type directly, use NewOpenShiftClustersClient() instead.

func NewOpenShiftClustersClient

func NewOpenShiftClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OpenShiftClustersClient, error)

NewOpenShiftClustersClient creates a new instance of OpenShiftClustersClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OpenShiftClustersClient) BeginCreateOrUpdate

BeginCreateOrUpdate - The operation returns properties of a OpenShift cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • parameters - The OpenShift cluster resource.
  • options - OpenShiftClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the OpenShiftClustersClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/OpenShiftClusters_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOpenShiftClustersClient().BeginCreateOrUpdate(ctx, "resourceGroup", "resourceName", armredhatopenshift.OpenShiftCluster{
		Location: to.Ptr("location"),
		Tags: map[string]*string{
			"key": to.Ptr("value"),
		},
		Properties: &armredhatopenshift.OpenShiftClusterProperties{
			ApiserverProfile: &armredhatopenshift.APIServerProfile{
				Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
			},
			ClusterProfile: &armredhatopenshift.ClusterProfile{
				Domain:               to.Ptr("cluster.location.aroapp.io"),
				FipsValidatedModules: to.Ptr(armredhatopenshift.FipsValidatedModulesEnabled),
				PullSecret:           to.Ptr("{\"auths\":{\"registry.connect.redhat.com\":{\"auth\":\"\"},\"registry.redhat.io\":{\"auth\":\"\"}}}"),
				ResourceGroupID:      to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup"),
			},
			ConsoleProfile: &armredhatopenshift.ConsoleProfile{},
			IngressProfiles: []*armredhatopenshift.IngressProfile{
				{
					Name:       to.Ptr("default"),
					Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
				}},
			MasterProfile: &armredhatopenshift.MasterProfile{
				EncryptionAtHost: to.Ptr(armredhatopenshift.EncryptionAtHostEnabled),
				SubnetID:         to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master"),
				VMSize:           to.Ptr("Standard_D8s_v3"),
			},
			NetworkProfile: &armredhatopenshift.NetworkProfile{
				LoadBalancerProfile: &armredhatopenshift.LoadBalancerProfile{
					ManagedOutboundIPs: &armredhatopenshift.ManagedOutboundIPs{
						Count: to.Ptr[int32](1),
					},
				},
				PodCidr:          to.Ptr("10.128.0.0/14"),
				PreconfiguredNSG: to.Ptr(armredhatopenshift.PreconfiguredNSGDisabled),
				ServiceCidr:      to.Ptr("172.30.0.0/16"),
			},
			ServicePrincipalProfile: &armredhatopenshift.ServicePrincipalProfile{
				ClientID:     to.Ptr("clientId"),
				ClientSecret: to.Ptr("clientSecret"),
			},
			WorkerProfiles: []*armredhatopenshift.WorkerProfile{
				{
					Name:       to.Ptr("worker"),
					Count:      to.Ptr[int32](3),
					DiskSizeGB: to.Ptr[int32](128),
					SubnetID:   to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
					VMSize:     to.Ptr("Standard_D2s_v3"),
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OpenShiftCluster = armredhatopenshift.OpenShiftCluster{
	// 	Name: to.Ptr("resourceName"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName"),
	// 	SystemData: &armredhatopenshift.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("location"),
	// 	Tags: map[string]*string{
	// 		"key": to.Ptr("value"),
	// 	},
	// 	Properties: &armredhatopenshift.OpenShiftClusterProperties{
	// 		ApiserverProfile: &armredhatopenshift.APIServerProfile{
	// 			IP: to.Ptr("1.2.3.4"),
	// 			URL: to.Ptr("https://api.cluster.location.aroapp.io:6443/"),
	// 			Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
	// 		},
	// 		ClusterProfile: &armredhatopenshift.ClusterProfile{
	// 			Domain: to.Ptr("cluster.location.aroapp.io"),
	// 			ResourceGroupID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup"),
	// 			Version: to.Ptr("4.11.0"),
	// 		},
	// 		ConsoleProfile: &armredhatopenshift.ConsoleProfile{
	// 			URL: to.Ptr("https://console-openshift-console.apps.cluster.location.aroapp.io/"),
	// 		},
	// 		IngressProfiles: []*armredhatopenshift.IngressProfile{
	// 			{
	// 				Name: to.Ptr("default"),
	// 				IP: to.Ptr("1.2.3.4"),
	// 				Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
	// 		}},
	// 		MasterProfile: &armredhatopenshift.MasterProfile{
	// 			SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master"),
	// 			VMSize: to.Ptr("Standard_D8s_v3"),
	// 		},
	// 		NetworkProfile: &armredhatopenshift.NetworkProfile{
	// 			PodCidr: to.Ptr("10.128.0.0/14"),
	// 			PreconfiguredNSG: to.Ptr(armredhatopenshift.PreconfiguredNSGDisabled),
	// 			ServiceCidr: to.Ptr("172.30.0.0/16"),
	// 		},
	// 		ProvisioningState: to.Ptr(armredhatopenshift.ProvisioningStateSucceeded),
	// 		ServicePrincipalProfile: &armredhatopenshift.ServicePrincipalProfile{
	// 			ClientID: to.Ptr("clientId"),
	// 		},
	// 		WorkerProfiles: []*armredhatopenshift.WorkerProfile{
	// 			{
	// 				Name: to.Ptr("worker"),
	// 				Count: to.Ptr[int32](3),
	// 				DiskSizeGB: to.Ptr[int32](128),
	// 				SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
	// 				VMSize: to.Ptr("Standard_D2s_v3"),
	// 		}},
	// 	},
	// }
}

func (*OpenShiftClustersClient) BeginDelete

BeginDelete - The operation returns nothing. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • options - OpenShiftClustersClientBeginDeleteOptions contains the optional parameters for the OpenShiftClustersClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/OpenShiftClusters_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOpenShiftClustersClient().BeginDelete(ctx, "resourceGroup", "resourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*OpenShiftClustersClient) BeginUpdate

BeginUpdate - The operation returns properties of a OpenShift cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • parameters - The OpenShift cluster resource.
  • options - OpenShiftClustersClientBeginUpdateOptions contains the optional parameters for the OpenShiftClustersClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/OpenShiftClusters_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOpenShiftClustersClient().BeginUpdate(ctx, "resourceGroup", "resourceName", armredhatopenshift.OpenShiftClusterUpdate{
		Properties: &armredhatopenshift.OpenShiftClusterProperties{
			ApiserverProfile: &armredhatopenshift.APIServerProfile{
				Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
			},
			ClusterProfile: &armredhatopenshift.ClusterProfile{
				Domain:               to.Ptr("cluster.location.aroapp.io"),
				FipsValidatedModules: to.Ptr(armredhatopenshift.FipsValidatedModulesEnabled),
				PullSecret:           to.Ptr("{\"auths\":{\"registry.connect.redhat.com\":{\"auth\":\"\"},\"registry.redhat.io\":{\"auth\":\"\"}}}"),
				ResourceGroupID:      to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup"),
			},
			ConsoleProfile: &armredhatopenshift.ConsoleProfile{},
			IngressProfiles: []*armredhatopenshift.IngressProfile{
				{
					Name:       to.Ptr("default"),
					Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
				}},
			MasterProfile: &armredhatopenshift.MasterProfile{
				EncryptionAtHost: to.Ptr(armredhatopenshift.EncryptionAtHostEnabled),
				SubnetID:         to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master"),
				VMSize:           to.Ptr("Standard_D8s_v3"),
			},
			NetworkProfile: &armredhatopenshift.NetworkProfile{
				LoadBalancerProfile: &armredhatopenshift.LoadBalancerProfile{
					ManagedOutboundIPs: &armredhatopenshift.ManagedOutboundIPs{
						Count: to.Ptr[int32](1),
					},
				},
				PodCidr:          to.Ptr("10.128.0.0/14"),
				PreconfiguredNSG: to.Ptr(armredhatopenshift.PreconfiguredNSGDisabled),
				ServiceCidr:      to.Ptr("172.30.0.0/16"),
			},
			ServicePrincipalProfile: &armredhatopenshift.ServicePrincipalProfile{
				ClientID:     to.Ptr("clientId"),
				ClientSecret: to.Ptr("clientSecret"),
			},
			WorkerProfiles: []*armredhatopenshift.WorkerProfile{
				{
					Name:       to.Ptr("worker"),
					Count:      to.Ptr[int32](3),
					DiskSizeGB: to.Ptr[int32](128),
					SubnetID:   to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
					VMSize:     to.Ptr("Standard_D2s_v3"),
				}},
		},
		Tags: map[string]*string{
			"key": to.Ptr("value"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OpenShiftCluster = armredhatopenshift.OpenShiftCluster{
	// 	Name: to.Ptr("resourceName"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName"),
	// 	SystemData: &armredhatopenshift.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("location"),
	// 	Tags: map[string]*string{
	// 		"key": to.Ptr("value"),
	// 	},
	// 	Properties: &armredhatopenshift.OpenShiftClusterProperties{
	// 		ApiserverProfile: &armredhatopenshift.APIServerProfile{
	// 			IP: to.Ptr("1.2.3.4"),
	// 			URL: to.Ptr("https://api.cluster.location.aroapp.io:6443/"),
	// 			Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
	// 		},
	// 		ClusterProfile: &armredhatopenshift.ClusterProfile{
	// 			Domain: to.Ptr("cluster.location.aroapp.io"),
	// 			ResourceGroupID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup"),
	// 			Version: to.Ptr("4.11.0"),
	// 		},
	// 		ConsoleProfile: &armredhatopenshift.ConsoleProfile{
	// 			URL: to.Ptr("https://console-openshift-console.apps.cluster.location.aroapp.io/"),
	// 		},
	// 		IngressProfiles: []*armredhatopenshift.IngressProfile{
	// 			{
	// 				Name: to.Ptr("default"),
	// 				IP: to.Ptr("1.2.3.4"),
	// 				Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
	// 		}},
	// 		MasterProfile: &armredhatopenshift.MasterProfile{
	// 			SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master"),
	// 			VMSize: to.Ptr("Standard_D8s_v3"),
	// 		},
	// 		NetworkProfile: &armredhatopenshift.NetworkProfile{
	// 			PodCidr: to.Ptr("10.128.0.0/14"),
	// 			PreconfiguredNSG: to.Ptr(armredhatopenshift.PreconfiguredNSGDisabled),
	// 			ServiceCidr: to.Ptr("172.30.0.0/16"),
	// 		},
	// 		ProvisioningState: to.Ptr(armredhatopenshift.ProvisioningStateSucceeded),
	// 		ServicePrincipalProfile: &armredhatopenshift.ServicePrincipalProfile{
	// 			ClientID: to.Ptr("clientId"),
	// 		},
	// 		WorkerProfiles: []*armredhatopenshift.WorkerProfile{
	// 			{
	// 				Name: to.Ptr("worker"),
	// 				Count: to.Ptr[int32](3),
	// 				DiskSizeGB: to.Ptr[int32](128),
	// 				SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
	// 				VMSize: to.Ptr("Standard_D2s_v3"),
	// 		}},
	// 	},
	// }
}

func (*OpenShiftClustersClient) Get

Get - The operation returns properties of a OpenShift cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • options - OpenShiftClustersClientGetOptions contains the optional parameters for the OpenShiftClustersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/OpenShiftClusters_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOpenShiftClustersClient().Get(ctx, "resourceGroup", "resourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OpenShiftCluster = armredhatopenshift.OpenShiftCluster{
	// 	Name: to.Ptr("resourceName"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName"),
	// 	SystemData: &armredhatopenshift.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("location"),
	// 	Tags: map[string]*string{
	// 		"key": to.Ptr("value"),
	// 	},
	// 	Properties: &armredhatopenshift.OpenShiftClusterProperties{
	// 		ApiserverProfile: &armredhatopenshift.APIServerProfile{
	// 			IP: to.Ptr("1.2.3.4"),
	// 			URL: to.Ptr("https://api.cluster.location.aroapp.io:6443/"),
	// 			Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
	// 		},
	// 		ClusterProfile: &armredhatopenshift.ClusterProfile{
	// 			Domain: to.Ptr("cluster.location.aroapp.io"),
	// 			ResourceGroupID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup"),
	// 			Version: to.Ptr("4.11.0"),
	// 		},
	// 		ConsoleProfile: &armredhatopenshift.ConsoleProfile{
	// 			URL: to.Ptr("https://console-openshift-console.apps.cluster.location.aroapp.io/"),
	// 		},
	// 		IngressProfiles: []*armredhatopenshift.IngressProfile{
	// 			{
	// 				Name: to.Ptr("default"),
	// 				IP: to.Ptr("1.2.3.4"),
	// 				Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
	// 		}},
	// 		MasterProfile: &armredhatopenshift.MasterProfile{
	// 			SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master"),
	// 			VMSize: to.Ptr("Standard_D8s_v3"),
	// 		},
	// 		NetworkProfile: &armredhatopenshift.NetworkProfile{
	// 			LoadBalancerProfile: &armredhatopenshift.LoadBalancerProfile{
	// 				EffectiveOutboundIPs: []*armredhatopenshift.EffectiveOutboundIP{
	// 					{
	// 						ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup/providers/Microsoft.Network/publicIPAddresses/publicIPAddressName"),
	// 				}},
	// 				ManagedOutboundIPs: &armredhatopenshift.ManagedOutboundIPs{
	// 					Count: to.Ptr[int32](1),
	// 				},
	// 			},
	// 			PodCidr: to.Ptr("10.128.0.0/14"),
	// 			PreconfiguredNSG: to.Ptr(armredhatopenshift.PreconfiguredNSGDisabled),
	// 			ServiceCidr: to.Ptr("172.30.0.0/16"),
	// 		},
	// 		ProvisioningState: to.Ptr(armredhatopenshift.ProvisioningStateSucceeded),
	// 		ServicePrincipalProfile: &armredhatopenshift.ServicePrincipalProfile{
	// 			ClientID: to.Ptr("clientId"),
	// 		},
	// 		WorkerProfiles: []*armredhatopenshift.WorkerProfile{
	// 			{
	// 				Name: to.Ptr("worker"),
	// 				Count: to.Ptr[int32](3),
	// 				DiskSizeGB: to.Ptr[int32](128),
	// 				SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
	// 				VMSize: to.Ptr("Standard_D2s_v3"),
	// 		}},
	// 		WorkerProfilesStatus: []*armredhatopenshift.WorkerProfile{
	// 			{
	// 				Name: to.Ptr("worker1"),
	// 				Count: to.Ptr[int32](1),
	// 				DiskSizeGB: to.Ptr[int32](128),
	// 				SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
	// 				VMSize: to.Ptr("Standard_D2s_v3"),
	// 			},
	// 			{
	// 				Name: to.Ptr("worker2"),
	// 				Count: to.Ptr[int32](1),
	// 				DiskSizeGB: to.Ptr[int32](128),
	// 				SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
	// 				VMSize: to.Ptr("Standard_D2s_v3"),
	// 			},
	// 			{
	// 				Name: to.Ptr("worker3"),
	// 				Count: to.Ptr[int32](1),
	// 				DiskSizeGB: to.Ptr[int32](128),
	// 				SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
	// 				VMSize: to.Ptr("Standard_D2s_v3"),
	// 		}},
	// 	},
	// }
}

func (*OpenShiftClustersClient) ListAdminCredentials

ListAdminCredentials - The operation returns the admin kubeconfig. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • options - OpenShiftClustersClientListAdminCredentialsOptions contains the optional parameters for the OpenShiftClustersClient.ListAdminCredentials method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/OpenShiftClusters_ListAdminCredentials.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOpenShiftClustersClient().ListAdminCredentials(ctx, "resourceGroup", "resourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OpenShiftClusterAdminKubeconfig = armredhatopenshift.OpenShiftClusterAdminKubeconfig{
	// 	Kubeconfig: to.Ptr("e30="),
	// }
}

func (*OpenShiftClustersClient) ListCredentials

ListCredentials - The operation returns the credentials. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • options - OpenShiftClustersClientListCredentialsOptions contains the optional parameters for the OpenShiftClustersClient.ListCredentials method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/OpenShiftClusters_ListCredentials.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOpenShiftClustersClient().ListCredentials(ctx, "resourceGroup", "resourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OpenShiftClusterCredentials = armredhatopenshift.OpenShiftClusterCredentials{
	// 	KubeadminPassword: to.Ptr("password"),
	// 	KubeadminUsername: to.Ptr("kubeadmin"),
	// }
}

func (*OpenShiftClustersClient) NewListByResourceGroupPager

NewListByResourceGroupPager - The operation returns properties of each OpenShift cluster.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - OpenShiftClustersClientListByResourceGroupOptions contains the optional parameters for the OpenShiftClustersClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/OpenShiftClusters_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOpenShiftClustersClient().NewListByResourceGroupPager("resourceGroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OpenShiftClusterList = armredhatopenshift.OpenShiftClusterList{
		// 	Value: []*armredhatopenshift.OpenShiftCluster{
		// 		{
		// 			Name: to.Ptr("resourceName"),
		// 			Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters"),
		// 			ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName"),
		// 			SystemData: &armredhatopenshift.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
		// 				CreatedBy: to.Ptr("string"),
		// 				CreatedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("string"),
		// 				LastModifiedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("location"),
		// 			Tags: map[string]*string{
		// 				"key": to.Ptr("value"),
		// 			},
		// 			Properties: &armredhatopenshift.OpenShiftClusterProperties{
		// 				ApiserverProfile: &armredhatopenshift.APIServerProfile{
		// 					IP: to.Ptr("1.2.3.4"),
		// 					URL: to.Ptr("https://api.cluster.location.aroapp.io:6443/"),
		// 					Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
		// 				},
		// 				ClusterProfile: &armredhatopenshift.ClusterProfile{
		// 					Domain: to.Ptr("cluster.location.aroapp.io"),
		// 					ResourceGroupID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup"),
		// 					Version: to.Ptr("4.11.0"),
		// 				},
		// 				ConsoleProfile: &armredhatopenshift.ConsoleProfile{
		// 					URL: to.Ptr("https://console-openshift-console.apps.cluster.location.aroapp.io/"),
		// 				},
		// 				IngressProfiles: []*armredhatopenshift.IngressProfile{
		// 					{
		// 						Name: to.Ptr("default"),
		// 						IP: to.Ptr("1.2.3.4"),
		// 						Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
		// 				}},
		// 				MasterProfile: &armredhatopenshift.MasterProfile{
		// 					SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master"),
		// 					VMSize: to.Ptr("Standard_D8s_v3"),
		// 				},
		// 				NetworkProfile: &armredhatopenshift.NetworkProfile{
		// 					LoadBalancerProfile: &armredhatopenshift.LoadBalancerProfile{
		// 						EffectiveOutboundIPs: []*armredhatopenshift.EffectiveOutboundIP{
		// 							{
		// 								ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup/providers/Microsoft.Network/publicIPAddresses/publicIPAddressName"),
		// 						}},
		// 						ManagedOutboundIPs: &armredhatopenshift.ManagedOutboundIPs{
		// 							Count: to.Ptr[int32](1),
		// 						},
		// 					},
		// 					PodCidr: to.Ptr("10.128.0.0/14"),
		// 					PreconfiguredNSG: to.Ptr(armredhatopenshift.PreconfiguredNSGDisabled),
		// 					ServiceCidr: to.Ptr("172.30.0.0/16"),
		// 				},
		// 				ProvisioningState: to.Ptr(armredhatopenshift.ProvisioningStateSucceeded),
		// 				ServicePrincipalProfile: &armredhatopenshift.ServicePrincipalProfile{
		// 					ClientID: to.Ptr("clientId"),
		// 				},
		// 				WorkerProfiles: []*armredhatopenshift.WorkerProfile{
		// 					{
		// 						Name: to.Ptr("worker"),
		// 						Count: to.Ptr[int32](3),
		// 						DiskSizeGB: to.Ptr[int32](128),
		// 						SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
		// 						VMSize: to.Ptr("Standard_D2s_v3"),
		// 				}},
		// 				WorkerProfilesStatus: []*armredhatopenshift.WorkerProfile{
		// 					{
		// 						Name: to.Ptr("worker1"),
		// 						Count: to.Ptr[int32](1),
		// 						DiskSizeGB: to.Ptr[int32](128),
		// 						SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
		// 						VMSize: to.Ptr("Standard_D2s_v3"),
		// 					},
		// 					{
		// 						Name: to.Ptr("worker2"),
		// 						Count: to.Ptr[int32](1),
		// 						DiskSizeGB: to.Ptr[int32](128),
		// 						SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
		// 						VMSize: to.Ptr("Standard_D2s_v3"),
		// 					},
		// 					{
		// 						Name: to.Ptr("worker3"),
		// 						Count: to.Ptr[int32](1),
		// 						DiskSizeGB: to.Ptr[int32](128),
		// 						SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
		// 						VMSize: to.Ptr("Standard_D2s_v3"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}

func (*OpenShiftClustersClient) NewListPager

NewListPager - The operation returns properties of each OpenShift cluster.

Generated from API version 2023-11-22

  • options - OpenShiftClustersClientListOptions contains the optional parameters for the OpenShiftClustersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/OpenShiftClusters_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOpenShiftClustersClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OpenShiftClusterList = armredhatopenshift.OpenShiftClusterList{
		// 	Value: []*armredhatopenshift.OpenShiftCluster{
		// 		{
		// 			Name: to.Ptr("resourceName"),
		// 			Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters"),
		// 			ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName"),
		// 			SystemData: &armredhatopenshift.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
		// 				CreatedBy: to.Ptr("string"),
		// 				CreatedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("string"),
		// 				LastModifiedByType: to.Ptr(armredhatopenshift.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("location"),
		// 			Tags: map[string]*string{
		// 				"key": to.Ptr("value"),
		// 			},
		// 			Properties: &armredhatopenshift.OpenShiftClusterProperties{
		// 				ApiserverProfile: &armredhatopenshift.APIServerProfile{
		// 					IP: to.Ptr("1.2.3.4"),
		// 					URL: to.Ptr("https://api.cluster.location.aroapp.io:6443/"),
		// 					Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
		// 				},
		// 				ClusterProfile: &armredhatopenshift.ClusterProfile{
		// 					Domain: to.Ptr("cluster.location.aroapp.io"),
		// 					ResourceGroupID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup"),
		// 					Version: to.Ptr("4.11.0"),
		// 				},
		// 				ConsoleProfile: &armredhatopenshift.ConsoleProfile{
		// 					URL: to.Ptr("https://console-openshift-console.apps.cluster.location.aroapp.io/"),
		// 				},
		// 				IngressProfiles: []*armredhatopenshift.IngressProfile{
		// 					{
		// 						Name: to.Ptr("default"),
		// 						IP: to.Ptr("1.2.3.4"),
		// 						Visibility: to.Ptr(armredhatopenshift.VisibilityPublic),
		// 				}},
		// 				MasterProfile: &armredhatopenshift.MasterProfile{
		// 					SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master"),
		// 					VMSize: to.Ptr("Standard_D8s_v3"),
		// 				},
		// 				NetworkProfile: &armredhatopenshift.NetworkProfile{
		// 					LoadBalancerProfile: &armredhatopenshift.LoadBalancerProfile{
		// 						EffectiveOutboundIPs: []*armredhatopenshift.EffectiveOutboundIP{
		// 							{
		// 								ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup/providers/Microsoft.Network/publicIPAddresses/publicIPAddressName"),
		// 						}},
		// 						ManagedOutboundIPs: &armredhatopenshift.ManagedOutboundIPs{
		// 							Count: to.Ptr[int32](1),
		// 						},
		// 					},
		// 					PodCidr: to.Ptr("10.128.0.0/14"),
		// 					PreconfiguredNSG: to.Ptr(armredhatopenshift.PreconfiguredNSGDisabled),
		// 					ServiceCidr: to.Ptr("172.30.0.0/16"),
		// 				},
		// 				ProvisioningState: to.Ptr(armredhatopenshift.ProvisioningStateSucceeded),
		// 				ServicePrincipalProfile: &armredhatopenshift.ServicePrincipalProfile{
		// 					ClientID: to.Ptr("clientId"),
		// 				},
		// 				WorkerProfiles: []*armredhatopenshift.WorkerProfile{
		// 					{
		// 						Name: to.Ptr("worker"),
		// 						Count: to.Ptr[int32](3),
		// 						DiskSizeGB: to.Ptr[int32](128),
		// 						SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
		// 						VMSize: to.Ptr("Standard_D2s_v3"),
		// 				}},
		// 				WorkerProfilesStatus: []*armredhatopenshift.WorkerProfile{
		// 					{
		// 						Name: to.Ptr("worker1"),
		// 						Count: to.Ptr[int32](1),
		// 						DiskSizeGB: to.Ptr[int32](128),
		// 						SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
		// 						VMSize: to.Ptr("Standard_D2s_v3"),
		// 					},
		// 					{
		// 						Name: to.Ptr("worker2"),
		// 						Count: to.Ptr[int32](1),
		// 						DiskSizeGB: to.Ptr[int32](128),
		// 						SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
		// 						VMSize: to.Ptr("Standard_D2s_v3"),
		// 					},
		// 					{
		// 						Name: to.Ptr("worker3"),
		// 						Count: to.Ptr[int32](1),
		// 						DiskSizeGB: to.Ptr[int32](128),
		// 						SubnetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
		// 						VMSize: to.Ptr("Standard_D2s_v3"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}

type OpenShiftClustersClientBeginCreateOrUpdateOptions

type OpenShiftClustersClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

OpenShiftClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the OpenShiftClustersClient.BeginCreateOrUpdate method.

type OpenShiftClustersClientBeginDeleteOptions

type OpenShiftClustersClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

OpenShiftClustersClientBeginDeleteOptions contains the optional parameters for the OpenShiftClustersClient.BeginDelete method.

type OpenShiftClustersClientBeginUpdateOptions

type OpenShiftClustersClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

OpenShiftClustersClientBeginUpdateOptions contains the optional parameters for the OpenShiftClustersClient.BeginUpdate method.

type OpenShiftClustersClientCreateOrUpdateResponse

type OpenShiftClustersClientCreateOrUpdateResponse struct {
	// OpenShiftCluster represents an Azure Red Hat OpenShift cluster.
	OpenShiftCluster
}

OpenShiftClustersClientCreateOrUpdateResponse contains the response from method OpenShiftClustersClient.BeginCreateOrUpdate.

type OpenShiftClustersClientDeleteResponse

type OpenShiftClustersClientDeleteResponse struct {
}

OpenShiftClustersClientDeleteResponse contains the response from method OpenShiftClustersClient.BeginDelete.

type OpenShiftClustersClientGetOptions

type OpenShiftClustersClientGetOptions struct {
}

OpenShiftClustersClientGetOptions contains the optional parameters for the OpenShiftClustersClient.Get method.

type OpenShiftClustersClientGetResponse

type OpenShiftClustersClientGetResponse struct {
	// OpenShiftCluster represents an Azure Red Hat OpenShift cluster.
	OpenShiftCluster
}

OpenShiftClustersClientGetResponse contains the response from method OpenShiftClustersClient.Get.

type OpenShiftClustersClientListAdminCredentialsOptions

type OpenShiftClustersClientListAdminCredentialsOptions struct {
}

OpenShiftClustersClientListAdminCredentialsOptions contains the optional parameters for the OpenShiftClustersClient.ListAdminCredentials method.

type OpenShiftClustersClientListAdminCredentialsResponse

type OpenShiftClustersClientListAdminCredentialsResponse struct {
	// OpenShiftClusterAdminKubeconfig represents an OpenShift cluster's admin kubeconfig.
	OpenShiftClusterAdminKubeconfig
}

OpenShiftClustersClientListAdminCredentialsResponse contains the response from method OpenShiftClustersClient.ListAdminCredentials.

type OpenShiftClustersClientListByResourceGroupOptions

type OpenShiftClustersClientListByResourceGroupOptions struct {
}

OpenShiftClustersClientListByResourceGroupOptions contains the optional parameters for the OpenShiftClustersClient.NewListByResourceGroupPager method.

type OpenShiftClustersClientListByResourceGroupResponse

type OpenShiftClustersClientListByResourceGroupResponse struct {
	// OpenShiftClusterList represents a list of OpenShift clusters.
	OpenShiftClusterList
}

OpenShiftClustersClientListByResourceGroupResponse contains the response from method OpenShiftClustersClient.NewListByResourceGroupPager.

type OpenShiftClustersClientListCredentialsOptions

type OpenShiftClustersClientListCredentialsOptions struct {
}

OpenShiftClustersClientListCredentialsOptions contains the optional parameters for the OpenShiftClustersClient.ListCredentials method.

type OpenShiftClustersClientListCredentialsResponse

type OpenShiftClustersClientListCredentialsResponse struct {
	// OpenShiftClusterCredentials represents an OpenShift cluster's credentials.
	OpenShiftClusterCredentials
}

OpenShiftClustersClientListCredentialsResponse contains the response from method OpenShiftClustersClient.ListCredentials.

type OpenShiftClustersClientListOptions

type OpenShiftClustersClientListOptions struct {
}

OpenShiftClustersClientListOptions contains the optional parameters for the OpenShiftClustersClient.NewListPager method.

type OpenShiftClustersClientListResponse

type OpenShiftClustersClientListResponse struct {
	// OpenShiftClusterList represents a list of OpenShift clusters.
	OpenShiftClusterList
}

OpenShiftClustersClientListResponse contains the response from method OpenShiftClustersClient.NewListPager.

type OpenShiftClustersClientUpdateResponse

type OpenShiftClustersClientUpdateResponse struct {
	// OpenShiftCluster represents an Azure Red Hat OpenShift cluster.
	OpenShiftCluster
}

OpenShiftClustersClientUpdateResponse contains the response from method OpenShiftClustersClient.BeginUpdate.

type OpenShiftVersion

type OpenShiftVersion struct {
	// The properties for the OpenShiftVersion resource.
	Properties *OpenShiftVersionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

OpenShiftVersion represents an OpenShift version that can be installed.

func (OpenShiftVersion) MarshalJSON

func (o OpenShiftVersion) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenShiftVersion.

func (*OpenShiftVersion) UnmarshalJSON

func (o *OpenShiftVersion) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftVersion.

type OpenShiftVersionList

type OpenShiftVersionList struct {
	// Next Link to next operation.
	NextLink *string

	// The List of available versions.
	Value []*OpenShiftVersion
}

OpenShiftVersionList represents a List of available versions.

func (OpenShiftVersionList) MarshalJSON

func (o OpenShiftVersionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenShiftVersionList.

func (*OpenShiftVersionList) UnmarshalJSON

func (o *OpenShiftVersionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftVersionList.

type OpenShiftVersionProperties

type OpenShiftVersionProperties struct {
	// Version represents the version to create the cluster at.
	Version *string
}

OpenShiftVersionProperties represents the properties of an OpenShiftVersion.

func (OpenShiftVersionProperties) MarshalJSON

func (o OpenShiftVersionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenShiftVersionProperties.

func (*OpenShiftVersionProperties) UnmarshalJSON

func (o *OpenShiftVersionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftVersionProperties.

type OpenShiftVersionsClient

type OpenShiftVersionsClient struct {
	// contains filtered or unexported fields
}

OpenShiftVersionsClient contains the methods for the OpenShiftVersions group. Don't use this type directly, use NewOpenShiftVersionsClient() instead.

func NewOpenShiftVersionsClient

func NewOpenShiftVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OpenShiftVersionsClient, error)

NewOpenShiftVersionsClient creates a new instance of OpenShiftVersionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OpenShiftVersionsClient) NewListPager

NewListPager - The operation returns the installable OpenShift versions as strings.

Generated from API version 2023-11-22

  • location - The name of Azure region.
  • options - OpenShiftVersionsClientListOptions contains the optional parameters for the OpenShiftVersionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/OpenShiftVersions_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOpenShiftVersionsClient().NewListPager("location", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OpenShiftVersionList = armredhatopenshift.OpenShiftVersionList{
		// 	Value: []*armredhatopenshift.OpenShiftVersion{
		// 		{
		// 			ID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armredhatopenshift.OpenShiftVersionProperties{
		// 				Version: to.Ptr("4.10.20"),
		// 			},
		// 	}},
		// }
	}
}

type OpenShiftVersionsClientListOptions

type OpenShiftVersionsClientListOptions struct {
}

OpenShiftVersionsClientListOptions contains the optional parameters for the OpenShiftVersionsClient.NewListPager method.

type OpenShiftVersionsClientListResponse

type OpenShiftVersionsClientListResponse struct {
	// OpenShiftVersionList represents a List of available versions.
	OpenShiftVersionList
}

OpenShiftVersionsClientListResponse contains the response from method OpenShiftVersionsClient.NewListPager.

type Operation

type Operation struct {
	// The object that describes the operation.
	Display *Display

	// Operation name: {provider}/{resource}/{operation}.
	Name *string

	// Sources of requests to this operation. Comma separated list with valid values user or system, e.g. "user,system".
	Origin *string
}

Operation represents an RP operation.

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationList

type OperationList struct {
	// The link used to get the next page of operations.
	NextLink *string

	// List of operations supported by the resource provider.
	Value []*Operation
}

OperationList represents an RP operation list.

func (OperationList) MarshalJSON

func (o OperationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationList.

func (*OperationList) UnmarshalJSON

func (o *OperationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - The operation returns the RP operations.

Generated from API version 2023-11-22

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationList = armredhatopenshift.OperationList{
		// 	Value: []*armredhatopenshift.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.RedHatOpenShift/openShiftClusters/read"),
		// 			Display: &armredhatopenshift.Display{
		// 				Operation: to.Ptr("Read OpenShift cluster"),
		// 				Provider: to.Ptr("Azure Red Hat OpenShift"),
		// 				Resource: to.Ptr("openShiftClusters"),
		// 			},
		// 	}},
		// }
	}
}

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// OperationList represents an RP operation list.
	OperationList
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OutboundType

type OutboundType string

OutboundType - The outbound routing strategy used to provide your cluster egress to the internet.

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

func PossibleOutboundTypeValues

func PossibleOutboundTypeValues() []OutboundType

PossibleOutboundTypeValues returns the possible values for the OutboundType const type.

type PreconfiguredNSG

type PreconfiguredNSG string

PreconfiguredNSG - PreconfiguredNSG represents whether customers want to use their own NSG attached to the subnets

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

func PossiblePreconfiguredNSGValues

func PossiblePreconfiguredNSGValues() []PreconfiguredNSG

PossiblePreconfiguredNSGValues returns the possible values for the PreconfiguredNSG const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - ProvisioningState represents a provisioning state.

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

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type Secret

type Secret struct {
	// The Secret Properties
	Properties *SecretProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Secret represents a secret.

func (Secret) MarshalJSON

func (s Secret) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Secret.

func (*Secret) UnmarshalJSON

func (s *Secret) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Secret.

type SecretList

type SecretList struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of secrets.
	Value []*Secret
}

SecretList represents a list of Secrets

func (SecretList) MarshalJSON

func (s SecretList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecretList.

func (*SecretList) UnmarshalJSON

func (s *SecretList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecretList.

type SecretProperties

type SecretProperties struct {
	// The Secrets Resources.
	SecretResources *string
}

SecretProperties represents the properties of a Secret

func (SecretProperties) MarshalJSON

func (s SecretProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecretProperties.

func (*SecretProperties) UnmarshalJSON

func (s *SecretProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecretProperties.

type SecretUpdate

type SecretUpdate struct {
	// The Secret Properties
	Properties *SecretProperties

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData
}

SecretUpdate - Secret represents a secret.

func (SecretUpdate) MarshalJSON

func (s SecretUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecretUpdate.

func (*SecretUpdate) UnmarshalJSON

func (s *SecretUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecretUpdate.

type SecretsClient

type SecretsClient struct {
	// contains filtered or unexported fields
}

SecretsClient contains the methods for the Secrets group. Don't use this type directly, use NewSecretsClient() instead.

func NewSecretsClient

func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecretsClient, error)

NewSecretsClient creates a new instance of SecretsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SecretsClient) CreateOrUpdate

func (client *SecretsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters Secret, options *SecretsClientCreateOrUpdateOptions) (SecretsClientCreateOrUpdateResponse, error)

CreateOrUpdate - The operation returns properties of a Secret. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the Secret resource.
  • parameters - The Secret resource.
  • options - SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/Secrets_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSecretsClient().CreateOrUpdate(ctx, "resourceGroup", "resourceName", "childResourceName", armredhatopenshift.Secret{
		Properties: &armredhatopenshift.SecretProperties{},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Secret = armredhatopenshift.Secret{
	// 	Name: to.Ptr("mySecret"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/Secrets"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/secret/mySecret"),
	// 	Properties: &armredhatopenshift.SecretProperties{
	// 	},
	// }
}

func (*SecretsClient) Delete

func (client *SecretsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *SecretsClientDeleteOptions) (SecretsClientDeleteResponse, error)

Delete - The operation returns nothing. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the Secret resource.
  • options - SecretsClientDeleteOptions contains the optional parameters for the SecretsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/Secrets_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewSecretsClient().Delete(ctx, "resourceGroup", "resourceName", "childResourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}

func (*SecretsClient) Get

func (client *SecretsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *SecretsClientGetOptions) (SecretsClientGetResponse, error)

Get - The operation returns properties of a Secret. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the Secret resource.
  • options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/Secrets_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSecretsClient().Get(ctx, "resourceGroup", "resourceName", "childResourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Secret = armredhatopenshift.Secret{
	// 	Name: to.Ptr("mySecret"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/Secrets"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/secret/mySecret"),
	// 	Properties: &armredhatopenshift.SecretProperties{
	// 	},
	// }
}

func (*SecretsClient) NewListPager

func (client *SecretsClient) NewListPager(resourceGroupName string, resourceName string, options *SecretsClientListOptions) *runtime.Pager[SecretsClientListResponse]

NewListPager - The operation returns properties of each Secret.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • options - SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/Secrets_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSecretsClient().NewListPager("resourceGroup", "resourceName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SecretList = armredhatopenshift.SecretList{
		// 	Value: []*armredhatopenshift.Secret{
		// 		{
		// 			Name: to.Ptr("mySecret"),
		// 			Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/Secrets"),
		// 			ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/secret/mySecret"),
		// 			Properties: &armredhatopenshift.SecretProperties{
		// 			},
		// 	}},
		// }
	}
}

func (*SecretsClient) Update

func (client *SecretsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters SecretUpdate, options *SecretsClientUpdateOptions) (SecretsClientUpdateResponse, error)

Update - The operation returns properties of a Secret. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the Secret resource.
  • parameters - The Secret resource.
  • options - SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/Secrets_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSecretsClient().Update(ctx, "resourceGroup", "resourceName", "childResourceName", armredhatopenshift.SecretUpdate{
		Properties: &armredhatopenshift.SecretProperties{},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Secret = armredhatopenshift.Secret{
	// 	Name: to.Ptr("mySecret"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/Secrets"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/secret/mySecret"),
	// 	Properties: &armredhatopenshift.SecretProperties{
	// 	},
	// }
}

type SecretsClientCreateOrUpdateOptions

type SecretsClientCreateOrUpdateOptions struct {
}

SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method.

type SecretsClientCreateOrUpdateResponse

type SecretsClientCreateOrUpdateResponse struct {
	// Secret represents a secret.
	Secret
}

SecretsClientCreateOrUpdateResponse contains the response from method SecretsClient.CreateOrUpdate.

type SecretsClientDeleteOptions

type SecretsClientDeleteOptions struct {
}

SecretsClientDeleteOptions contains the optional parameters for the SecretsClient.Delete method.

type SecretsClientDeleteResponse

type SecretsClientDeleteResponse struct {
}

SecretsClientDeleteResponse contains the response from method SecretsClient.Delete.

type SecretsClientGetOptions

type SecretsClientGetOptions struct {
}

SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method.

type SecretsClientGetResponse

type SecretsClientGetResponse struct {
	// Secret represents a secret.
	Secret
}

SecretsClientGetResponse contains the response from method SecretsClient.Get.

type SecretsClientListOptions

type SecretsClientListOptions struct {
}

SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method.

type SecretsClientListResponse

type SecretsClientListResponse struct {
	// SecretList represents a list of Secrets
	SecretList
}

SecretsClientListResponse contains the response from method SecretsClient.NewListPager.

type SecretsClientUpdateOptions

type SecretsClientUpdateOptions struct {
}

SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method.

type SecretsClientUpdateResponse

type SecretsClientUpdateResponse struct {
	// Secret represents a secret.
	Secret
}

SecretsClientUpdateResponse contains the response from method SecretsClient.Update.

type ServicePrincipalProfile

type ServicePrincipalProfile struct {
	// The client ID used for the cluster.
	ClientID *string

	// The client secret used for the cluster.
	ClientSecret *string
}

ServicePrincipalProfile represents a service principal profile.

func (ServicePrincipalProfile) MarshalJSON

func (s ServicePrincipalProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServicePrincipalProfile.

func (*ServicePrincipalProfile) UnmarshalJSON

func (s *ServicePrincipalProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalProfile.

type SyncIdentityProvider

type SyncIdentityProvider struct {
	// The SyncIdentityProvider Properties
	Properties *SyncIdentityProviderProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SyncIdentityProvider represents a SyncIdentityProvider

func (SyncIdentityProvider) MarshalJSON

func (s SyncIdentityProvider) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SyncIdentityProvider.

func (*SyncIdentityProvider) UnmarshalJSON

func (s *SyncIdentityProvider) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncIdentityProvider.

type SyncIdentityProviderList

type SyncIdentityProviderList struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of sync identity providers
	Value []*SyncIdentityProvider
}

SyncIdentityProviderList - SyncSetList represents a list of SyncSets

func (SyncIdentityProviderList) MarshalJSON

func (s SyncIdentityProviderList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SyncIdentityProviderList.

func (*SyncIdentityProviderList) UnmarshalJSON

func (s *SyncIdentityProviderList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncIdentityProviderList.

type SyncIdentityProviderProperties

type SyncIdentityProviderProperties struct {
	Resources *string
}

SyncIdentityProviderProperties - SyncSetProperties represents the properties of a SyncSet

func (SyncIdentityProviderProperties) MarshalJSON

func (s SyncIdentityProviderProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SyncIdentityProviderProperties.

func (*SyncIdentityProviderProperties) UnmarshalJSON

func (s *SyncIdentityProviderProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncIdentityProviderProperties.

type SyncIdentityProviderUpdate

type SyncIdentityProviderUpdate struct {
	// The SyncIdentityProvider Properties
	Properties *SyncIdentityProviderProperties

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData
}

SyncIdentityProviderUpdate - SyncIdentityProvider represents a SyncIdentityProvider

func (SyncIdentityProviderUpdate) MarshalJSON

func (s SyncIdentityProviderUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SyncIdentityProviderUpdate.

func (*SyncIdentityProviderUpdate) UnmarshalJSON

func (s *SyncIdentityProviderUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncIdentityProviderUpdate.

type SyncIdentityProvidersClient

type SyncIdentityProvidersClient struct {
	// contains filtered or unexported fields
}

SyncIdentityProvidersClient contains the methods for the SyncIdentityProviders group. Don't use this type directly, use NewSyncIdentityProvidersClient() instead.

func NewSyncIdentityProvidersClient

func NewSyncIdentityProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SyncIdentityProvidersClient, error)

NewSyncIdentityProvidersClient creates a new instance of SyncIdentityProvidersClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SyncIdentityProvidersClient) CreateOrUpdate

func (client *SyncIdentityProvidersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters SyncIdentityProvider, options *SyncIdentityProvidersClientCreateOrUpdateOptions) (SyncIdentityProvidersClientCreateOrUpdateResponse, error)

CreateOrUpdate - The operation returns properties of a SyncIdentityProvider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the SyncIdentityProvider resource.
  • parameters - The SyncIdentityProvider resource.
  • options - SyncIdentityProvidersClientCreateOrUpdateOptions contains the optional parameters for the SyncIdentityProvidersClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncIdentityProviders_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSyncIdentityProvidersClient().CreateOrUpdate(ctx, "resourceGroup", "resourceName", "childResourceName", armredhatopenshift.SyncIdentityProvider{
		Properties: &armredhatopenshift.SyncIdentityProviderProperties{
			Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiU3luY0lkZW50aXR5UHJvdmlkZXIiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIsCiAgICAgICAgIm5hbWVzcGFjZSI6ICJhcm8tZjYwYWU4YTItYmNhMS00OTg3LTkwNTYtWFhYWFhYWFhYWFhYIgogICAgfSwKICAgICJzcGVjIjogewogICAgICAgICJjbHVzdGVyRGVwbG95bWVudFJlZnMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImlkZW50aXR5UHJvdmlkZXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAiaHRwYXNzd2QiOiB7CiAgICAgICAgICAgICAgICAgICAgImZpbGVEYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJodHBhc3N3ZC1zZWNyZXQiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJtYXBwaW5nTWV0aG9kIjogImNsYWltIiwKICAgICAgICAgICAgICAgICJuYW1lIjogIkhUUGFzc3dkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogIkhUUGFzc3dkIgogICAgICAgICAgICB9CiAgICAgICAgXQogICAgfSwKICAgICJzdGF0dXMiOiB7fQp9Cg=="),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SyncIdentityProvider = armredhatopenshift.SyncIdentityProvider{
	// 	Name: to.Ptr("mySyncIdentityProvider"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/SyncIdentityProviders"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncidentityprovider/mySyncIdentityProvider"),
	// 	Properties: &armredhatopenshift.SyncIdentityProviderProperties{
	// 		Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiU3luY0lkZW50aXR5UHJvdmlkZXIiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIsCiAgICAgICAgIm5hbWVzcGFjZSI6ICJhcm8tZjYwYWU4YTItYmNhMS00OTg3LTkwNTYtWFhYWFhYWFhYWFhYIgogICAgfSwKICAgICJzcGVjIjogewogICAgICAgICJjbHVzdGVyRGVwbG95bWVudFJlZnMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImlkZW50aXR5UHJvdmlkZXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAiaHRwYXNzd2QiOiB7CiAgICAgICAgICAgICAgICAgICAgImZpbGVEYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJodHBhc3N3ZC1zZWNyZXQiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJtYXBwaW5nTWV0aG9kIjogImNsYWltIiwKICAgICAgICAgICAgICAgICJuYW1lIjogIkhUUGFzc3dkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogIkhUUGFzc3dkIgogICAgICAgICAgICB9CiAgICAgICAgXQogICAgfSwKICAgICJzdGF0dXMiOiB7fQp9Cg=="),
	// 	},
	// }
}

func (*SyncIdentityProvidersClient) Delete

func (client *SyncIdentityProvidersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *SyncIdentityProvidersClientDeleteOptions) (SyncIdentityProvidersClientDeleteResponse, error)

Delete - The operation returns nothing. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the SyncIdentityProvider resource.
  • options - SyncIdentityProvidersClientDeleteOptions contains the optional parameters for the SyncIdentityProvidersClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncIdentityProviders_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewSyncIdentityProvidersClient().Delete(ctx, "resourceGroup", "resourceName", "childResourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}

func (*SyncIdentityProvidersClient) Get

func (client *SyncIdentityProvidersClient) Get(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *SyncIdentityProvidersClientGetOptions) (SyncIdentityProvidersClientGetResponse, error)

Get - The operation returns properties of a SyncIdentityProvider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the SyncIdentityProvider resource.
  • options - SyncIdentityProvidersClientGetOptions contains the optional parameters for the SyncIdentityProvidersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncIdentityProviders_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSyncIdentityProvidersClient().Get(ctx, "resourceGroup", "resourceName", "childResourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SyncIdentityProvider = armredhatopenshift.SyncIdentityProvider{
	// 	Name: to.Ptr("mySyncIdentityProvider"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/SyncIdentityProviders"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncidentityprovider/mySyncIdentityProvider"),
	// 	Properties: &armredhatopenshift.SyncIdentityProviderProperties{
	// 		Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiU3luY0lkZW50aXR5UHJvdmlkZXIiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIsCiAgICAgICAgIm5hbWVzcGFjZSI6ICJhcm8tZjYwYWU4YTItYmNhMS00OTg3LTkwNTYtWFhYWFhYWFhYWFhYIgogICAgfSwKICAgICJzcGVjIjogewogICAgICAgICJjbHVzdGVyRGVwbG95bWVudFJlZnMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImlkZW50aXR5UHJvdmlkZXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAiaHRwYXNzd2QiOiB7CiAgICAgICAgICAgICAgICAgICAgImZpbGVEYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJodHBhc3N3ZC1zZWNyZXQiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJtYXBwaW5nTWV0aG9kIjogImNsYWltIiwKICAgICAgICAgICAgICAgICJuYW1lIjogIkhUUGFzc3dkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogIkhUUGFzc3dkIgogICAgICAgICAgICB9CiAgICAgICAgXQogICAgfSwKICAgICJzdGF0dXMiOiB7fQp9Cg=="),
	// 	},
	// }
}

func (*SyncIdentityProvidersClient) NewListPager

NewListPager - The operation returns properties of each SyncIdentityProvider.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • options - SyncIdentityProvidersClientListOptions contains the optional parameters for the SyncIdentityProvidersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncIdentityProviders_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSyncIdentityProvidersClient().NewListPager("resourceGroup", "resourceName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SyncIdentityProviderList = armredhatopenshift.SyncIdentityProviderList{
		// 	Value: []*armredhatopenshift.SyncIdentityProvider{
		// 		{
		// 			Name: to.Ptr("mySyncIdentityProvider"),
		// 			Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/SyncIdentityProviders"),
		// 			ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncidentityprovider/mySyncIdentityProvider"),
		// 			Properties: &armredhatopenshift.SyncIdentityProviderProperties{
		// 				Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiU3luY0lkZW50aXR5UHJvdmlkZXIiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIsCiAgICAgICAgIm5hbWVzcGFjZSI6ICJhcm8tZjYwYWU4YTItYmNhMS00OTg3LTkwNTYtWFhYWFhYWFhYWFhYIgogICAgfSwKICAgICJzcGVjIjogewogICAgICAgICJjbHVzdGVyRGVwbG95bWVudFJlZnMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImlkZW50aXR5UHJvdmlkZXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAiaHRwYXNzd2QiOiB7CiAgICAgICAgICAgICAgICAgICAgImZpbGVEYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJodHBhc3N3ZC1zZWNyZXQiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJtYXBwaW5nTWV0aG9kIjogImNsYWltIiwKICAgICAgICAgICAgICAgICJuYW1lIjogIkhUUGFzc3dkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogIkhUUGFzc3dkIgogICAgICAgICAgICB9CiAgICAgICAgXQogICAgfSwKICAgICJzdGF0dXMiOiB7fQp9Cg=="),
		// 			},
		// 	}},
		// }
	}
}

func (*SyncIdentityProvidersClient) Update

func (client *SyncIdentityProvidersClient) Update(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters SyncIdentityProviderUpdate, options *SyncIdentityProvidersClientUpdateOptions) (SyncIdentityProvidersClientUpdateResponse, error)

Update - The operation returns properties of a SyncIdentityProvider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the SyncIdentityProvider resource.
  • parameters - The SyncIdentityProvider resource.
  • options - SyncIdentityProvidersClientUpdateOptions contains the optional parameters for the SyncIdentityProvidersClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncIdentityProviders_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSyncIdentityProvidersClient().Update(ctx, "resourceGroup", "resourceName", "childResourceName", armredhatopenshift.SyncIdentityProviderUpdate{
		Properties: &armredhatopenshift.SyncIdentityProviderProperties{
			Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiU3luY0lkZW50aXR5UHJvdmlkZXIiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIsCiAgICAgICAgIm5hbWVzcGFjZSI6ICJhcm8tZjYwYWU4YTItYmNhMS00OTg3LTkwNTYtWFhYWFhYWFhYWFhYIgogICAgfSwKICAgICJzcGVjIjogewogICAgICAgICJjbHVzdGVyRGVwbG95bWVudFJlZnMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImlkZW50aXR5UHJvdmlkZXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAiaHRwYXNzd2QiOiB7CiAgICAgICAgICAgICAgICAgICAgImZpbGVEYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJodHBhc3N3ZC1zZWNyZXQiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJtYXBwaW5nTWV0aG9kIjogImNsYWltIiwKICAgICAgICAgICAgICAgICJuYW1lIjogIkhUUGFzc3dkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogIkhUUGFzc3dkIgogICAgICAgICAgICB9CiAgICAgICAgXQogICAgfSwKICAgICJzdGF0dXMiOiB7fQp9Cg=="),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SyncIdentityProvider = armredhatopenshift.SyncIdentityProvider{
	// 	Name: to.Ptr("mySyncIdentityProvider"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/SyncIdentityProviders"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncidentityprovider/mySyncIdentityProvider"),
	// 	Properties: &armredhatopenshift.SyncIdentityProviderProperties{
	// 		Resources: to.Ptr("ewogICAgImFwaVZlcnNpb24iOiAiaGl2ZS5vcGVuc2hpZnQuaW8vdjEiLAogICAgImtpbmQiOiAiU3luY0lkZW50aXR5UHJvdmlkZXIiLAogICAgIm1ldGFkYXRhIjogewogICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIsCiAgICAgICAgIm5hbWVzcGFjZSI6ICJhcm8tZjYwYWU4YTItYmNhMS00OTg3LTkwNTYtWFhYWFhYWFhYWFhYIgogICAgfSwKICAgICJzcGVjIjogewogICAgICAgICJjbHVzdGVyRGVwbG95bWVudFJlZnMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInRlc3QtY2x1c3RlciIKICAgICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImlkZW50aXR5UHJvdmlkZXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAiaHRwYXNzd2QiOiB7CiAgICAgICAgICAgICAgICAgICAgImZpbGVEYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJodHBhc3N3ZC1zZWNyZXQiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJtYXBwaW5nTWV0aG9kIjogImNsYWltIiwKICAgICAgICAgICAgICAgICJuYW1lIjogIkhUUGFzc3dkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogIkhUUGFzc3dkIgogICAgICAgICAgICB9CiAgICAgICAgXQogICAgfSwKICAgICJzdGF0dXMiOiB7fQp9Cg=="),
	// 	},
	// }
}

type SyncIdentityProvidersClientCreateOrUpdateOptions

type SyncIdentityProvidersClientCreateOrUpdateOptions struct {
}

SyncIdentityProvidersClientCreateOrUpdateOptions contains the optional parameters for the SyncIdentityProvidersClient.CreateOrUpdate method.

type SyncIdentityProvidersClientCreateOrUpdateResponse

type SyncIdentityProvidersClientCreateOrUpdateResponse struct {
	// SyncIdentityProvider represents a SyncIdentityProvider
	SyncIdentityProvider
}

SyncIdentityProvidersClientCreateOrUpdateResponse contains the response from method SyncIdentityProvidersClient.CreateOrUpdate.

type SyncIdentityProvidersClientDeleteOptions

type SyncIdentityProvidersClientDeleteOptions struct {
}

SyncIdentityProvidersClientDeleteOptions contains the optional parameters for the SyncIdentityProvidersClient.Delete method.

type SyncIdentityProvidersClientDeleteResponse

type SyncIdentityProvidersClientDeleteResponse struct {
}

SyncIdentityProvidersClientDeleteResponse contains the response from method SyncIdentityProvidersClient.Delete.

type SyncIdentityProvidersClientGetOptions

type SyncIdentityProvidersClientGetOptions struct {
}

SyncIdentityProvidersClientGetOptions contains the optional parameters for the SyncIdentityProvidersClient.Get method.

type SyncIdentityProvidersClientGetResponse

type SyncIdentityProvidersClientGetResponse struct {
	// SyncIdentityProvider represents a SyncIdentityProvider
	SyncIdentityProvider
}

SyncIdentityProvidersClientGetResponse contains the response from method SyncIdentityProvidersClient.Get.

type SyncIdentityProvidersClientListOptions

type SyncIdentityProvidersClientListOptions struct {
}

SyncIdentityProvidersClientListOptions contains the optional parameters for the SyncIdentityProvidersClient.NewListPager method.

type SyncIdentityProvidersClientListResponse

type SyncIdentityProvidersClientListResponse struct {
	// SyncSetList represents a list of SyncSets
	SyncIdentityProviderList
}

SyncIdentityProvidersClientListResponse contains the response from method SyncIdentityProvidersClient.NewListPager.

type SyncIdentityProvidersClientUpdateOptions

type SyncIdentityProvidersClientUpdateOptions struct {
}

SyncIdentityProvidersClientUpdateOptions contains the optional parameters for the SyncIdentityProvidersClient.Update method.

type SyncIdentityProvidersClientUpdateResponse

type SyncIdentityProvidersClientUpdateResponse struct {
	// SyncIdentityProvider represents a SyncIdentityProvider
	SyncIdentityProvider
}

SyncIdentityProvidersClientUpdateResponse contains the response from method SyncIdentityProvidersClient.Update.

type SyncSet

type SyncSet struct {
	// The Syncsets properties
	Properties *SyncSetProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SyncSet represents a SyncSet for an Azure Red Hat OpenShift Cluster.

func (SyncSet) MarshalJSON

func (s SyncSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SyncSet.

func (*SyncSet) UnmarshalJSON

func (s *SyncSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncSet.

type SyncSetList

type SyncSetList struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of syncsets.
	Value []*SyncSet
}

SyncSetList represents a list of SyncSets

func (SyncSetList) MarshalJSON

func (s SyncSetList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SyncSetList.

func (*SyncSetList) UnmarshalJSON

func (s *SyncSetList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncSetList.

type SyncSetProperties

type SyncSetProperties struct {
	// Resources represents the SyncSets configuration.
	Resources *string
}

SyncSetProperties represents the properties of a SyncSet

func (SyncSetProperties) MarshalJSON

func (s SyncSetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SyncSetProperties.

func (*SyncSetProperties) UnmarshalJSON

func (s *SyncSetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncSetProperties.

type SyncSetUpdate

type SyncSetUpdate struct {
	// The Syncsets properties
	Properties *SyncSetProperties

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData
}

SyncSetUpdate - SyncSet represents a SyncSet for an Azure Red Hat OpenShift Cluster.

func (SyncSetUpdate) MarshalJSON

func (s SyncSetUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SyncSetUpdate.

func (*SyncSetUpdate) UnmarshalJSON

func (s *SyncSetUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncSetUpdate.

type SyncSetsClient

type SyncSetsClient struct {
	// contains filtered or unexported fields
}

SyncSetsClient contains the methods for the SyncSets group. Don't use this type directly, use NewSyncSetsClient() instead.

func NewSyncSetsClient

func NewSyncSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SyncSetsClient, error)

NewSyncSetsClient creates a new instance of SyncSetsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SyncSetsClient) CreateOrUpdate

func (client *SyncSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters SyncSet, options *SyncSetsClientCreateOrUpdateOptions) (SyncSetsClientCreateOrUpdateResponse, error)

CreateOrUpdate - The operation returns properties of a SyncSet. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the SyncSet resource.
  • parameters - The SyncSet resource.
  • options - SyncSetsClientCreateOrUpdateOptions contains the optional parameters for the SyncSetsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncSets_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSyncSetsClient().CreateOrUpdate(ctx, "resourceGroup", "resourceName", "childResourceName", armredhatopenshift.SyncSet{
		Properties: &armredhatopenshift.SyncSetProperties{
			Resources: to.Ptr("eyAKICAiYXBpVmVyc2lvbiI6ICJoaXZlLm9wZW5zaGlmdC5pby92MSIsCiAgImtpbmQiOiAiU3luY1NldCIsCiAgIm1ldGFkYXRhIjogewogICAgIm5hbWUiOiAic2FtcGxlIiwKICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LWYyZjZhMTgzN2NhYSIKICB9LAogICJzcGVjIjogewogICAgImNsdXN0ZXJEZXBsb3ltZW50UmVmcyI6IFtdLAogICAgInJlc291cmNlcyI6IFsKICAgICAgewogICAgICAgICJhcGlWZXJzaW9uIjogInYxIiwKICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICJtZXRhZGF0YSI6IHsKICAgICAgICAgICJuYW1lIjogIm15Y29uZmlnbWFwIgogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQo="),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SyncSet = armredhatopenshift.SyncSet{
	// 	Name: to.Ptr("mySyncSet"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/SyncSets"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncSets/mySyncSet"),
	// 	Properties: &armredhatopenshift.SyncSetProperties{
	// 		Resources: to.Ptr("eyAKICAiYXBpVmVyc2lvbiI6ICJoaXZlLm9wZW5zaGlmdC5pby92MSIsCiAgImtpbmQiOiAiU3luY1NldCIsCiAgIm1ldGFkYXRhIjogewogICAgIm5hbWUiOiAic2FtcGxlIiwKICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LWYyZjZhMTgzN2NhYSIKICB9LAogICJzcGVjIjogewogICAgImNsdXN0ZXJEZXBsb3ltZW50UmVmcyI6IFtdLAogICAgInJlc291cmNlcyI6IFsKICAgICAgewogICAgICAgICJhcGlWZXJzaW9uIjogInYxIiwKICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICJtZXRhZGF0YSI6IHsKICAgICAgICAgICJuYW1lIjogIm15Y29uZmlnbWFwIgogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQo="),
	// 	},
	// }
}

func (*SyncSetsClient) Delete

func (client *SyncSetsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *SyncSetsClientDeleteOptions) (SyncSetsClientDeleteResponse, error)

Delete - The operation returns nothing. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the SyncSet resource.
  • options - SyncSetsClientDeleteOptions contains the optional parameters for the SyncSetsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncSets_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewSyncSetsClient().Delete(ctx, "resourceGroup", "resourceName", "childResourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}

func (*SyncSetsClient) Get

func (client *SyncSetsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *SyncSetsClientGetOptions) (SyncSetsClientGetResponse, error)

Get - The operation returns properties of a SyncSet. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the SyncSet resource.
  • options - SyncSetsClientGetOptions contains the optional parameters for the SyncSetsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncSets_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSyncSetsClient().Get(ctx, "resourceGroup", "resourceName", "childResourceName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SyncSet = armredhatopenshift.SyncSet{
	// 	Name: to.Ptr("mySyncSet"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/SyncSets"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncSets/mySyncSet"),
	// 	Properties: &armredhatopenshift.SyncSetProperties{
	// 		Resources: to.Ptr("eyAKICAiYXBpVmVyc2lvbiI6ICJoaXZlLm9wZW5zaGlmdC5pby92MSIsCiAgImtpbmQiOiAiU3luY1NldCIsCiAgIm1ldGFkYXRhIjogewogICAgIm5hbWUiOiAic2FtcGxlIiwKICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LWYyZjZhMTgzN2NhYSIKICB9LAogICJzcGVjIjogewogICAgImNsdXN0ZXJEZXBsb3ltZW50UmVmcyI6IFtdLAogICAgInJlc291cmNlcyI6IFsKICAgICAgewogICAgICAgICJhcGlWZXJzaW9uIjogInYxIiwKICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICJtZXRhZGF0YSI6IHsKICAgICAgICAgICJuYW1lIjogIm15Y29uZmlnbWFwIgogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQo="),
	// 	},
	// }
}

func (*SyncSetsClient) NewListPager

func (client *SyncSetsClient) NewListPager(resourceGroupName string, resourceName string, options *SyncSetsClientListOptions) *runtime.Pager[SyncSetsClientListResponse]

NewListPager - The operation returns properties of each SyncSet.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • options - SyncSetsClientListOptions contains the optional parameters for the SyncSetsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncSets_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSyncSetsClient().NewListPager("resourceGroup", "resourceName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SyncSetList = armredhatopenshift.SyncSetList{
		// 	Value: []*armredhatopenshift.SyncSet{
		// 		{
		// 			Name: to.Ptr("mySyncSet"),
		// 			Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/SyncSets"),
		// 			ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncSets/mySyncSet"),
		// 			Properties: &armredhatopenshift.SyncSetProperties{
		// 				Resources: to.Ptr("eyAKICAiYXBpVmVyc2lvbiI6ICJoaXZlLm9wZW5zaGlmdC5pby92MSIsCiAgImtpbmQiOiAiU3luY1NldCIsCiAgIm1ldGFkYXRhIjogewogICAgIm5hbWUiOiAic2FtcGxlIiwKICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LWYyZjZhMTgzN2NhYSIKICB9LAogICJzcGVjIjogewogICAgImNsdXN0ZXJEZXBsb3ltZW50UmVmcyI6IFtdLAogICAgInJlc291cmNlcyI6IFsKICAgICAgewogICAgICAgICJhcGlWZXJzaW9uIjogInYxIiwKICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICJtZXRhZGF0YSI6IHsKICAgICAgICAgICJuYW1lIjogIm15Y29uZmlnbWFwIgogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQo="),
		// 			},
		// 	}},
		// }
	}
}

func (*SyncSetsClient) Update

func (client *SyncSetsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters SyncSetUpdate, options *SyncSetsClientUpdateOptions) (SyncSetsClientUpdateResponse, error)

Update - The operation returns properties of a SyncSet. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-22

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the OpenShift cluster resource.
  • childResourceName - The name of the SyncSet resource.
  • parameters - The SyncSet resource.
  • options - SyncSetsClientUpdateOptions contains the optional parameters for the SyncSetsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/examples/SyncSets_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armredhatopenshift.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSyncSetsClient().Update(ctx, "resourceGroup", "resourceName", "childResourceName", armredhatopenshift.SyncSetUpdate{
		Properties: &armredhatopenshift.SyncSetProperties{
			Resources: to.Ptr("eyAKICAiYXBpVmVyc2lvbiI6ICJoaXZlLm9wZW5zaGlmdC5pby92MSIsCiAgImtpbmQiOiAiU3luY1NldCIsCiAgIm1ldGFkYXRhIjogewogICAgIm5hbWUiOiAic2FtcGxlIiwKICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LWYyZjZhMTgzN2NhYSIKICB9LAogICJzcGVjIjogewogICAgImNsdXN0ZXJEZXBsb3ltZW50UmVmcyI6IFtdLAogICAgInJlc291cmNlcyI6IFsKICAgICAgewogICAgICAgICJhcGlWZXJzaW9uIjogInYxIiwKICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICJtZXRhZGF0YSI6IHsKICAgICAgICAgICJuYW1lIjogIm15Y29uZmlnbWFwIgogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQo="),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SyncSet = armredhatopenshift.SyncSet{
	// 	Name: to.Ptr("mySyncSet"),
	// 	Type: to.Ptr("Microsoft.RedHatOpenShift/OpenShiftClusters/SyncSets"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/OpenShiftClusters/resourceName/syncSets/mySyncSet"),
	// 	Properties: &armredhatopenshift.SyncSetProperties{
	// 		Resources: to.Ptr("eyAKICAiYXBpVmVyc2lvbiI6ICJoaXZlLm9wZW5zaGlmdC5pby92MSIsCiAgImtpbmQiOiAiU3luY1NldCIsCiAgIm1ldGFkYXRhIjogewogICAgIm5hbWUiOiAic2FtcGxlIiwKICAgICJuYW1lc3BhY2UiOiAiYXJvLWY2MGFlOGEyLWJjYTEtNDk4Ny05MDU2LWYyZjZhMTgzN2NhYSIKICB9LAogICJzcGVjIjogewogICAgImNsdXN0ZXJEZXBsb3ltZW50UmVmcyI6IFtdLAogICAgInJlc291cmNlcyI6IFsKICAgICAgewogICAgICAgICJhcGlWZXJzaW9uIjogInYxIiwKICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICJtZXRhZGF0YSI6IHsKICAgICAgICAgICJuYW1lIjogIm15Y29uZmlnbWFwIgogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQo="),
	// 	},
	// }
}

type SyncSetsClientCreateOrUpdateOptions

type SyncSetsClientCreateOrUpdateOptions struct {
}

SyncSetsClientCreateOrUpdateOptions contains the optional parameters for the SyncSetsClient.CreateOrUpdate method.

type SyncSetsClientCreateOrUpdateResponse

type SyncSetsClientCreateOrUpdateResponse struct {
	// SyncSet represents a SyncSet for an Azure Red Hat OpenShift Cluster.
	SyncSet
}

SyncSetsClientCreateOrUpdateResponse contains the response from method SyncSetsClient.CreateOrUpdate.

type SyncSetsClientDeleteOptions

type SyncSetsClientDeleteOptions struct {
}

SyncSetsClientDeleteOptions contains the optional parameters for the SyncSetsClient.Delete method.

type SyncSetsClientDeleteResponse

type SyncSetsClientDeleteResponse struct {
}

SyncSetsClientDeleteResponse contains the response from method SyncSetsClient.Delete.

type SyncSetsClientGetOptions

type SyncSetsClientGetOptions struct {
}

SyncSetsClientGetOptions contains the optional parameters for the SyncSetsClient.Get method.

type SyncSetsClientGetResponse

type SyncSetsClientGetResponse struct {
	// SyncSet represents a SyncSet for an Azure Red Hat OpenShift Cluster.
	SyncSet
}

SyncSetsClientGetResponse contains the response from method SyncSetsClient.Get.

type SyncSetsClientListOptions

type SyncSetsClientListOptions struct {
}

SyncSetsClientListOptions contains the optional parameters for the SyncSetsClient.NewListPager method.

type SyncSetsClientListResponse

type SyncSetsClientListResponse struct {
	// SyncSetList represents a list of SyncSets
	SyncSetList
}

SyncSetsClientListResponse contains the response from method SyncSetsClient.NewListPager.

type SyncSetsClientUpdateOptions

type SyncSetsClientUpdateOptions struct {
}

SyncSetsClientUpdateOptions contains the optional parameters for the SyncSetsClient.Update method.

type SyncSetsClientUpdateResponse

type SyncSetsClientUpdateResponse struct {
	// SyncSet represents a SyncSet for an Azure Red Hat OpenShift Cluster.
	SyncSet
}

SyncSetsClientUpdateResponse contains the response from method SyncSetsClient.Update.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type Visibility

type Visibility string

Visibility - Visibility represents visibility.

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

func PossibleVisibilityValues

func PossibleVisibilityValues() []Visibility

PossibleVisibilityValues returns the possible values for the Visibility const type.

type WorkerProfile

type WorkerProfile struct {
	// The number of worker VMs.
	Count *int32

	// The resource ID of an associated DiskEncryptionSet, if applicable.
	DiskEncryptionSetID *string

	// The disk size of the worker VMs.
	DiskSizeGB *int32

	// Whether master virtual machines are encrypted at host.
	EncryptionAtHost *EncryptionAtHost

	// The worker profile name.
	Name *string

	// The Azure resource ID of the worker subnet.
	SubnetID *string

	// The size of the worker VMs.
	VMSize *string
}

WorkerProfile represents a worker profile.

func (WorkerProfile) MarshalJSON

func (w WorkerProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkerProfile.

func (*WorkerProfile) UnmarshalJSON

func (w *WorkerProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkerProfile.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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