armredhatopenshift

package module
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 14 Imported by: 8

README

Azure RedHat Open Shift Module for Go

PkgGoDev

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 {
	// The IP of the cluster API server.
	IP *string

	// The URL to access the cluster API server.
	URL *string

	// API server visibility.
	Visibility *Visibility
}

APIServerProfile represents an API server profile.

func (APIServerProfile) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type APIServerProfile.

func (*APIServerProfile) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIServerProfile.

type ClientFactory added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

func (c *ClientFactory) NewMachinePoolsClient() *MachinePoolsClient

NewMachinePoolsClient creates a new instance of MachinePoolsClient.

func (*ClientFactory) NewOpenShiftClustersClient added in v1.2.0

func (c *ClientFactory) NewOpenShiftClustersClient() *OpenShiftClustersClient

NewOpenShiftClustersClient creates a new instance of OpenShiftClustersClient.

func (*ClientFactory) NewOpenShiftVersionsClient added in v1.2.0

func (c *ClientFactory) NewOpenShiftVersionsClient() *OpenShiftVersionsClient

NewOpenShiftVersionsClient creates a new instance of OpenShiftVersionsClient.

func (*ClientFactory) NewOperationsClient added in v1.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewSecretsClient added in v1.2.0

func (c *ClientFactory) NewSecretsClient() *SecretsClient

NewSecretsClient creates a new instance of SecretsClient.

func (*ClientFactory) NewSyncIdentityProvidersClient added in v1.2.0

func (c *ClientFactory) NewSyncIdentityProvidersClient() *SyncIdentityProvidersClient

NewSyncIdentityProvidersClient creates a new instance of SyncIdentityProvidersClient.

func (*ClientFactory) NewSyncSetsClient added in v1.2.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ClusterProfile.

func (*ClusterProfile) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProfile.

type ConsoleProfile

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

ConsoleProfile represents a console profile.

func (ConsoleProfile) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConsoleProfile.

func (*ConsoleProfile) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConsoleProfile.

type CreatedByType added in v1.0.0

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 added in v1.0.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Display.

func (*Display) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Display.

type EncryptionAtHost added in v1.0.0

type EncryptionAtHost string

EncryptionAtHost - EncryptionAtHost represents encryption at host state

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

func PossibleEncryptionAtHostValues added in v1.0.0

func PossibleEncryptionAtHostValues() []EncryptionAtHost

PossibleEncryptionAtHostValues returns the possible values for the EncryptionAtHost const type.

type FipsValidatedModules added in v1.0.0

type FipsValidatedModules string

FipsValidatedModules - FipsValidatedModules determines if FIPS is used.

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

func PossibleFipsValidatedModulesValues added in v1.0.0

func PossibleFipsValidatedModulesValues() []FipsValidatedModules

PossibleFipsValidatedModulesValues returns the possible values for the FipsValidatedModules const type.

type IngressProfile

type IngressProfile struct {
	// The IP of the ingress.
	IP *string

	// The ingress profile name.
	Name *string

	// Ingress visibility.
	Visibility *Visibility
}

IngressProfile represents an ingress profile.

func (IngressProfile) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type IngressProfile.

func (*IngressProfile) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type IngressProfile.

type MachinePool added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MachinePool.

func (*MachinePool) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MachinePool.

type MachinePoolList added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MachinePoolList.

func (*MachinePoolList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MachinePoolList.

type MachinePoolProperties added in v1.1.0

type MachinePoolProperties struct {
	Resources *string
}

MachinePoolProperties represents the properties of a MachinePool

func (MachinePoolProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MachinePoolProperties.

func (*MachinePoolProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MachinePoolProperties.

type MachinePoolUpdate added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MachinePoolUpdate.

func (*MachinePoolUpdate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MachinePoolUpdate.

type MachinePoolsClient added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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"),
	// 	},
	// }
}
Output:

func (*MachinePoolsClient) Delete added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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)
	}
}
Output:

func (*MachinePoolsClient) Get added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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"),
	// 	},
	// }
}
Output:

func (*MachinePoolsClient) NewListPager added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*MachinePoolsClient) Update added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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"),
	// 	},
	// }
}
Output:

type MachinePoolsClientCreateOrUpdateOptions added in v1.1.0

type MachinePoolsClientCreateOrUpdateOptions struct {
}

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

type MachinePoolsClientCreateOrUpdateResponse added in v1.1.0

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

MachinePoolsClientCreateOrUpdateResponse contains the response from method MachinePoolsClient.CreateOrUpdate.

type MachinePoolsClientDeleteOptions added in v1.1.0

type MachinePoolsClientDeleteOptions struct {
}

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

type MachinePoolsClientDeleteResponse added in v1.1.0

type MachinePoolsClientDeleteResponse struct {
}

MachinePoolsClientDeleteResponse contains the response from method MachinePoolsClient.Delete.

type MachinePoolsClientGetOptions added in v1.1.0

type MachinePoolsClientGetOptions struct {
}

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

type MachinePoolsClientGetResponse added in v1.1.0

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

MachinePoolsClientGetResponse contains the response from method MachinePoolsClient.Get.

type MachinePoolsClientListOptions added in v1.1.0

type MachinePoolsClientListOptions struct {
}

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

type MachinePoolsClientListResponse added in v1.1.0

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

MachinePoolsClientListResponse contains the response from method MachinePoolsClient.NewListPager.

type MachinePoolsClientUpdateOptions added in v1.1.0

type MachinePoolsClientUpdateOptions struct {
}

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

type MachinePoolsClientUpdateResponse added in v1.1.0

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

MachinePoolsClientUpdateResponse contains the response from method MachinePoolsClient.Update.

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MasterProfile.

func (*MasterProfile) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MasterProfile.

type NetworkProfile

type NetworkProfile struct {
	// 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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type NetworkProfile.

func (*NetworkProfile) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftCluster.

type OpenShiftClusterAdminKubeconfig added in v1.0.0

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

OpenShiftClusterAdminKubeconfig represents an OpenShift cluster's admin kubeconfig.

func (OpenShiftClusterAdminKubeconfig) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OpenShiftClusterAdminKubeconfig.

func (*OpenShiftClusterAdminKubeconfig) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OpenShiftClusterCredentials.

func (*OpenShiftClusterCredentials) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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{
				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"),
	// 		}},
	// 	},
	// }
}
Output:

func (*OpenShiftClustersClient) BeginDelete

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

Generated from API version 2023-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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)
	}
}
Output:

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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{
				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"),
	// 		}},
	// 	},
	// }
}
Output:

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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{
	// 			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"),
	// 		}},
	// 	},
	// }
}
Output:

func (*OpenShiftClustersClient) ListAdminCredentials added in v1.0.0

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

Generated from API version 2023-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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="),
	// }
}
Output:

func (*OpenShiftClustersClient) ListCredentials

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

Generated from API version 2023-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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"),
	// }
}
Output:

func (*OpenShiftClustersClient) NewListByResourceGroupPager added in v0.4.0

NewListByResourceGroupPager - The operation returns properties of each OpenShift cluster.

Generated from API version 2023-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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{
		// 					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"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*OpenShiftClustersClient) NewListPager added in v0.4.0

NewListPager - The operation returns properties of each OpenShift cluster.

Generated from API version 2023-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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{
		// 					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"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

type OpenShiftClustersClientBeginCreateOrUpdateOptions added in v0.2.0

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

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

type OpenShiftClustersClientBeginDeleteOptions added in v0.2.0

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

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

type OpenShiftClustersClientBeginUpdateOptions added in v0.2.0

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

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

type OpenShiftClustersClientCreateOrUpdateResponse added in v0.2.0

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

OpenShiftClustersClientCreateOrUpdateResponse contains the response from method OpenShiftClustersClient.BeginCreateOrUpdate.

type OpenShiftClustersClientDeleteResponse added in v0.2.0

type OpenShiftClustersClientDeleteResponse struct {
}

OpenShiftClustersClientDeleteResponse contains the response from method OpenShiftClustersClient.BeginDelete.

type OpenShiftClustersClientGetOptions added in v0.2.0

type OpenShiftClustersClientGetOptions struct {
}

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

type OpenShiftClustersClientGetResponse added in v0.2.0

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

OpenShiftClustersClientGetResponse contains the response from method OpenShiftClustersClient.Get.

type OpenShiftClustersClientListAdminCredentialsOptions added in v1.0.0

type OpenShiftClustersClientListAdminCredentialsOptions struct {
}

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

type OpenShiftClustersClientListAdminCredentialsResponse added in v1.0.0

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

OpenShiftClustersClientListAdminCredentialsResponse contains the response from method OpenShiftClustersClient.ListAdminCredentials.

type OpenShiftClustersClientListByResourceGroupOptions added in v0.2.0

type OpenShiftClustersClientListByResourceGroupOptions struct {
}

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

type OpenShiftClustersClientListByResourceGroupResponse added in v0.2.0

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

OpenShiftClustersClientListByResourceGroupResponse contains the response from method OpenShiftClustersClient.NewListByResourceGroupPager.

type OpenShiftClustersClientListCredentialsOptions added in v0.2.0

type OpenShiftClustersClientListCredentialsOptions struct {
}

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

type OpenShiftClustersClientListCredentialsResponse added in v0.2.0

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

OpenShiftClustersClientListCredentialsResponse contains the response from method OpenShiftClustersClient.ListCredentials.

type OpenShiftClustersClientListOptions added in v0.2.0

type OpenShiftClustersClientListOptions struct {
}

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

type OpenShiftClustersClientListResponse added in v0.2.0

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

OpenShiftClustersClientListResponse contains the response from method OpenShiftClustersClient.NewListPager.

type OpenShiftClustersClientUpdateResponse added in v0.2.0

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

OpenShiftClustersClientUpdateResponse contains the response from method OpenShiftClustersClient.BeginUpdate.

type OpenShiftVersion added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OpenShiftVersion.

func (*OpenShiftVersion) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftVersion.

type OpenShiftVersionList added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OpenShiftVersionList.

func (*OpenShiftVersionList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftVersionList.

type OpenShiftVersionProperties added in v1.1.0

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

OpenShiftVersionProperties represents the properties of an OpenShiftVersion.

func (OpenShiftVersionProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OpenShiftVersionProperties.

func (*OpenShiftVersionProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OpenShiftVersionProperties.

type OpenShiftVersionsClient added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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

Generated from API version 2023-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OpenShiftVersionsClientListOptions added in v1.1.0

type OpenShiftVersionsClientListOptions struct {
}

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

type OpenShiftVersionsClientListResponse added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

NewListPager - The operation returns the RP operations.

Generated from API version 2023-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

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

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OutboundType added in v1.3.0

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 added in v1.3.0

func PossibleOutboundTypeValues() []OutboundType

PossibleOutboundTypeValues returns the possible values for the OutboundType const type.

type PreconfiguredNSG added in v1.4.0

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 added in v1.4.0

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"
	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 added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Secret.

func (*Secret) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Secret.

type SecretList added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SecretList.

func (*SecretList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SecretList.

type SecretProperties added in v1.1.0

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

SecretProperties represents the properties of a Secret

func (SecretProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SecretProperties.

func (*SecretProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SecretProperties.

type SecretUpdate added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SecretUpdate.

func (*SecretUpdate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SecretUpdate.

type SecretsClient added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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{
	// 	},
	// }
}
Output:

func (*SecretsClient) Delete added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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)
	}
}
Output:

func (*SecretsClient) Get added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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{
	// 	},
	// }
}
Output:

func (*SecretsClient) NewListPager added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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{
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*SecretsClient) Update added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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{
	// 	},
	// }
}
Output:

type SecretsClientCreateOrUpdateOptions added in v1.1.0

type SecretsClientCreateOrUpdateOptions struct {
}

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

type SecretsClientCreateOrUpdateResponse added in v1.1.0

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

SecretsClientCreateOrUpdateResponse contains the response from method SecretsClient.CreateOrUpdate.

type SecretsClientDeleteOptions added in v1.1.0

type SecretsClientDeleteOptions struct {
}

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

type SecretsClientDeleteResponse added in v1.1.0

type SecretsClientDeleteResponse struct {
}

SecretsClientDeleteResponse contains the response from method SecretsClient.Delete.

type SecretsClientGetOptions added in v1.1.0

type SecretsClientGetOptions struct {
}

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

type SecretsClientGetResponse added in v1.1.0

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

SecretsClientGetResponse contains the response from method SecretsClient.Get.

type SecretsClientListOptions added in v1.1.0

type SecretsClientListOptions struct {
}

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

type SecretsClientListResponse added in v1.1.0

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

SecretsClientListResponse contains the response from method SecretsClient.NewListPager.

type SecretsClientUpdateOptions added in v1.1.0

type SecretsClientUpdateOptions struct {
}

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

type SecretsClientUpdateResponse added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServicePrincipalProfile.

func (*ServicePrincipalProfile) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalProfile.

type SyncIdentityProvider added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SyncIdentityProvider.

func (*SyncIdentityProvider) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SyncIdentityProvider.

type SyncIdentityProviderList added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SyncIdentityProviderList.

func (*SyncIdentityProviderList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SyncIdentityProviderList.

type SyncIdentityProviderProperties added in v1.1.0

type SyncIdentityProviderProperties struct {
	Resources *string
}

SyncIdentityProviderProperties - SyncSetProperties represents the properties of a SyncSet

func (SyncIdentityProviderProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SyncIdentityProviderProperties.

func (*SyncIdentityProviderProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SyncIdentityProviderProperties.

type SyncIdentityProviderUpdate added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SyncIdentityProviderUpdate.

func (*SyncIdentityProviderUpdate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SyncIdentityProviderUpdate.

type SyncIdentityProvidersClient added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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=="),
	// 	},
	// }
}
Output:

func (*SyncIdentityProvidersClient) Delete added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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)
	}
}
Output:

func (*SyncIdentityProvidersClient) Get added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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=="),
	// 	},
	// }
}
Output:

func (*SyncIdentityProvidersClient) NewListPager added in v1.1.0

NewListPager - The operation returns properties of each SyncIdentityProvider.

Generated from API version 2023-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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=="),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*SyncIdentityProvidersClient) Update added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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=="),
	// 	},
	// }
}
Output:

type SyncIdentityProvidersClientCreateOrUpdateOptions added in v1.1.0

type SyncIdentityProvidersClientCreateOrUpdateOptions struct {
}

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

type SyncIdentityProvidersClientCreateOrUpdateResponse added in v1.1.0

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

SyncIdentityProvidersClientCreateOrUpdateResponse contains the response from method SyncIdentityProvidersClient.CreateOrUpdate.

type SyncIdentityProvidersClientDeleteOptions added in v1.1.0

type SyncIdentityProvidersClientDeleteOptions struct {
}

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

type SyncIdentityProvidersClientDeleteResponse added in v1.1.0

type SyncIdentityProvidersClientDeleteResponse struct {
}

SyncIdentityProvidersClientDeleteResponse contains the response from method SyncIdentityProvidersClient.Delete.

type SyncIdentityProvidersClientGetOptions added in v1.1.0

type SyncIdentityProvidersClientGetOptions struct {
}

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

type SyncIdentityProvidersClientGetResponse added in v1.1.0

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

SyncIdentityProvidersClientGetResponse contains the response from method SyncIdentityProvidersClient.Get.

type SyncIdentityProvidersClientListOptions added in v1.1.0

type SyncIdentityProvidersClientListOptions struct {
}

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

type SyncIdentityProvidersClientListResponse added in v1.1.0

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

SyncIdentityProvidersClientListResponse contains the response from method SyncIdentityProvidersClient.NewListPager.

type SyncIdentityProvidersClientUpdateOptions added in v1.1.0

type SyncIdentityProvidersClientUpdateOptions struct {
}

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

type SyncIdentityProvidersClientUpdateResponse added in v1.1.0

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

SyncIdentityProvidersClientUpdateResponse contains the response from method SyncIdentityProvidersClient.Update.

type SyncSet added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SyncSet.

func (*SyncSet) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SyncSet.

type SyncSetList added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SyncSetList.

func (*SyncSetList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SyncSetList.

type SyncSetProperties added in v1.1.0

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

SyncSetProperties represents the properties of a SyncSet

func (SyncSetProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SyncSetProperties.

func (*SyncSetProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SyncSetProperties.

type SyncSetUpdate added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SyncSetUpdate.

func (*SyncSetUpdate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SyncSetUpdate.

type SyncSetsClient added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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="),
	// 	},
	// }
}
Output:

func (*SyncSetsClient) Delete added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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)
	}
}
Output:

func (*SyncSetsClient) Get added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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="),
	// 	},
	// }
}
Output:

func (*SyncSetsClient) NewListPager added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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="),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*SyncSetsClient) Update added in v1.1.0

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-09-04

  • 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/bce66ff64f0e9edc9ea6119d00324058413e81ed/specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/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="),
	// 	},
	// }
}
Output:

type SyncSetsClientCreateOrUpdateOptions added in v1.1.0

type SyncSetsClientCreateOrUpdateOptions struct {
}

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

type SyncSetsClientCreateOrUpdateResponse added in v1.1.0

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 added in v1.1.0

type SyncSetsClientDeleteOptions struct {
}

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

type SyncSetsClientDeleteResponse added in v1.1.0

type SyncSetsClientDeleteResponse struct {
}

SyncSetsClientDeleteResponse contains the response from method SyncSetsClient.Delete.

type SyncSetsClientGetOptions added in v1.1.0

type SyncSetsClientGetOptions struct {
}

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

type SyncSetsClientGetResponse added in v1.1.0

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 added in v1.1.0

type SyncSetsClientListOptions struct {
}

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

type SyncSetsClientListResponse added in v1.1.0

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

SyncSetsClientListResponse contains the response from method SyncSetsClient.NewListPager.

type SyncSetsClientUpdateOptions added in v1.1.0

type SyncSetsClientUpdateOptions struct {
}

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

type SyncSetsClientUpdateResponse added in v1.1.0

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 added in v1.0.0

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 added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v1.0.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type WorkerProfile.

func (*WorkerProfile) UnmarshalJSON added in v1.1.0

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