Documentation ¶
Index ¶
- type ActionType
- type ClientFactory
- func (c *ClientFactory) NewFleetMembersClient() *FleetMembersClient
- func (c *ClientFactory) NewFleetUpdateStrategiesClient() *FleetUpdateStrategiesClient
- func (c *ClientFactory) NewFleetsClient() *FleetsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewUpdateRunsClient() *UpdateRunsClient
- type CreatedByType
- type ErrorAdditionalInfo
- type ErrorDetail
- type Fleet
- type FleetCredentialResult
- type FleetCredentialResults
- type FleetListResult
- type FleetMember
- type FleetMemberListResult
- type FleetMemberProperties
- type FleetMemberProvisioningState
- type FleetMemberUpdate
- type FleetMemberUpdateProperties
- type FleetMembersClient
- func (client *FleetMembersClient) BeginCreate(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[FleetMembersClientCreateResponse], error)
- func (client *FleetMembersClient) BeginDelete(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[FleetMembersClientDeleteResponse], error)
- func (client *FleetMembersClient) BeginUpdate(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[FleetMembersClientUpdateResponse], error)
- func (client *FleetMembersClient) Get(ctx context.Context, resourceGroupName string, fleetName string, ...) (FleetMembersClientGetResponse, error)
- func (client *FleetMembersClient) NewListByFleetPager(resourceGroupName string, fleetName string, ...) *runtime.Pager[FleetMembersClientListByFleetResponse]
- type FleetMembersClientBeginCreateOptions
- type FleetMembersClientBeginDeleteOptions
- type FleetMembersClientBeginUpdateOptions
- type FleetMembersClientCreateResponse
- type FleetMembersClientDeleteResponse
- type FleetMembersClientGetOptions
- type FleetMembersClientGetResponse
- type FleetMembersClientListByFleetOptions
- type FleetMembersClientListByFleetResponse
- type FleetMembersClientUpdateResponse
- type FleetPatch
- type FleetProperties
- type FleetProvisioningState
- type FleetUpdateStrategiesClient
- func (client *FleetUpdateStrategiesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[FleetUpdateStrategiesClientCreateOrUpdateResponse], error)
- func (client *FleetUpdateStrategiesClient) BeginDelete(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[FleetUpdateStrategiesClientDeleteResponse], error)
- func (client *FleetUpdateStrategiesClient) Get(ctx context.Context, resourceGroupName string, fleetName string, ...) (FleetUpdateStrategiesClientGetResponse, error)
- func (client *FleetUpdateStrategiesClient) NewListByFleetPager(resourceGroupName string, fleetName string, ...) *runtime.Pager[FleetUpdateStrategiesClientListByFleetResponse]
- type FleetUpdateStrategiesClientBeginCreateOrUpdateOptions
- type FleetUpdateStrategiesClientBeginDeleteOptions
- type FleetUpdateStrategiesClientCreateOrUpdateResponse
- type FleetUpdateStrategiesClientDeleteResponse
- type FleetUpdateStrategiesClientGetOptions
- type FleetUpdateStrategiesClientGetResponse
- type FleetUpdateStrategiesClientListByFleetOptions
- type FleetUpdateStrategiesClientListByFleetResponse
- type FleetUpdateStrategy
- type FleetUpdateStrategyListResult
- type FleetUpdateStrategyProperties
- type FleetUpdateStrategyProvisioningState
- type FleetsClient
- func (client *FleetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[FleetsClientCreateOrUpdateResponse], error)
- func (client *FleetsClient) BeginDelete(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[FleetsClientDeleteResponse], error)
- func (client *FleetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[FleetsClientUpdateResponse], error)
- func (client *FleetsClient) Get(ctx context.Context, resourceGroupName string, fleetName string, ...) (FleetsClientGetResponse, error)
- func (client *FleetsClient) ListCredentials(ctx context.Context, resourceGroupName string, fleetName string, ...) (FleetsClientListCredentialsResponse, error)
- func (client *FleetsClient) NewListByResourceGroupPager(resourceGroupName string, options *FleetsClientListByResourceGroupOptions) *runtime.Pager[FleetsClientListByResourceGroupResponse]
- func (client *FleetsClient) NewListBySubscriptionPager(options *FleetsClientListBySubscriptionOptions) *runtime.Pager[FleetsClientListBySubscriptionResponse]
- type FleetsClientBeginCreateOrUpdateOptions
- type FleetsClientBeginDeleteOptions
- type FleetsClientBeginUpdateOptions
- type FleetsClientCreateOrUpdateResponse
- type FleetsClientDeleteResponse
- type FleetsClientGetOptions
- type FleetsClientGetResponse
- type FleetsClientListByResourceGroupOptions
- type FleetsClientListByResourceGroupResponse
- type FleetsClientListBySubscriptionOptions
- type FleetsClientListBySubscriptionResponse
- type FleetsClientListCredentialsOptions
- type FleetsClientListCredentialsResponse
- type FleetsClientUpdateResponse
- type ManagedClusterUpdate
- type ManagedClusterUpgradeSpec
- type ManagedClusterUpgradeType
- type ManagedServiceIdentity
- type ManagedServiceIdentityType
- type MemberUpdateStatus
- type NodeImageSelection
- type NodeImageSelectionStatus
- type NodeImageSelectionType
- type NodeImageVersion
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type SystemData
- type UpdateGroup
- type UpdateGroupStatus
- type UpdateRun
- type UpdateRunListResult
- type UpdateRunProperties
- type UpdateRunProvisioningState
- type UpdateRunStatus
- type UpdateRunStrategy
- type UpdateRunsClient
- func (client *UpdateRunsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[UpdateRunsClientCreateOrUpdateResponse], error)
- func (client *UpdateRunsClient) BeginDelete(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[UpdateRunsClientDeleteResponse], error)
- func (client *UpdateRunsClient) BeginStart(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[UpdateRunsClientStartResponse], error)
- func (client *UpdateRunsClient) BeginStop(ctx context.Context, resourceGroupName string, fleetName string, ...) (*runtime.Poller[UpdateRunsClientStopResponse], error)
- func (client *UpdateRunsClient) Get(ctx context.Context, resourceGroupName string, fleetName string, ...) (UpdateRunsClientGetResponse, error)
- func (client *UpdateRunsClient) NewListByFleetPager(resourceGroupName string, fleetName string, ...) *runtime.Pager[UpdateRunsClientListByFleetResponse]
- type UpdateRunsClientBeginCreateOrUpdateOptions
- type UpdateRunsClientBeginDeleteOptions
- type UpdateRunsClientBeginStartOptions
- type UpdateRunsClientBeginStopOptions
- type UpdateRunsClientCreateOrUpdateResponse
- type UpdateRunsClientDeleteResponse
- type UpdateRunsClientGetOptions
- type UpdateRunsClientGetResponse
- type UpdateRunsClientListByFleetOptions
- type UpdateRunsClientListByFleetResponse
- type UpdateRunsClientStartResponse
- type UpdateRunsClientStopResponse
- type UpdateStage
- type UpdateStageStatus
- type UpdateState
- type UpdateStatus
- type UserAssignedIdentity
- type WaitStatus
Examples ¶
- FleetMembersClient.BeginCreate
- FleetMembersClient.BeginDelete
- FleetMembersClient.BeginUpdate
- FleetMembersClient.Get
- FleetMembersClient.NewListByFleetPager
- FleetUpdateStrategiesClient.BeginCreateOrUpdate
- FleetUpdateStrategiesClient.BeginDelete
- FleetUpdateStrategiesClient.Get
- FleetUpdateStrategiesClient.NewListByFleetPager
- FleetsClient.BeginCreateOrUpdate
- FleetsClient.BeginDelete
- FleetsClient.BeginUpdate
- FleetsClient.Get
- FleetsClient.ListCredentials
- FleetsClient.NewListByResourceGroupPager
- FleetsClient.NewListBySubscriptionPager
- OperationsClient.NewListPager
- UpdateRunsClient.BeginCreateOrUpdate
- UpdateRunsClient.BeginDelete
- UpdateRunsClient.BeginStart
- UpdateRunsClient.BeginStop
- UpdateRunsClient.Get
- UpdateRunsClient.NewListByFleetPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewFleetMembersClient ¶
func (c *ClientFactory) NewFleetMembersClient() *FleetMembersClient
NewFleetMembersClient creates a new instance of FleetMembersClient.
func (*ClientFactory) NewFleetUpdateStrategiesClient ¶ added in v0.3.0
func (c *ClientFactory) NewFleetUpdateStrategiesClient() *FleetUpdateStrategiesClient
NewFleetUpdateStrategiesClient creates a new instance of FleetUpdateStrategiesClient.
func (*ClientFactory) NewFleetsClient ¶
func (c *ClientFactory) NewFleetsClient() *FleetsClient
NewFleetsClient creates a new instance of FleetsClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewUpdateRunsClient ¶
func (c *ClientFactory) NewUpdateRunsClient() *UpdateRunsClient
NewUpdateRunsClient creates a new instance of UpdateRunsClient.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info any // READ-ONLY; The additional info type. Type *string }
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDetail ¶
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type Fleet ¶
type Fleet struct { // REQUIRED; The geo-location where the resource lives Location *string // Managed identity. Identity *ManagedServiceIdentity // The resource-specific properties for this resource. Properties *FleetProperties // Resource tags. Tags map[string]*string // READ-ONLY; If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. // Entity tags are used for comparing two or more entities from the same requested resource. // HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range // (section 14.27) header fields. ETag *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 }
Fleet - The Fleet resource.
func (Fleet) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Fleet.
func (*Fleet) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Fleet.
type FleetCredentialResult ¶
type FleetCredentialResult struct { // READ-ONLY; The name of the credential. Name *string // READ-ONLY; Base64-encoded Kubernetes configuration file. Value []byte }
FleetCredentialResult - One credential result item.
func (FleetCredentialResult) MarshalJSON ¶
func (f FleetCredentialResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetCredentialResult.
func (*FleetCredentialResult) UnmarshalJSON ¶
func (f *FleetCredentialResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetCredentialResult.
type FleetCredentialResults ¶
type FleetCredentialResults struct { // READ-ONLY; Array of base64-encoded Kubernetes configuration files. Kubeconfigs []*FleetCredentialResult }
FleetCredentialResults - The Credential results response.
func (FleetCredentialResults) MarshalJSON ¶
func (f FleetCredentialResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetCredentialResults.
func (*FleetCredentialResults) UnmarshalJSON ¶
func (f *FleetCredentialResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetCredentialResults.
type FleetListResult ¶
type FleetListResult struct { // REQUIRED; The Fleet items on this page Value []*Fleet // The link to the next page of items NextLink *string }
FleetListResult - The response of a Fleet list operation.
func (FleetListResult) MarshalJSON ¶
func (f FleetListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetListResult.
func (*FleetListResult) UnmarshalJSON ¶
func (f *FleetListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetListResult.
type FleetMember ¶
type FleetMember struct { // The resource-specific properties for this resource. Properties *FleetMemberProperties // READ-ONLY; If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. // Entity tags are used for comparing two or more entities from the same requested resource. // HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range // (section 14.27) header fields. ETag *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 }
FleetMember - A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure.
func (FleetMember) MarshalJSON ¶
func (f FleetMember) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetMember.
func (*FleetMember) UnmarshalJSON ¶
func (f *FleetMember) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetMember.
type FleetMemberListResult ¶
type FleetMemberListResult struct { // REQUIRED; The FleetMember items on this page Value []*FleetMember // The link to the next page of items NextLink *string }
FleetMemberListResult - The response of a FleetMember list operation.
func (FleetMemberListResult) MarshalJSON ¶
func (f FleetMemberListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetMemberListResult.
func (*FleetMemberListResult) UnmarshalJSON ¶
func (f *FleetMemberListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetMemberListResult.
type FleetMemberProperties ¶
type FleetMemberProperties struct { // REQUIRED; The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. ClusterResourceID *string // The group this member belongs to for multi-cluster update management. Group *string // READ-ONLY; The status of the last operation. ProvisioningState *FleetMemberProvisioningState }
FleetMemberProperties - A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure.
func (FleetMemberProperties) MarshalJSON ¶
func (f FleetMemberProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetMemberProperties.
func (*FleetMemberProperties) UnmarshalJSON ¶
func (f *FleetMemberProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetMemberProperties.
type FleetMemberProvisioningState ¶
type FleetMemberProvisioningState string
FleetMemberProvisioningState - The provisioning state of the last accepted operation.
const ( // FleetMemberProvisioningStateCanceled - Resource creation was canceled. FleetMemberProvisioningStateCanceled FleetMemberProvisioningState = "Canceled" // FleetMemberProvisioningStateFailed - Resource creation failed. FleetMemberProvisioningStateFailed FleetMemberProvisioningState = "Failed" // FleetMemberProvisioningStateJoining - The provisioning state of a member joining a fleet. FleetMemberProvisioningStateJoining FleetMemberProvisioningState = "Joining" // FleetMemberProvisioningStateLeaving - The provisioning state of a member leaving a fleet. FleetMemberProvisioningStateLeaving FleetMemberProvisioningState = "Leaving" // FleetMemberProvisioningStateSucceeded - Resource has been created. FleetMemberProvisioningStateSucceeded FleetMemberProvisioningState = "Succeeded" // FleetMemberProvisioningStateUpdating - The provisioning state of a member being updated. FleetMemberProvisioningStateUpdating FleetMemberProvisioningState = "Updating" )
func PossibleFleetMemberProvisioningStateValues ¶
func PossibleFleetMemberProvisioningStateValues() []FleetMemberProvisioningState
PossibleFleetMemberProvisioningStateValues returns the possible values for the FleetMemberProvisioningState const type.
type FleetMemberUpdate ¶
type FleetMemberUpdate struct { // The updatable properties of the FleetMember. Properties *FleetMemberUpdateProperties }
FleetMemberUpdate - The type used for update operations of the FleetMember.
func (FleetMemberUpdate) MarshalJSON ¶
func (f FleetMemberUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetMemberUpdate.
func (*FleetMemberUpdate) UnmarshalJSON ¶
func (f *FleetMemberUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetMemberUpdate.
type FleetMemberUpdateProperties ¶
type FleetMemberUpdateProperties struct { // The group this member belongs to for multi-cluster update management. Group *string }
FleetMemberUpdateProperties - The updatable properties of the FleetMember.
func (FleetMemberUpdateProperties) MarshalJSON ¶
func (f FleetMemberUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetMemberUpdateProperties.
func (*FleetMemberUpdateProperties) UnmarshalJSON ¶
func (f *FleetMemberUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetMemberUpdateProperties.
type FleetMembersClient ¶
type FleetMembersClient struct {
// contains filtered or unexported fields
}
FleetMembersClient contains the methods for the FleetMembers group. Don't use this type directly, use NewFleetMembersClient() instead.
func NewFleetMembersClient ¶
func NewFleetMembersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FleetMembersClient, error)
NewFleetMembersClient creates a new instance of FleetMembersClient 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 (*FleetMembersClient) BeginCreate ¶
func (client *FleetMembersClient) BeginCreate(ctx context.Context, resourceGroupName string, fleetName string, fleetMemberName string, resource FleetMember, options *FleetMembersClientBeginCreateOptions) (*runtime.Poller[FleetMembersClientCreateResponse], error)
BeginCreate - Create a FleetMember If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- fleetMemberName - The name of the Fleet member resource.
- resource - Resource create parameters.
- options - FleetMembersClientBeginCreateOptions contains the optional parameters for the FleetMembersClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Create.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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFleetMembersClient().BeginCreate(ctx, "rg1", "fleet1", "member-1", armcontainerservicefleet.FleetMember{ Properties: &armcontainerservicefleet.FleetMemberProperties{ ClusterResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"), }, }, &armcontainerservicefleet.FleetMembersClientBeginCreateOptions{IfMatch: nil, IfNoneMatch: 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.FleetMember = armcontainerservicefleet.FleetMember{ // Name: to.Ptr("member-1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/members"), // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet-1/members/member-1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // CreatedBy: to.Ptr("someUser"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // LastModifiedBy: to.Ptr("someOtherUser"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("23ujdflewrj3="), // Properties: &armcontainerservicefleet.FleetMemberProperties{ // ClusterResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"), // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetMemberProvisioningStateSucceeded), // }, // } }
Output:
func (*FleetMembersClient) BeginDelete ¶
func (client *FleetMembersClient) BeginDelete(ctx context.Context, resourceGroupName string, fleetName string, fleetMemberName string, options *FleetMembersClientBeginDeleteOptions) (*runtime.Poller[FleetMembersClientDeleteResponse], error)
BeginDelete - Delete a FleetMember If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- fleetMemberName - The name of the Fleet member resource.
- options - FleetMembersClientBeginDeleteOptions contains the optional parameters for the FleetMembersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFleetMembersClient().BeginDelete(ctx, "rg1", "fleet1", "member-1", &armcontainerservicefleet.FleetMembersClientBeginDeleteOptions{IfMatch: 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 (*FleetMembersClient) BeginUpdate ¶ added in v0.2.0
func (client *FleetMembersClient) BeginUpdate(ctx context.Context, resourceGroupName string, fleetName string, fleetMemberName string, properties FleetMemberUpdate, options *FleetMembersClientBeginUpdateOptions) (*runtime.Poller[FleetMembersClientUpdateResponse], error)
BeginUpdate - Update a FleetMember If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- fleetMemberName - The name of the Fleet member resource.
- properties - The resource properties to be updated.
- options - FleetMembersClientBeginUpdateOptions contains the optional parameters for the FleetMembersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFleetMembersClient().BeginUpdate(ctx, "rg1", "fleet1", "member-1", armcontainerservicefleet.FleetMemberUpdate{ Properties: &armcontainerservicefleet.FleetMemberUpdateProperties{ Group: to.Ptr("staging"), }, }, &armcontainerservicefleet.FleetMembersClientBeginUpdateOptions{IfMatch: 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.FleetMember = armcontainerservicefleet.FleetMember{ // Name: to.Ptr("member-1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/members"), // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet-1/members/member-1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // CreatedBy: to.Ptr("someUser"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // LastModifiedBy: to.Ptr("someOtherUser"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("23ujdflewrj3="), // Properties: &armcontainerservicefleet.FleetMemberProperties{ // ClusterResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"), // Group: to.Ptr("staging"), // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetMemberProvisioningStateSucceeded), // }, // } }
Output:
func (*FleetMembersClient) Get ¶
func (client *FleetMembersClient) Get(ctx context.Context, resourceGroupName string, fleetName string, fleetMemberName string, options *FleetMembersClientGetOptions) (FleetMembersClientGetResponse, error)
Get - Get a FleetMember If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- fleetMemberName - The name of the Fleet member resource.
- options - FleetMembersClientGetOptions contains the optional parameters for the FleetMembersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFleetMembersClient().Get(ctx, "rg1", "fleet1", "member-1", 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.FleetMember = armcontainerservicefleet.FleetMember{ // Name: to.Ptr("member-1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/members"), // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet-1/members/member-1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // CreatedBy: to.Ptr("someUser"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // LastModifiedBy: to.Ptr("someOtherUser"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("kd30rkdfo49="), // Properties: &armcontainerservicefleet.FleetMemberProperties{ // ClusterResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"), // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetMemberProvisioningStateSucceeded), // }, // } }
Output:
func (*FleetMembersClient) NewListByFleetPager ¶
func (client *FleetMembersClient) NewListByFleetPager(resourceGroupName string, fleetName string, options *FleetMembersClientListByFleetOptions) *runtime.Pager[FleetMembersClientListByFleetResponse]
NewListByFleetPager - List FleetMember resources by Fleet
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- options - FleetMembersClientListByFleetOptions contains the optional parameters for the FleetMembersClient.NewListByFleetPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_ListByFleet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFleetMembersClient().NewListByFleetPager("rg1", "fleet1", 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.FleetMemberListResult = armcontainerservicefleet.FleetMemberListResult{ // Value: []*armcontainerservicefleet.FleetMember{ // { // Name: to.Ptr("member-1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/members"), // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet-1/members/member-1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // CreatedBy: to.Ptr("someUser"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // LastModifiedBy: to.Ptr("someOtherUser"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("kd30rkdfo49="), // Properties: &armcontainerservicefleet.FleetMemberProperties{ // ClusterResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"), // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetMemberProvisioningStateSucceeded), // }, // }}, // } } }
Output:
type FleetMembersClientBeginCreateOptions ¶
type FleetMembersClientBeginCreateOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // The request should only proceed if no entity matches this string. IfNoneMatch *string // Resumes the LRO from the provided token. ResumeToken string }
FleetMembersClientBeginCreateOptions contains the optional parameters for the FleetMembersClient.BeginCreate method.
type FleetMembersClientBeginDeleteOptions ¶
type FleetMembersClientBeginDeleteOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
FleetMembersClientBeginDeleteOptions contains the optional parameters for the FleetMembersClient.BeginDelete method.
type FleetMembersClientBeginUpdateOptions ¶ added in v0.2.0
type FleetMembersClientBeginUpdateOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
FleetMembersClientBeginUpdateOptions contains the optional parameters for the FleetMembersClient.BeginUpdate method.
type FleetMembersClientCreateResponse ¶
type FleetMembersClientCreateResponse struct { // A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. FleetMember }
FleetMembersClientCreateResponse contains the response from method FleetMembersClient.BeginCreate.
type FleetMembersClientDeleteResponse ¶
type FleetMembersClientDeleteResponse struct { }
FleetMembersClientDeleteResponse contains the response from method FleetMembersClient.BeginDelete.
type FleetMembersClientGetOptions ¶
type FleetMembersClientGetOptions struct { }
FleetMembersClientGetOptions contains the optional parameters for the FleetMembersClient.Get method.
type FleetMembersClientGetResponse ¶
type FleetMembersClientGetResponse struct { // A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. FleetMember }
FleetMembersClientGetResponse contains the response from method FleetMembersClient.Get.
type FleetMembersClientListByFleetOptions ¶
type FleetMembersClientListByFleetOptions struct { }
FleetMembersClientListByFleetOptions contains the optional parameters for the FleetMembersClient.NewListByFleetPager method.
type FleetMembersClientListByFleetResponse ¶
type FleetMembersClientListByFleetResponse struct { // The response of a FleetMember list operation. FleetMemberListResult }
FleetMembersClientListByFleetResponse contains the response from method FleetMembersClient.NewListByFleetPager.
type FleetMembersClientUpdateResponse ¶
type FleetMembersClientUpdateResponse struct { // A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. FleetMember }
FleetMembersClientUpdateResponse contains the response from method FleetMembersClient.BeginUpdate.
type FleetPatch ¶
type FleetPatch struct { // Managed identity. Identity *ManagedServiceIdentity // Resource tags. Tags map[string]*string }
FleetPatch - Properties of a Fleet that can be patched.
func (FleetPatch) MarshalJSON ¶
func (f FleetPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetPatch.
func (*FleetPatch) UnmarshalJSON ¶
func (f *FleetPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetPatch.
type FleetProperties ¶
type FleetProperties struct { // READ-ONLY; The status of the last operation. ProvisioningState *FleetProvisioningState }
FleetProperties - Fleet properties.
func (FleetProperties) MarshalJSON ¶
func (f FleetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetProperties.
func (*FleetProperties) UnmarshalJSON ¶
func (f *FleetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetProperties.
type FleetProvisioningState ¶
type FleetProvisioningState string
FleetProvisioningState - The provisioning state of the last accepted operation.
const ( // FleetProvisioningStateCanceled - Resource creation was canceled. FleetProvisioningStateCanceled FleetProvisioningState = "Canceled" // FleetProvisioningStateCreating - The provisioning state of a fleet being created. FleetProvisioningStateCreating FleetProvisioningState = "Creating" // FleetProvisioningStateDeleting - The provisioning state of a fleet being deleted. FleetProvisioningStateDeleting FleetProvisioningState = "Deleting" // FleetProvisioningStateFailed - Resource creation failed. FleetProvisioningStateFailed FleetProvisioningState = "Failed" // FleetProvisioningStateSucceeded - Resource has been created. FleetProvisioningStateSucceeded FleetProvisioningState = "Succeeded" // FleetProvisioningStateUpdating - The provisioning state of a fleet being updated. FleetProvisioningStateUpdating FleetProvisioningState = "Updating" )
func PossibleFleetProvisioningStateValues ¶
func PossibleFleetProvisioningStateValues() []FleetProvisioningState
PossibleFleetProvisioningStateValues returns the possible values for the FleetProvisioningState const type.
type FleetUpdateStrategiesClient ¶ added in v0.3.0
type FleetUpdateStrategiesClient struct {
// contains filtered or unexported fields
}
FleetUpdateStrategiesClient contains the methods for the FleetUpdateStrategies group. Don't use this type directly, use NewFleetUpdateStrategiesClient() instead.
func NewFleetUpdateStrategiesClient ¶ added in v0.3.0
func NewFleetUpdateStrategiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FleetUpdateStrategiesClient, error)
NewFleetUpdateStrategiesClient creates a new instance of FleetUpdateStrategiesClient 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 (*FleetUpdateStrategiesClient) BeginCreateOrUpdate ¶ added in v0.3.0
func (client *FleetUpdateStrategiesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, updateStrategyName string, resource FleetUpdateStrategy, options *FleetUpdateStrategiesClientBeginCreateOrUpdateOptions) (*runtime.Poller[FleetUpdateStrategiesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a FleetUpdateStrategy If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- updateStrategyName - The name of the UpdateStrategy resource.
- resource - Resource create parameters.
- options - FleetUpdateStrategiesClientBeginCreateOrUpdateOptions contains the optional parameters for the FleetUpdateStrategiesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFleetUpdateStrategiesClient().BeginCreateOrUpdate(ctx, "rg1", "fleet1", "strartegy1", armcontainerservicefleet.FleetUpdateStrategy{ Properties: &armcontainerservicefleet.FleetUpdateStrategyProperties{ Strategy: &armcontainerservicefleet.UpdateRunStrategy{ Stages: []*armcontainerservicefleet.UpdateStage{ { Name: to.Ptr("stage1"), AfterStageWaitInSeconds: to.Ptr[int32](3600), Groups: []*armcontainerservicefleet.UpdateGroup{ { Name: to.Ptr("group-a"), }}, }}, }, }, }, &armcontainerservicefleet.FleetUpdateStrategiesClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: 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.FleetUpdateStrategy = armcontainerservicefleet.FleetUpdateStrategy{ // Name: to.Ptr("strategy1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/updateStrategies"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // CreatedBy: to.Ptr("@contoso.com"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // LastModifiedBy: to.Ptr("@contoso.com"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("\"EtagValue\""), // Properties: &armcontainerservicefleet.FleetUpdateStrategyProperties{ // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetUpdateStrategyProvisioningStateSucceeded), // Strategy: &armcontainerservicefleet.UpdateRunStrategy{ // Stages: []*armcontainerservicefleet.UpdateStage{ // { // Name: to.Ptr("stage1"), // AfterStageWaitInSeconds: to.Ptr[int32](3600), // Groups: []*armcontainerservicefleet.UpdateGroup{ // { // Name: to.Ptr("group-a"), // }}, // }}, // }, // }, // } }
Output:
func (*FleetUpdateStrategiesClient) BeginDelete ¶ added in v0.3.0
func (client *FleetUpdateStrategiesClient) BeginDelete(ctx context.Context, resourceGroupName string, fleetName string, updateStrategyName string, options *FleetUpdateStrategiesClientBeginDeleteOptions) (*runtime.Poller[FleetUpdateStrategiesClientDeleteResponse], error)
BeginDelete - Delete a FleetUpdateStrategy If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- updateStrategyName - The name of the UpdateStrategy resource.
- options - FleetUpdateStrategiesClientBeginDeleteOptions contains the optional parameters for the FleetUpdateStrategiesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFleetUpdateStrategiesClient().BeginDelete(ctx, "rg1", "fleet1", "strategy1", &armcontainerservicefleet.FleetUpdateStrategiesClientBeginDeleteOptions{IfMatch: 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 (*FleetUpdateStrategiesClient) Get ¶ added in v0.3.0
func (client *FleetUpdateStrategiesClient) Get(ctx context.Context, resourceGroupName string, fleetName string, updateStrategyName string, options *FleetUpdateStrategiesClientGetOptions) (FleetUpdateStrategiesClientGetResponse, error)
Get - Get a FleetUpdateStrategy If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- updateStrategyName - The name of the UpdateStrategy resource.
- options - FleetUpdateStrategiesClientGetOptions contains the optional parameters for the FleetUpdateStrategiesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFleetUpdateStrategiesClient().Get(ctx, "rg1", "fleet1", "strategy1", 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.FleetUpdateStrategy = armcontainerservicefleet.FleetUpdateStrategy{ // Name: to.Ptr("strategy1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/updateStrategies"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // CreatedBy: to.Ptr("@contoso.com"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // LastModifiedBy: to.Ptr("@contoso.com"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("\"EtagValue\""), // Properties: &armcontainerservicefleet.FleetUpdateStrategyProperties{ // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetUpdateStrategyProvisioningStateSucceeded), // Strategy: &armcontainerservicefleet.UpdateRunStrategy{ // Stages: []*armcontainerservicefleet.UpdateStage{ // { // Name: to.Ptr("stage1"), // AfterStageWaitInSeconds: to.Ptr[int32](3600), // Groups: []*armcontainerservicefleet.UpdateGroup{ // { // Name: to.Ptr("group-a"), // }}, // }}, // }, // }, // } }
Output:
func (*FleetUpdateStrategiesClient) NewListByFleetPager ¶ added in v0.3.0
func (client *FleetUpdateStrategiesClient) NewListByFleetPager(resourceGroupName string, fleetName string, options *FleetUpdateStrategiesClientListByFleetOptions) *runtime.Pager[FleetUpdateStrategiesClientListByFleetResponse]
NewListByFleetPager - List FleetUpdateStrategy resources by Fleet
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- options - FleetUpdateStrategiesClientListByFleetOptions contains the optional parameters for the FleetUpdateStrategiesClient.NewListByFleetPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_ListByFleet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFleetUpdateStrategiesClient().NewListByFleetPager("rg1", "fleet1", 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.FleetUpdateStrategyListResult = armcontainerservicefleet.FleetUpdateStrategyListResult{ // Value: []*armcontainerservicefleet.FleetUpdateStrategy{ // { // Name: to.Ptr("strategy1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/updateStrategies"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // CreatedBy: to.Ptr("@contoso.com"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // LastModifiedBy: to.Ptr("@contoso.com"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("\"EtagValue\""), // Properties: &armcontainerservicefleet.FleetUpdateStrategyProperties{ // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetUpdateStrategyProvisioningStateSucceeded), // Strategy: &armcontainerservicefleet.UpdateRunStrategy{ // Stages: []*armcontainerservicefleet.UpdateStage{ // { // Name: to.Ptr("stage1"), // AfterStageWaitInSeconds: to.Ptr[int32](3600), // Groups: []*armcontainerservicefleet.UpdateGroup{ // { // Name: to.Ptr("group-a"), // }}, // }}, // }, // }, // }}, // } } }
Output:
type FleetUpdateStrategiesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type FleetUpdateStrategiesClientBeginCreateOrUpdateOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // The request should only proceed if no entity matches this string. IfNoneMatch *string // Resumes the LRO from the provided token. ResumeToken string }
FleetUpdateStrategiesClientBeginCreateOrUpdateOptions contains the optional parameters for the FleetUpdateStrategiesClient.BeginCreateOrUpdate method.
type FleetUpdateStrategiesClientBeginDeleteOptions ¶ added in v0.3.0
type FleetUpdateStrategiesClientBeginDeleteOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
FleetUpdateStrategiesClientBeginDeleteOptions contains the optional parameters for the FleetUpdateStrategiesClient.BeginDelete method.
type FleetUpdateStrategiesClientCreateOrUpdateResponse ¶ added in v0.3.0
type FleetUpdateStrategiesClientCreateOrUpdateResponse struct { // Defines a multi-stage process to perform update operations across members of a Fleet. FleetUpdateStrategy }
FleetUpdateStrategiesClientCreateOrUpdateResponse contains the response from method FleetUpdateStrategiesClient.BeginCreateOrUpdate.
type FleetUpdateStrategiesClientDeleteResponse ¶ added in v0.3.0
type FleetUpdateStrategiesClientDeleteResponse struct { }
FleetUpdateStrategiesClientDeleteResponse contains the response from method FleetUpdateStrategiesClient.BeginDelete.
type FleetUpdateStrategiesClientGetOptions ¶ added in v0.3.0
type FleetUpdateStrategiesClientGetOptions struct { }
FleetUpdateStrategiesClientGetOptions contains the optional parameters for the FleetUpdateStrategiesClient.Get method.
type FleetUpdateStrategiesClientGetResponse ¶ added in v0.3.0
type FleetUpdateStrategiesClientGetResponse struct { // Defines a multi-stage process to perform update operations across members of a Fleet. FleetUpdateStrategy }
FleetUpdateStrategiesClientGetResponse contains the response from method FleetUpdateStrategiesClient.Get.
type FleetUpdateStrategiesClientListByFleetOptions ¶ added in v0.3.0
type FleetUpdateStrategiesClientListByFleetOptions struct { }
FleetUpdateStrategiesClientListByFleetOptions contains the optional parameters for the FleetUpdateStrategiesClient.NewListByFleetPager method.
type FleetUpdateStrategiesClientListByFleetResponse ¶ added in v0.3.0
type FleetUpdateStrategiesClientListByFleetResponse struct { // The response of a FleetUpdateStrategy list operation. FleetUpdateStrategyListResult }
FleetUpdateStrategiesClientListByFleetResponse contains the response from method FleetUpdateStrategiesClient.NewListByFleetPager.
type FleetUpdateStrategy ¶ added in v0.3.0
type FleetUpdateStrategy struct { // The resource-specific properties for this resource. Properties *FleetUpdateStrategyProperties // READ-ONLY; If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. // Entity tags are used for comparing two or more entities from the same requested resource. // HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range // (section 14.27) header fields. ETag *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 }
FleetUpdateStrategy - Defines a multi-stage process to perform update operations across members of a Fleet.
func (FleetUpdateStrategy) MarshalJSON ¶ added in v0.3.0
func (f FleetUpdateStrategy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetUpdateStrategy.
func (*FleetUpdateStrategy) UnmarshalJSON ¶ added in v0.3.0
func (f *FleetUpdateStrategy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetUpdateStrategy.
type FleetUpdateStrategyListResult ¶ added in v0.3.0
type FleetUpdateStrategyListResult struct { // REQUIRED; The FleetUpdateStrategy items on this page Value []*FleetUpdateStrategy // The link to the next page of items NextLink *string }
FleetUpdateStrategyListResult - The response of a FleetUpdateStrategy list operation.
func (FleetUpdateStrategyListResult) MarshalJSON ¶ added in v0.3.0
func (f FleetUpdateStrategyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetUpdateStrategyListResult.
func (*FleetUpdateStrategyListResult) UnmarshalJSON ¶ added in v0.3.0
func (f *FleetUpdateStrategyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetUpdateStrategyListResult.
type FleetUpdateStrategyProperties ¶ added in v0.3.0
type FleetUpdateStrategyProperties struct { // REQUIRED; Defines the update sequence of the clusters. Strategy *UpdateRunStrategy // READ-ONLY; The provisioning state of the UpdateStrategy resource. ProvisioningState *FleetUpdateStrategyProvisioningState }
FleetUpdateStrategyProperties - The properties of the UpdateStrategy.
func (FleetUpdateStrategyProperties) MarshalJSON ¶ added in v0.3.0
func (f FleetUpdateStrategyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FleetUpdateStrategyProperties.
func (*FleetUpdateStrategyProperties) UnmarshalJSON ¶ added in v0.3.0
func (f *FleetUpdateStrategyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FleetUpdateStrategyProperties.
type FleetUpdateStrategyProvisioningState ¶ added in v0.3.0
type FleetUpdateStrategyProvisioningState string
FleetUpdateStrategyProvisioningState - The provisioning state of the UpdateStrategy resource.
const ( // FleetUpdateStrategyProvisioningStateCanceled - Resource creation was canceled. FleetUpdateStrategyProvisioningStateCanceled FleetUpdateStrategyProvisioningState = "Canceled" // FleetUpdateStrategyProvisioningStateFailed - Resource creation failed. FleetUpdateStrategyProvisioningStateFailed FleetUpdateStrategyProvisioningState = "Failed" // FleetUpdateStrategyProvisioningStateSucceeded - Resource has been created. FleetUpdateStrategyProvisioningStateSucceeded FleetUpdateStrategyProvisioningState = "Succeeded" )
func PossibleFleetUpdateStrategyProvisioningStateValues ¶ added in v0.3.0
func PossibleFleetUpdateStrategyProvisioningStateValues() []FleetUpdateStrategyProvisioningState
PossibleFleetUpdateStrategyProvisioningStateValues returns the possible values for the FleetUpdateStrategyProvisioningState const type.
type FleetsClient ¶
type FleetsClient struct {
// contains filtered or unexported fields
}
FleetsClient contains the methods for the Fleets group. Don't use this type directly, use NewFleetsClient() instead.
func NewFleetsClient ¶
func NewFleetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FleetsClient, error)
NewFleetsClient creates a new instance of FleetsClient 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 (*FleetsClient) BeginCreateOrUpdate ¶
func (client *FleetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, resource Fleet, options *FleetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FleetsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a Fleet. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- resource - Resource create parameters.
- options - FleetsClientBeginCreateOrUpdateOptions contains the optional parameters for the FleetsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFleetsClient().BeginCreateOrUpdate(ctx, "rg1", "fleet1", armcontainerservicefleet.Fleet{ Location: to.Ptr("East US"), Tags: map[string]*string{ "archv2": to.Ptr(""), "tier": to.Ptr("production"), }, Properties: &armcontainerservicefleet.FleetProperties{}, }, &armcontainerservicefleet.FleetsClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: 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.Fleet = armcontainerservicefleet.Fleet{ // Name: to.Ptr("fleet-1"), // Type: to.Ptr("Microsoft.ContainerService/fleets"), // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet-1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // CreatedBy: to.Ptr("someUser"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // LastModifiedBy: to.Ptr("someOtherUser"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "archv2": to.Ptr(""), // "tier": to.Ptr("production"), // }, // ETag: to.Ptr("23ujdflewrj3="), // Properties: &armcontainerservicefleet.FleetProperties{ // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetProvisioningStateSucceeded), // }, // } }
Output:
func (*FleetsClient) BeginDelete ¶
func (client *FleetsClient) BeginDelete(ctx context.Context, resourceGroupName string, fleetName string, options *FleetsClientBeginDeleteOptions) (*runtime.Poller[FleetsClientDeleteResponse], error)
BeginDelete - Delete a Fleet If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- options - FleetsClientBeginDeleteOptions contains the optional parameters for the FleetsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFleetsClient().BeginDelete(ctx, "rg1", "fleet1", &armcontainerservicefleet.FleetsClientBeginDeleteOptions{IfMatch: 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 (*FleetsClient) BeginUpdate ¶ added in v0.2.0
func (client *FleetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, fleetName string, properties FleetPatch, options *FleetsClientBeginUpdateOptions) (*runtime.Poller[FleetsClientUpdateResponse], error)
BeginUpdate - Update a Fleet If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- properties - The resource properties to be updated.
- options - FleetsClientBeginUpdateOptions contains the optional parameters for the FleetsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_PatchTags.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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFleetsClient().BeginUpdate(ctx, "rg1", "fleet1", armcontainerservicefleet.FleetPatch{ Tags: map[string]*string{ "env": to.Ptr("prod"), "tier": to.Ptr("secure"), }, }, &armcontainerservicefleet.FleetsClientBeginUpdateOptions{IfMatch: to.Ptr("dfjkwelr7384")}) 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.Fleet = armcontainerservicefleet.Fleet{ // Name: to.Ptr("fleet-1"), // Type: to.Ptr("Microsoft.ContainerService/fleets"), // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet-1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // CreatedBy: to.Ptr("someUser"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // LastModifiedBy: to.Ptr("someOtherUser"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "env": to.Ptr("prod"), // "tier": to.Ptr("secure"), // }, // ETag: to.Ptr("23ujdflewrj3="), // Properties: &armcontainerservicefleet.FleetProperties{ // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetProvisioningStateSucceeded), // }, // } }
Output:
func (*FleetsClient) Get ¶
func (client *FleetsClient) Get(ctx context.Context, resourceGroupName string, fleetName string, options *FleetsClientGetOptions) (FleetsClientGetResponse, error)
Get - Gets a Fleet. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- options - FleetsClientGetOptions contains the optional parameters for the FleetsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFleetsClient().Get(ctx, "rg1", "fleet1", 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.Fleet = armcontainerservicefleet.Fleet{ // Name: to.Ptr("fleet-1"), // Type: to.Ptr("Microsoft.ContainerService/fleets"), // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet-1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // CreatedBy: to.Ptr("someUser"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // LastModifiedBy: to.Ptr("someOtherUser"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "archv2": to.Ptr(""), // "tier": to.Ptr("production"), // }, // ETag: to.Ptr("23ujdflewrj3="), // Properties: &armcontainerservicefleet.FleetProperties{ // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetProvisioningStateSucceeded), // }, // } }
Output:
func (*FleetsClient) ListCredentials ¶
func (client *FleetsClient) ListCredentials(ctx context.Context, resourceGroupName string, fleetName string, options *FleetsClientListCredentialsOptions) (FleetsClientListCredentialsResponse, error)
ListCredentials - Lists the user credentials of a Fleet. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- options - FleetsClientListCredentialsOptions contains the optional parameters for the FleetsClient.ListCredentials method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListCredentialsResult.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFleetsClient().ListCredentials(ctx, "rg1", "fleet", 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.FleetCredentialResults = armcontainerservicefleet.FleetCredentialResults{ // Kubeconfigs: []*armcontainerservicefleet.FleetCredentialResult{ // { // Name: to.Ptr("credentialName1"), // Value: []byte("Y3JlZGVudGlhbFZhbHVlMQ=="), // }}, // } }
Output:
func (*FleetsClient) NewListByResourceGroupPager ¶
func (client *FleetsClient) NewListByResourceGroupPager(resourceGroupName string, options *FleetsClientListByResourceGroupOptions) *runtime.Pager[FleetsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists fleets in the specified subscription and resource group.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - FleetsClientListByResourceGroupOptions contains the optional parameters for the FleetsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFleetsClient().NewListByResourceGroupPager("rg1", 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.FleetListResult = armcontainerservicefleet.FleetListResult{ // Value: []*armcontainerservicefleet.Fleet{ // { // Name: to.Ptr("fleet1"), // Type: to.Ptr("Microsoft.ContainerService/fleets"), // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet-1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // CreatedBy: to.Ptr("someUser"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // LastModifiedBy: to.Ptr("someOtherUser"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "archv2": to.Ptr(""), // "tier": to.Ptr("production"), // }, // ETag: to.Ptr("23ujdflewrj3="), // Properties: &armcontainerservicefleet.FleetProperties{ // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*FleetsClient) NewListBySubscriptionPager ¶
func (client *FleetsClient) NewListBySubscriptionPager(options *FleetsClientListBySubscriptionOptions) *runtime.Pager[FleetsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Lists fleets in the specified subscription.
Generated from API version 2023-10-15
- options - FleetsClientListBySubscriptionOptions contains the optional parameters for the FleetsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListBySub.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFleetsClient().NewListBySubscriptionPager(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.FleetListResult = armcontainerservicefleet.FleetListResult{ // Value: []*armcontainerservicefleet.Fleet{ // { // Name: to.Ptr("fleet-1"), // Type: to.Ptr("Microsoft.ContainerService/fleets"), // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // CreatedBy: to.Ptr("someUser"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-23T05:40:40.657Z"); return t}()), // LastModifiedBy: to.Ptr("someOtherUser"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "archv2": to.Ptr(""), // "tier": to.Ptr("production"), // }, // ETag: to.Ptr("23ujdflewrj3="), // Properties: &armcontainerservicefleet.FleetProperties{ // ProvisioningState: to.Ptr(armcontainerservicefleet.FleetProvisioningStateSucceeded), // }, // }}, // } } }
Output:
type FleetsClientBeginCreateOrUpdateOptions ¶
type FleetsClientBeginCreateOrUpdateOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // The request should only proceed if no entity matches this string. IfNoneMatch *string // Resumes the LRO from the provided token. ResumeToken string }
FleetsClientBeginCreateOrUpdateOptions contains the optional parameters for the FleetsClient.BeginCreateOrUpdate method.
type FleetsClientBeginDeleteOptions ¶
type FleetsClientBeginDeleteOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
FleetsClientBeginDeleteOptions contains the optional parameters for the FleetsClient.BeginDelete method.
type FleetsClientBeginUpdateOptions ¶ added in v0.2.0
type FleetsClientBeginUpdateOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
FleetsClientBeginUpdateOptions contains the optional parameters for the FleetsClient.BeginUpdate method.
type FleetsClientCreateOrUpdateResponse ¶
type FleetsClientCreateOrUpdateResponse struct { // The Fleet resource. Fleet }
FleetsClientCreateOrUpdateResponse contains the response from method FleetsClient.BeginCreateOrUpdate.
type FleetsClientDeleteResponse ¶
type FleetsClientDeleteResponse struct { }
FleetsClientDeleteResponse contains the response from method FleetsClient.BeginDelete.
type FleetsClientGetOptions ¶
type FleetsClientGetOptions struct { }
FleetsClientGetOptions contains the optional parameters for the FleetsClient.Get method.
type FleetsClientGetResponse ¶
type FleetsClientGetResponse struct { // The Fleet resource. Fleet }
FleetsClientGetResponse contains the response from method FleetsClient.Get.
type FleetsClientListByResourceGroupOptions ¶
type FleetsClientListByResourceGroupOptions struct { }
FleetsClientListByResourceGroupOptions contains the optional parameters for the FleetsClient.NewListByResourceGroupPager method.
type FleetsClientListByResourceGroupResponse ¶
type FleetsClientListByResourceGroupResponse struct { // The response of a Fleet list operation. FleetListResult }
FleetsClientListByResourceGroupResponse contains the response from method FleetsClient.NewListByResourceGroupPager.
type FleetsClientListBySubscriptionOptions ¶
type FleetsClientListBySubscriptionOptions struct { }
FleetsClientListBySubscriptionOptions contains the optional parameters for the FleetsClient.NewListBySubscriptionPager method.
type FleetsClientListBySubscriptionResponse ¶
type FleetsClientListBySubscriptionResponse struct { // The response of a Fleet list operation. FleetListResult }
FleetsClientListBySubscriptionResponse contains the response from method FleetsClient.NewListBySubscriptionPager.
type FleetsClientListCredentialsOptions ¶
type FleetsClientListCredentialsOptions struct { }
FleetsClientListCredentialsOptions contains the optional parameters for the FleetsClient.ListCredentials method.
type FleetsClientListCredentialsResponse ¶
type FleetsClientListCredentialsResponse struct { // The Credential results response. FleetCredentialResults }
FleetsClientListCredentialsResponse contains the response from method FleetsClient.ListCredentials.
type FleetsClientUpdateResponse ¶
type FleetsClientUpdateResponse struct { // The Fleet resource. Fleet }
FleetsClientUpdateResponse contains the response from method FleetsClient.BeginUpdate.
type ManagedClusterUpdate ¶
type ManagedClusterUpdate struct { // REQUIRED; The upgrade to apply to the ManagedClusters. Upgrade *ManagedClusterUpgradeSpec // The node image upgrade to be applied to the target nodes in update run. NodeImageSelection *NodeImageSelection }
ManagedClusterUpdate - The update to be applied to the ManagedClusters.
func (ManagedClusterUpdate) MarshalJSON ¶
func (m ManagedClusterUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpdate.
func (*ManagedClusterUpdate) UnmarshalJSON ¶
func (m *ManagedClusterUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterUpdate.
type ManagedClusterUpgradeSpec ¶
type ManagedClusterUpgradeSpec struct { // REQUIRED; The upgrade type. Full requires the KubernetesVersion property to be set. NodeImageOnly requires the KubernetesVersion // property not to be set. Type *ManagedClusterUpgradeType // The Kubernetes version to upgrade the member clusters to. KubernetesVersion *string }
ManagedClusterUpgradeSpec - The upgrade to apply to a ManagedCluster.
func (ManagedClusterUpgradeSpec) MarshalJSON ¶
func (m ManagedClusterUpgradeSpec) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpgradeSpec.
func (*ManagedClusterUpgradeSpec) UnmarshalJSON ¶
func (m *ManagedClusterUpgradeSpec) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterUpgradeSpec.
type ManagedClusterUpgradeType ¶
type ManagedClusterUpgradeType string
ManagedClusterUpgradeType - The type of upgrade to perform when targeting ManagedClusters.
const ( // ManagedClusterUpgradeTypeFull - Full upgrades the control plane and all agent pools of the target ManagedClusters. ManagedClusterUpgradeTypeFull ManagedClusterUpgradeType = "Full" // ManagedClusterUpgradeTypeNodeImageOnly - NodeImageOnly upgrades only the node images of the target ManagedClusters. ManagedClusterUpgradeTypeNodeImageOnly ManagedClusterUpgradeType = "NodeImageOnly" )
func PossibleManagedClusterUpgradeTypeValues ¶
func PossibleManagedClusterUpgradeTypeValues() []ManagedClusterUpgradeType
PossibleManagedClusterUpgradeTypeValues returns the possible values for the ManagedClusterUpgradeType const type.
type ManagedServiceIdentity ¶ added in v0.2.0
type ManagedServiceIdentity struct { // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Type *ManagedServiceIdentityType // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM // resource ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. // The dictionary values can be empty objects ({}) in // requests. UserAssignedIdentities map[string]*UserAssignedIdentity // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned // identity. PrincipalID *string // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. TenantID *string }
ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)
func (ManagedServiceIdentity) MarshalJSON ¶ added in v0.2.0
func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.
func (*ManagedServiceIdentity) UnmarshalJSON ¶ added in v0.2.0
func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.
type ManagedServiceIdentityType ¶ added in v0.2.0
type ManagedServiceIdentityType string
ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
const ( ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned" ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" )
func PossibleManagedServiceIdentityTypeValues ¶ added in v0.2.0
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType
PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.
type MemberUpdateStatus ¶
type MemberUpdateStatus struct { // READ-ONLY; The Azure resource id of the target Kubernetes cluster. ClusterResourceID *string // READ-ONLY; The status message after processing the member update operation. Message *string // READ-ONLY; The name of the FleetMember. Name *string // READ-ONLY; The operation resource id of the latest attempt to perform the operation. OperationID *string // READ-ONLY; The status of the MemberUpdate operation. Status *UpdateStatus }
MemberUpdateStatus - The status of a member update operation.
func (MemberUpdateStatus) MarshalJSON ¶
func (m MemberUpdateStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MemberUpdateStatus.
func (*MemberUpdateStatus) UnmarshalJSON ¶
func (m *MemberUpdateStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MemberUpdateStatus.
type NodeImageSelection ¶ added in v0.2.0
type NodeImageSelection struct { // REQUIRED; The node image upgrade type. Type *NodeImageSelectionType }
NodeImageSelection - The node image upgrade to be applied to the target nodes in update run.
func (NodeImageSelection) MarshalJSON ¶ added in v0.2.0
func (n NodeImageSelection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NodeImageSelection.
func (*NodeImageSelection) UnmarshalJSON ¶ added in v0.2.0
func (n *NodeImageSelection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NodeImageSelection.
type NodeImageSelectionStatus ¶ added in v0.2.0
type NodeImageSelectionStatus struct { // READ-ONLY; The image versions to upgrade the nodes to. SelectedNodeImageVersions []*NodeImageVersion }
NodeImageSelectionStatus - The node image upgrade specs for the update run.
func (NodeImageSelectionStatus) MarshalJSON ¶ added in v0.2.0
func (n NodeImageSelectionStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NodeImageSelectionStatus.
func (*NodeImageSelectionStatus) UnmarshalJSON ¶ added in v0.2.0
func (n *NodeImageSelectionStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NodeImageSelectionStatus.
type NodeImageSelectionType ¶ added in v0.2.0
type NodeImageSelectionType string
NodeImageSelectionType - The node image upgrade type.
const ( // NodeImageSelectionTypeConsistent - The image versions to upgrade nodes to are selected as described below: for each node // pool in managed clusters affected by the update run, the system selects the latest image version such that it is available // across all other node pools (in all other clusters) of the same image type. As a result, all node pools of the same image // type will be upgraded to the same image version. For example, if the latest image version for image type 'AKSUbuntu-1804gen2containerd' // is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and is 'AKSUbuntu-1804gen2containerd-2021.10.17' // for a node pool in cluster B in region Y, the system will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'. NodeImageSelectionTypeConsistent NodeImageSelectionType = "Consistent" // NodeImageSelectionTypeLatest - Use the latest image version when upgrading nodes. Clusters may use different image versions // (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because, for example, the // latest available version is different in different regions. NodeImageSelectionTypeLatest NodeImageSelectionType = "Latest" )
func PossibleNodeImageSelectionTypeValues ¶ added in v0.2.0
func PossibleNodeImageSelectionTypeValues() []NodeImageSelectionType
PossibleNodeImageSelectionTypeValues returns the possible values for the NodeImageSelectionType const type.
type NodeImageVersion ¶ added in v0.2.0
type NodeImageVersion struct { // READ-ONLY; The image version to upgrade the nodes to (e.g., 'AKSUbuntu-1804gen2containerd-2022.12.13'). Version *string }
NodeImageVersion - The node upgrade image version.
func (NodeImageVersion) MarshalJSON ¶ added in v0.2.0
func (n NodeImageVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NodeImageVersion.
func (*NodeImageVersion) UnmarshalJSON ¶ added in v0.2.0
func (n *NodeImageVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NodeImageVersion.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - List the operations for the provider
Generated from API version 2023-10-15
- 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/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.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.OperationListResult = armcontainerservicefleet.OperationListResult{ // Value: []*armcontainerservicefleet.Operation{ // { // Name: to.Ptr("Microsoft.ContainerService/locations/operations/read"), // Display: &armcontainerservicefleet.OperationDisplay{ // Description: to.Ptr("Gets the status of an asynchronous operation"), // Operation: to.Ptr("Get Operation"), // Provider: to.Ptr("Microsoft Container Service"), // Resource: to.Ptr("Operation"), // }, // Origin: to.Ptr(armcontainerservicefleet.OriginUserSystem), // }}, // } } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type UpdateGroup ¶
type UpdateGroup struct { // REQUIRED; Name of the group. It must match a group name of an existing fleet member. Name *string }
UpdateGroup - A group to be updated.
func (UpdateGroup) MarshalJSON ¶
func (u UpdateGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateGroup.
func (*UpdateGroup) UnmarshalJSON ¶
func (u *UpdateGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateGroup.
type UpdateGroupStatus ¶
type UpdateGroupStatus struct { // READ-ONLY; The list of member this UpdateGroup updates. Members []*MemberUpdateStatus // READ-ONLY; The name of the UpdateGroup. Name *string // READ-ONLY; The status of the UpdateGroup. Status *UpdateStatus }
UpdateGroupStatus - The status of a UpdateGroup.
func (UpdateGroupStatus) MarshalJSON ¶
func (u UpdateGroupStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateGroupStatus.
func (*UpdateGroupStatus) UnmarshalJSON ¶
func (u *UpdateGroupStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateGroupStatus.
type UpdateRun ¶
type UpdateRun struct { // The resource-specific properties for this resource. Properties *UpdateRunProperties // READ-ONLY; If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. // Entity tags are used for comparing two or more entities from the same requested resource. // HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range // (section 14.27) header fields. ETag *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 }
UpdateRun - A multi-stage process to perform update operations across members of a Fleet.
func (UpdateRun) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type UpdateRun.
func (*UpdateRun) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateRun.
type UpdateRunListResult ¶
type UpdateRunListResult struct { // REQUIRED; The UpdateRun items on this page Value []*UpdateRun // The link to the next page of items NextLink *string }
UpdateRunListResult - The response of a UpdateRun list operation.
func (UpdateRunListResult) MarshalJSON ¶
func (u UpdateRunListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateRunListResult.
func (*UpdateRunListResult) UnmarshalJSON ¶
func (u *UpdateRunListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateRunListResult.
type UpdateRunProperties ¶
type UpdateRunProperties struct { // REQUIRED; The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the // run is started. ManagedClusterUpdate *ManagedClusterUpdate // The strategy defines the order in which the clusters will be updated. If not set, all members will be updated sequentially. // The UpdateRun status will show a single UpdateStage and a single UpdateGroup // targeting all members. The strategy of the UpdateRun can be modified until the run is started. Strategy *UpdateRunStrategy // The resource id of the FleetUpdateStrategy resource to reference. // When creating a new run, there are three ways to define a strategy for the run: // 1. Define a new strategy in place: Set the "strategy" field. // 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) // 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy" unset. (since // 2023-08-15-preview) // Setting both "updateStrategyId" and "strategy" is invalid. // UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and store it in // the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy // resource do not propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the // UpdateRun. UpdateStrategyID *string // READ-ONLY; The provisioning state of the UpdateRun resource. ProvisioningState *UpdateRunProvisioningState // READ-ONLY; The status of the UpdateRun. Status *UpdateRunStatus }
UpdateRunProperties - The properties of the UpdateRun.
func (UpdateRunProperties) MarshalJSON ¶
func (u UpdateRunProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateRunProperties.
func (*UpdateRunProperties) UnmarshalJSON ¶
func (u *UpdateRunProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateRunProperties.
type UpdateRunProvisioningState ¶
type UpdateRunProvisioningState string
UpdateRunProvisioningState - The provisioning state of the UpdateRun resource.
const ( // UpdateRunProvisioningStateCanceled - Resource creation was canceled. UpdateRunProvisioningStateCanceled UpdateRunProvisioningState = "Canceled" // UpdateRunProvisioningStateFailed - Resource creation failed. UpdateRunProvisioningStateFailed UpdateRunProvisioningState = "Failed" // UpdateRunProvisioningStateSucceeded - Resource has been created. UpdateRunProvisioningStateSucceeded UpdateRunProvisioningState = "Succeeded" )
func PossibleUpdateRunProvisioningStateValues ¶
func PossibleUpdateRunProvisioningStateValues() []UpdateRunProvisioningState
PossibleUpdateRunProvisioningStateValues returns the possible values for the UpdateRunProvisioningState const type.
type UpdateRunStatus ¶
type UpdateRunStatus struct { // READ-ONLY; The node image upgrade specs for the update run. It is only set in update run when NodeImageSelection.type is // Consistent. NodeImageSelection *NodeImageSelectionStatus // READ-ONLY; The stages composing an update run. Stages are run sequentially withing an UpdateRun. Stages []*UpdateStageStatus // READ-ONLY; The status of the UpdateRun. Status *UpdateStatus }
UpdateRunStatus - The status of a UpdateRun.
func (UpdateRunStatus) MarshalJSON ¶
func (u UpdateRunStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateRunStatus.
func (*UpdateRunStatus) UnmarshalJSON ¶
func (u *UpdateRunStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateRunStatus.
type UpdateRunStrategy ¶
type UpdateRunStrategy struct { // REQUIRED; The list of stages that compose this update run. Min size: 1. Stages []*UpdateStage }
UpdateRunStrategy - Defines the update sequence of the clusters via stages and groups. Stages within a run are executed sequentially one after another. Groups within a stage are executed in parallel. Member clusters within a group are updated sequentially one after another. A valid strategy contains no duplicate groups within or across stages.
func (UpdateRunStrategy) MarshalJSON ¶
func (u UpdateRunStrategy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateRunStrategy.
func (*UpdateRunStrategy) UnmarshalJSON ¶
func (u *UpdateRunStrategy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateRunStrategy.
type UpdateRunsClient ¶
type UpdateRunsClient struct {
// contains filtered or unexported fields
}
UpdateRunsClient contains the methods for the UpdateRuns group. Don't use this type directly, use NewUpdateRunsClient() instead.
func NewUpdateRunsClient ¶
func NewUpdateRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UpdateRunsClient, error)
NewUpdateRunsClient creates a new instance of UpdateRunsClient 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 (*UpdateRunsClient) BeginCreateOrUpdate ¶
func (client *UpdateRunsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, resource UpdateRun, options *UpdateRunsClientBeginCreateOrUpdateOptions) (*runtime.Poller[UpdateRunsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a UpdateRun If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- updateRunName - The name of the UpdateRun resource.
- resource - Resource create parameters.
- options - UpdateRunsClientBeginCreateOrUpdateOptions contains the optional parameters for the UpdateRunsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewUpdateRunsClient().BeginCreateOrUpdate(ctx, "rg1", "fleet1", "run1", armcontainerservicefleet.UpdateRun{ Properties: &armcontainerservicefleet.UpdateRunProperties{ ManagedClusterUpdate: &armcontainerservicefleet.ManagedClusterUpdate{ NodeImageSelection: &armcontainerservicefleet.NodeImageSelection{ Type: to.Ptr(armcontainerservicefleet.NodeImageSelectionTypeLatest), }, Upgrade: &armcontainerservicefleet.ManagedClusterUpgradeSpec{ Type: to.Ptr(armcontainerservicefleet.ManagedClusterUpgradeTypeFull), KubernetesVersion: to.Ptr("1.26.1"), }, }, Strategy: &armcontainerservicefleet.UpdateRunStrategy{ Stages: []*armcontainerservicefleet.UpdateStage{ { Name: to.Ptr("stage1"), AfterStageWaitInSeconds: to.Ptr[int32](3600), Groups: []*armcontainerservicefleet.UpdateGroup{ { Name: to.Ptr("group-a"), }}, }}, }, UpdateStrategyID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1"), }, }, &armcontainerservicefleet.UpdateRunsClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: 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.UpdateRun = armcontainerservicefleet.UpdateRun{ // Name: to.Ptr("run1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/updateRuns"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateRuns/run1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // CreatedBy: to.Ptr("@contoso.com"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // LastModifiedBy: to.Ptr("@contoso.com"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("\"EtagValue\""), // Properties: &armcontainerservicefleet.UpdateRunProperties{ // ManagedClusterUpdate: &armcontainerservicefleet.ManagedClusterUpdate{ // NodeImageSelection: &armcontainerservicefleet.NodeImageSelection{ // Type: to.Ptr(armcontainerservicefleet.NodeImageSelectionTypeLatest), // }, // Upgrade: &armcontainerservicefleet.ManagedClusterUpgradeSpec{ // Type: to.Ptr(armcontainerservicefleet.ManagedClusterUpgradeTypeFull), // KubernetesVersion: to.Ptr("1.26.1"), // }, // }, // ProvisioningState: to.Ptr(armcontainerservicefleet.UpdateRunProvisioningStateSucceeded), // Status: &armcontainerservicefleet.UpdateRunStatus{ // Stages: []*armcontainerservicefleet.UpdateStageStatus{ // { // Name: to.Ptr("stage1"), // AfterStageWaitStatus: &armcontainerservicefleet.WaitStatus{ // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // WaitDurationInSeconds: to.Ptr[int32](3600), // }, // Groups: []*armcontainerservicefleet.UpdateGroupStatus{ // { // Name: to.Ptr("group-a"), // Members: []*armcontainerservicefleet.MemberUpdateStatus{ // { // Name: to.Ptr("member-one"), // ClusterResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myClusters/providers/Microsoft.ContainerService/managedClusters/myCluster"), // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }, // Strategy: &armcontainerservicefleet.UpdateRunStrategy{ // Stages: []*armcontainerservicefleet.UpdateStage{ // { // Name: to.Ptr("stage1"), // AfterStageWaitInSeconds: to.Ptr[int32](3600), // Groups: []*armcontainerservicefleet.UpdateGroup{ // { // Name: to.Ptr("group-a"), // }}, // }}, // }, // UpdateStrategyID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1"), // }, // } }
Output:
func (*UpdateRunsClient) BeginDelete ¶
func (client *UpdateRunsClient) BeginDelete(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, options *UpdateRunsClientBeginDeleteOptions) (*runtime.Poller[UpdateRunsClientDeleteResponse], error)
BeginDelete - Delete a UpdateRun If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- updateRunName - The name of the UpdateRun resource.
- options - UpdateRunsClientBeginDeleteOptions contains the optional parameters for the UpdateRunsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewUpdateRunsClient().BeginDelete(ctx, "rg1", "fleet1", "run1", &armcontainerservicefleet.UpdateRunsClientBeginDeleteOptions{IfMatch: 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 (*UpdateRunsClient) BeginStart ¶
func (client *UpdateRunsClient) BeginStart(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, options *UpdateRunsClientBeginStartOptions) (*runtime.Poller[UpdateRunsClientStartResponse], error)
BeginStart - Starts an UpdateRun. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- updateRunName - The name of the UpdateRun resource.
- options - UpdateRunsClientBeginStartOptions contains the optional parameters for the UpdateRunsClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Start.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewUpdateRunsClient().BeginStart(ctx, "rg1", "fleet1", "run1", &armcontainerservicefleet.UpdateRunsClientBeginStartOptions{IfMatch: 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.UpdateRun = armcontainerservicefleet.UpdateRun{ // Name: to.Ptr("run1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/updateRuns"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateRuns/run1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:09:08.395Z"); return t}()), // CreatedBy: to.Ptr("@contoso.com"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // LastModifiedBy: to.Ptr("@contoso.com"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("\"EtagValue\""), // Properties: &armcontainerservicefleet.UpdateRunProperties{ // ManagedClusterUpdate: &armcontainerservicefleet.ManagedClusterUpdate{ // NodeImageSelection: &armcontainerservicefleet.NodeImageSelection{ // Type: to.Ptr(armcontainerservicefleet.NodeImageSelectionTypeLatest), // }, // Upgrade: &armcontainerservicefleet.ManagedClusterUpgradeSpec{ // Type: to.Ptr(armcontainerservicefleet.ManagedClusterUpgradeTypeFull), // KubernetesVersion: to.Ptr("1.26.1"), // }, // }, // ProvisioningState: to.Ptr(armcontainerservicefleet.UpdateRunProvisioningStateSucceeded), // Status: &armcontainerservicefleet.UpdateRunStatus{ // Stages: []*armcontainerservicefleet.UpdateStageStatus{ // { // Name: to.Ptr("stage1"), // AfterStageWaitStatus: &armcontainerservicefleet.WaitStatus{ // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // WaitDurationInSeconds: to.Ptr[int32](3600), // }, // Groups: []*armcontainerservicefleet.UpdateGroupStatus{ // { // Name: to.Ptr("group-a"), // Members: []*armcontainerservicefleet.MemberUpdateStatus{ // { // Name: to.Ptr("member-one"), // ClusterResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myClusters/providers/Microsoft.ContainerService/managedClusters/myCluster"), // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateRunning), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // State: to.Ptr(armcontainerservicefleet.UpdateStateRunning), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // State: to.Ptr(armcontainerservicefleet.UpdateStateRunning), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // State: to.Ptr(armcontainerservicefleet.UpdateStateRunning), // }, // }, // Strategy: &armcontainerservicefleet.UpdateRunStrategy{ // Stages: []*armcontainerservicefleet.UpdateStage{ // { // Name: to.Ptr("stage1"), // AfterStageWaitInSeconds: to.Ptr[int32](3600), // Groups: []*armcontainerservicefleet.UpdateGroup{ // { // Name: to.Ptr("group-a"), // }}, // }}, // }, // }, // } }
Output:
func (*UpdateRunsClient) BeginStop ¶
func (client *UpdateRunsClient) BeginStop(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, options *UpdateRunsClientBeginStopOptions) (*runtime.Poller[UpdateRunsClientStopResponse], error)
BeginStop - Stops an UpdateRun. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- updateRunName - The name of the UpdateRun resource.
- options - UpdateRunsClientBeginStopOptions contains the optional parameters for the UpdateRunsClient.BeginStop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Stop.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewUpdateRunsClient().BeginStop(ctx, "rg1", "fleet1", "run1", &armcontainerservicefleet.UpdateRunsClientBeginStopOptions{IfMatch: 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.UpdateRun = armcontainerservicefleet.UpdateRun{ // Name: to.Ptr("run1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/updateRuns"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateRuns/run1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:09:08.395Z"); return t}()), // CreatedBy: to.Ptr("@contoso.com"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // LastModifiedBy: to.Ptr("@contoso.com"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("\"EtagValue\""), // Properties: &armcontainerservicefleet.UpdateRunProperties{ // ManagedClusterUpdate: &armcontainerservicefleet.ManagedClusterUpdate{ // NodeImageSelection: &armcontainerservicefleet.NodeImageSelection{ // Type: to.Ptr(armcontainerservicefleet.NodeImageSelectionTypeLatest), // }, // Upgrade: &armcontainerservicefleet.ManagedClusterUpgradeSpec{ // Type: to.Ptr(armcontainerservicefleet.ManagedClusterUpgradeTypeFull), // KubernetesVersion: to.Ptr("1.26.1"), // }, // }, // ProvisioningState: to.Ptr(armcontainerservicefleet.UpdateRunProvisioningStateSucceeded), // Status: &armcontainerservicefleet.UpdateRunStatus{ // Stages: []*armcontainerservicefleet.UpdateStageStatus{ // { // Name: to.Ptr("stage1"), // AfterStageWaitStatus: &armcontainerservicefleet.WaitStatus{ // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // WaitDurationInSeconds: to.Ptr[int32](3600), // }, // Groups: []*armcontainerservicefleet.UpdateGroupStatus{ // { // Name: to.Ptr("group-a"), // Members: []*armcontainerservicefleet.MemberUpdateStatus{ // { // Name: to.Ptr("member-one"), // ClusterResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myClusters/providers/Microsoft.ContainerService/managedClusters/myCluster"), // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateStopping), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // State: to.Ptr(armcontainerservicefleet.UpdateStateStopping), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // State: to.Ptr(armcontainerservicefleet.UpdateStateStopping), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // State: to.Ptr(armcontainerservicefleet.UpdateStateStopping), // }, // }, // Strategy: &armcontainerservicefleet.UpdateRunStrategy{ // Stages: []*armcontainerservicefleet.UpdateStage{ // { // Name: to.Ptr("stage1"), // AfterStageWaitInSeconds: to.Ptr[int32](3600), // Groups: []*armcontainerservicefleet.UpdateGroup{ // { // Name: to.Ptr("group-a"), // }}, // }}, // }, // }, // } }
Output:
func (*UpdateRunsClient) Get ¶
func (client *UpdateRunsClient) Get(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, options *UpdateRunsClientGetOptions) (UpdateRunsClientGetResponse, error)
Get - Get a UpdateRun If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- updateRunName - The name of the UpdateRun resource.
- options - UpdateRunsClientGetOptions contains the optional parameters for the UpdateRunsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_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/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewUpdateRunsClient().Get(ctx, "rg1", "fleet1", "run1", 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.UpdateRun = armcontainerservicefleet.UpdateRun{ // Name: to.Ptr("run1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/updateRuns"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateRuns/run1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // CreatedBy: to.Ptr("@contoso.com"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // LastModifiedBy: to.Ptr("@contoso.com"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("\"EtagValue\""), // Properties: &armcontainerservicefleet.UpdateRunProperties{ // ManagedClusterUpdate: &armcontainerservicefleet.ManagedClusterUpdate{ // NodeImageSelection: &armcontainerservicefleet.NodeImageSelection{ // Type: to.Ptr(armcontainerservicefleet.NodeImageSelectionTypeLatest), // }, // Upgrade: &armcontainerservicefleet.ManagedClusterUpgradeSpec{ // Type: to.Ptr(armcontainerservicefleet.ManagedClusterUpgradeTypeFull), // KubernetesVersion: to.Ptr("1.26.1"), // }, // }, // ProvisioningState: to.Ptr(armcontainerservicefleet.UpdateRunProvisioningStateSucceeded), // Status: &armcontainerservicefleet.UpdateRunStatus{ // Stages: []*armcontainerservicefleet.UpdateStageStatus{ // { // Name: to.Ptr("stage1"), // AfterStageWaitStatus: &armcontainerservicefleet.WaitStatus{ // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // WaitDurationInSeconds: to.Ptr[int32](3600), // }, // Groups: []*armcontainerservicefleet.UpdateGroupStatus{ // { // Name: to.Ptr("group-a"), // Members: []*armcontainerservicefleet.MemberUpdateStatus{ // { // Name: to.Ptr("member-one"), // ClusterResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myClusters/providers/Microsoft.ContainerService/managedClusters/myCluster"), // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }, // Strategy: &armcontainerservicefleet.UpdateRunStrategy{ // Stages: []*armcontainerservicefleet.UpdateStage{ // { // Name: to.Ptr("stage1"), // AfterStageWaitInSeconds: to.Ptr[int32](3600), // Groups: []*armcontainerservicefleet.UpdateGroup{ // { // Name: to.Ptr("group-a"), // }}, // }}, // }, // }, // } }
Output:
func (*UpdateRunsClient) NewListByFleetPager ¶
func (client *UpdateRunsClient) NewListByFleetPager(resourceGroupName string, fleetName string, options *UpdateRunsClientListByFleetOptions) *runtime.Pager[UpdateRunsClientListByFleetResponse]
NewListByFleetPager - List UpdateRun resources by Fleet
Generated from API version 2023-10-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- fleetName - The name of the Fleet resource.
- options - UpdateRunsClientListByFleetOptions contains the optional parameters for the UpdateRunsClient.NewListByFleetPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/678aeba91061a67e9af8b9aaf41f85b8aea06c7c/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_ListByFleet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUpdateRunsClient().NewListByFleetPager("rg1", "fleet1", 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.UpdateRunListResult = armcontainerservicefleet.UpdateRunListResult{ // Value: []*armcontainerservicefleet.UpdateRun{ // { // Name: to.Ptr("run1"), // Type: to.Ptr("Microsoft.ContainerService/fleets/updateRuns"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateRuns/run1"), // SystemData: &armcontainerservicefleet.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // CreatedBy: to.Ptr("@contoso.com"), // CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()), // LastModifiedBy: to.Ptr("@contoso.com"), // LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser), // }, // ETag: to.Ptr("\"EtagValue\""), // Properties: &armcontainerservicefleet.UpdateRunProperties{ // ManagedClusterUpdate: &armcontainerservicefleet.ManagedClusterUpdate{ // NodeImageSelection: &armcontainerservicefleet.NodeImageSelection{ // Type: to.Ptr(armcontainerservicefleet.NodeImageSelectionTypeLatest), // }, // Upgrade: &armcontainerservicefleet.ManagedClusterUpgradeSpec{ // Type: to.Ptr(armcontainerservicefleet.ManagedClusterUpgradeTypeFull), // KubernetesVersion: to.Ptr("1.26.1"), // }, // }, // ProvisioningState: to.Ptr(armcontainerservicefleet.UpdateRunProvisioningStateSucceeded), // Status: &armcontainerservicefleet.UpdateRunStatus{ // Stages: []*armcontainerservicefleet.UpdateStageStatus{ // { // Name: to.Ptr("stage1"), // AfterStageWaitStatus: &armcontainerservicefleet.WaitStatus{ // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // WaitDurationInSeconds: to.Ptr[int32](3600), // }, // Groups: []*armcontainerservicefleet.UpdateGroupStatus{ // { // Name: to.Ptr("group-a"), // Members: []*armcontainerservicefleet.MemberUpdateStatus{ // { // Name: to.Ptr("member-one"), // ClusterResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myClusters/providers/Microsoft.ContainerService/managedClusters/myCluster"), // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }}, // Status: &armcontainerservicefleet.UpdateStatus{ // State: to.Ptr(armcontainerservicefleet.UpdateStateNotStarted), // }, // }, // Strategy: &armcontainerservicefleet.UpdateRunStrategy{ // Stages: []*armcontainerservicefleet.UpdateStage{ // { // Name: to.Ptr("stage1"), // AfterStageWaitInSeconds: to.Ptr[int32](3600), // Groups: []*armcontainerservicefleet.UpdateGroup{ // { // Name: to.Ptr("group-a"), // }}, // }}, // }, // }, // }}, // } } }
Output:
type UpdateRunsClientBeginCreateOrUpdateOptions ¶
type UpdateRunsClientBeginCreateOrUpdateOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // The request should only proceed if no entity matches this string. IfNoneMatch *string // Resumes the LRO from the provided token. ResumeToken string }
UpdateRunsClientBeginCreateOrUpdateOptions contains the optional parameters for the UpdateRunsClient.BeginCreateOrUpdate method.
type UpdateRunsClientBeginDeleteOptions ¶
type UpdateRunsClientBeginDeleteOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
UpdateRunsClientBeginDeleteOptions contains the optional parameters for the UpdateRunsClient.BeginDelete method.
type UpdateRunsClientBeginStartOptions ¶
type UpdateRunsClientBeginStartOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
UpdateRunsClientBeginStartOptions contains the optional parameters for the UpdateRunsClient.BeginStart method.
type UpdateRunsClientBeginStopOptions ¶
type UpdateRunsClientBeginStopOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
UpdateRunsClientBeginStopOptions contains the optional parameters for the UpdateRunsClient.BeginStop method.
type UpdateRunsClientCreateOrUpdateResponse ¶
type UpdateRunsClientCreateOrUpdateResponse struct { // A multi-stage process to perform update operations across members of a Fleet. UpdateRun }
UpdateRunsClientCreateOrUpdateResponse contains the response from method UpdateRunsClient.BeginCreateOrUpdate.
type UpdateRunsClientDeleteResponse ¶
type UpdateRunsClientDeleteResponse struct { }
UpdateRunsClientDeleteResponse contains the response from method UpdateRunsClient.BeginDelete.
type UpdateRunsClientGetOptions ¶
type UpdateRunsClientGetOptions struct { }
UpdateRunsClientGetOptions contains the optional parameters for the UpdateRunsClient.Get method.
type UpdateRunsClientGetResponse ¶
type UpdateRunsClientGetResponse struct { // A multi-stage process to perform update operations across members of a Fleet. UpdateRun }
UpdateRunsClientGetResponse contains the response from method UpdateRunsClient.Get.
type UpdateRunsClientListByFleetOptions ¶
type UpdateRunsClientListByFleetOptions struct { }
UpdateRunsClientListByFleetOptions contains the optional parameters for the UpdateRunsClient.NewListByFleetPager method.
type UpdateRunsClientListByFleetResponse ¶
type UpdateRunsClientListByFleetResponse struct { // The response of a UpdateRun list operation. UpdateRunListResult }
UpdateRunsClientListByFleetResponse contains the response from method UpdateRunsClient.NewListByFleetPager.
type UpdateRunsClientStartResponse ¶
type UpdateRunsClientStartResponse struct { // A multi-stage process to perform update operations across members of a Fleet. UpdateRun }
UpdateRunsClientStartResponse contains the response from method UpdateRunsClient.BeginStart.
type UpdateRunsClientStopResponse ¶
type UpdateRunsClientStopResponse struct { // A multi-stage process to perform update operations across members of a Fleet. UpdateRun }
UpdateRunsClientStopResponse contains the response from method UpdateRunsClient.BeginStop.
type UpdateStage ¶
type UpdateStage struct { // REQUIRED; The name of the stage. Must be unique within the UpdateRun. Name *string // The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified. AfterStageWaitInSeconds *int32 // Defines the groups to be executed in parallel in this stage. Duplicate groups are not allowed. Min size: 1. Groups []*UpdateGroup }
UpdateStage - Defines a stage which contains the groups to update and the steps to take (e.g., wait for a time period) before starting the next stage.
func (UpdateStage) MarshalJSON ¶
func (u UpdateStage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateStage.
func (*UpdateStage) UnmarshalJSON ¶
func (u *UpdateStage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateStage.
type UpdateStageStatus ¶
type UpdateStageStatus struct { // READ-ONLY; The status of the wait period configured on the UpdateStage. AfterStageWaitStatus *WaitStatus // READ-ONLY; The list of groups to be updated as part of this UpdateStage. Groups []*UpdateGroupStatus // READ-ONLY; The name of the UpdateStage. Name *string // READ-ONLY; The status of the UpdateStage. Status *UpdateStatus }
UpdateStageStatus - The status of a UpdateStage.
func (UpdateStageStatus) MarshalJSON ¶
func (u UpdateStageStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateStageStatus.
func (*UpdateStageStatus) UnmarshalJSON ¶
func (u *UpdateStageStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateStageStatus.
type UpdateState ¶
type UpdateState string
UpdateState - The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate.
const ( // UpdateStateCompleted - The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has completed. UpdateStateCompleted UpdateState = "Completed" // UpdateStateFailed - The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has failed. UpdateStateFailed UpdateState = "Failed" // UpdateStateNotStarted - The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has not been started. UpdateStateNotStarted UpdateState = "NotStarted" // UpdateStateRunning - The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is running. UpdateStateRunning UpdateState = "Running" // UpdateStateSkipped - The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has been skipped. UpdateStateSkipped UpdateState = "Skipped" // UpdateStateStopped - The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has stopped. UpdateStateStopped UpdateState = "Stopped" // UpdateStateStopping - The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is being stopped. UpdateStateStopping UpdateState = "Stopping" )
func PossibleUpdateStateValues ¶
func PossibleUpdateStateValues() []UpdateState
PossibleUpdateStateValues returns the possible values for the UpdateState const type.
type UpdateStatus ¶
type UpdateStatus struct { // READ-ONLY; The time the operation or group was completed. CompletedTime *time.Time // READ-ONLY; The error details when a failure is encountered. Error *ErrorDetail // READ-ONLY; The time the operation or group was started. StartTime *time.Time // READ-ONLY; The State of the operation or group. State *UpdateState }
UpdateStatus - The status for an operation or group of operations.
func (UpdateStatus) MarshalJSON ¶
func (u UpdateStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateStatus.
func (*UpdateStatus) UnmarshalJSON ¶
func (u *UpdateStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateStatus.
type UserAssignedIdentity ¶ added in v0.2.0
type UserAssignedIdentity struct { // READ-ONLY; The client ID of the assigned identity. ClientID *string // READ-ONLY; The principal ID of the assigned identity. PrincipalID *string }
UserAssignedIdentity - User assigned identity properties
func (UserAssignedIdentity) MarshalJSON ¶ added in v0.2.0
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶ added in v0.2.0
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type WaitStatus ¶
type WaitStatus struct { // READ-ONLY; The status of the wait duration. Status *UpdateStatus // READ-ONLY; The wait duration configured in seconds. WaitDurationInSeconds *int32 }
WaitStatus - The status of the wait duration.
func (WaitStatus) MarshalJSON ¶
func (w WaitStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WaitStatus.
func (*WaitStatus) UnmarshalJSON ¶
func (w *WaitStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WaitStatus.