diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/CHANGELOG.md b/sdk/resourcemanager/networkcloud/armnetworkcloud/CHANGELOG.md index ef9a6df60292..657abef2783a 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/CHANGELOG.md +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/CHANGELOG.md @@ -1,5 +1,87 @@ # Release History +## 1.2.0-beta.1 (2024-11-15) +### Features Added + +- New value `ClusterConnectionStatusDisconnected` added to enum type `ClusterConnectionStatus` +- New value `ClusterDetailedStatusUpdatePaused` added to enum type `ClusterDetailedStatus` +- New value `RackSKUProvisioningStateCanceled`, `RackSKUProvisioningStateFailed` added to enum type `RackSKUProvisioningState` +- New enum type `ClusterContinueUpdateVersionMachineGroupTargetingMode` with values `ClusterContinueUpdateVersionMachineGroupTargetingModeAlphaByRack` +- New enum type `ClusterScanRuntimeParametersScanActivity` with values `ClusterScanRuntimeParametersScanActivityScan`, `ClusterScanRuntimeParametersScanActivitySkip` +- New enum type `ClusterSecretArchiveEnabled` with values `ClusterSecretArchiveEnabledFalse`, `ClusterSecretArchiveEnabledTrue` +- New enum type `ClusterUpdateStrategyType` with values `ClusterUpdateStrategyTypePauseAfterRack`, `ClusterUpdateStrategyTypeRack` +- New enum type `KubernetesClusterFeatureAvailabilityLifecycle` with values `KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable`, `KubernetesClusterFeatureAvailabilityLifecyclePreview` +- New enum type `KubernetesClusterFeatureDetailedStatus` with values `KubernetesClusterFeatureDetailedStatusError`, `KubernetesClusterFeatureDetailedStatusInstalled`, `KubernetesClusterFeatureDetailedStatusProvisioning` +- New enum type `KubernetesClusterFeatureProvisioningState` with values `KubernetesClusterFeatureProvisioningStateAccepted`, `KubernetesClusterFeatureProvisioningStateCanceled`, `KubernetesClusterFeatureProvisioningStateDeleting`, `KubernetesClusterFeatureProvisioningStateFailed`, `KubernetesClusterFeatureProvisioningStateSucceeded`, `KubernetesClusterFeatureProvisioningStateUpdating` +- New enum type `KubernetesClusterFeatureRequired` with values `KubernetesClusterFeatureRequiredFalse`, `KubernetesClusterFeatureRequiredTrue` +- New enum type `ManagedServiceIdentitySelectorType` with values `ManagedServiceIdentitySelectorTypeSystemAssignedIdentity`, `ManagedServiceIdentitySelectorTypeUserAssignedIdentity` +- New enum type `ManagedServiceIdentityType` with values `ManagedServiceIdentityTypeNone`, `ManagedServiceIdentityTypeSystemAssigned`, `ManagedServiceIdentityTypeSystemAssignedUserAssigned`, `ManagedServiceIdentityTypeUserAssigned` +- New enum type `RuntimeProtectionEnforcementLevel` with values `RuntimeProtectionEnforcementLevelAudit`, `RuntimeProtectionEnforcementLevelDisabled`, `RuntimeProtectionEnforcementLevelOnDemand`, `RuntimeProtectionEnforcementLevelPassive`, `RuntimeProtectionEnforcementLevelRealTime` +- New function `*ClientFactory.NewKubernetesClusterFeaturesClient() *KubernetesClusterFeaturesClient` +- New function `*ClustersClient.BeginContinueUpdateVersion(context.Context, string, string, ClusterContinueUpdateVersionParameters, *ClustersClientBeginContinueUpdateVersionOptions) (*runtime.Poller[ClustersClientContinueUpdateVersionResponse], error)` +- New function `*ClustersClient.BeginScanRuntime(context.Context, string, string, *ClustersClientBeginScanRuntimeOptions) (*runtime.Poller[ClustersClientScanRuntimeResponse], error)` +- New function `NewKubernetesClusterFeaturesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*KubernetesClusterFeaturesClient, error)` +- New function `*KubernetesClusterFeaturesClient.BeginCreateOrUpdate(context.Context, string, string, string, KubernetesClusterFeature, *KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions) (*runtime.Poller[KubernetesClusterFeaturesClientCreateOrUpdateResponse], error)` +- New function `*KubernetesClusterFeaturesClient.BeginDelete(context.Context, string, string, string, *KubernetesClusterFeaturesClientBeginDeleteOptions) (*runtime.Poller[KubernetesClusterFeaturesClientDeleteResponse], error)` +- New function `*KubernetesClusterFeaturesClient.Get(context.Context, string, string, string, *KubernetesClusterFeaturesClientGetOptions) (KubernetesClusterFeaturesClientGetResponse, error)` +- New function `*KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager(string, string, *KubernetesClusterFeaturesClientListByKubernetesClusterOptions) *runtime.Pager[KubernetesClusterFeaturesClientListByKubernetesClusterResponse]` +- New function `*KubernetesClusterFeaturesClient.BeginUpdate(context.Context, string, string, string, KubernetesClusterFeaturePatchParameters, *KubernetesClusterFeaturesClientBeginUpdateOptions) (*runtime.Poller[KubernetesClusterFeaturesClientUpdateResponse], error)` +- New struct `AdministratorConfigurationPatch` +- New struct `ClusterContinueUpdateVersionParameters` +- New struct `ClusterScanRuntimeParameters` +- New struct `ClusterSecretArchive` +- New struct `ClusterUpdateStrategy` +- New struct `CommandOutputSettings` +- New struct `IdentitySelector` +- New struct `KubernetesClusterFeature` +- New struct `KubernetesClusterFeatureList` +- New struct `KubernetesClusterFeaturePatchParameters` +- New struct `KubernetesClusterFeaturePatchProperties` +- New struct `KubernetesClusterFeatureProperties` +- New struct `L2ServiceLoadBalancerConfiguration` +- New struct `ManagedServiceIdentity` +- New struct `NodePoolAdministratorConfigurationPatch` +- New struct `OperationStatusResultProperties` +- New struct `RuntimeProtectionConfiguration` +- New struct `RuntimeProtectionStatus` +- New struct `SecretArchiveReference` +- New struct `SecretRotationStatus` +- New struct `StringKeyValuePair` +- New struct `UserAssignedIdentity` +- New field `AdministratorConfiguration` in struct `AgentPoolPatchProperties` +- New field `DrainTimeout`, `MaxUnavailable` in struct `AgentPoolUpgradeSettings` +- New anonymous field `OperationStatusResult` in struct `AgentPoolsClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `BareMetalMachineKeySetsClientDeleteResponse` +- New field `MachineClusterVersion`, `MachineRoles`, `RuntimeProtectionStatus`, `SecretRotationStatus` in struct `BareMetalMachineProperties` +- New anonymous field `OperationStatusResult` in struct `BareMetalMachinesClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `BmcKeySetsClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `CloudServicesNetworksClientDeleteResponse` +- New field `Identity` in struct `Cluster` +- New field `Identity` in struct `ClusterManager` +- New field `Identity` in struct `ClusterManagerPatchParameters` +- New anonymous field `OperationStatusResult` in struct `ClusterManagersClientDeleteResponse` +- New field `Identity` in struct `ClusterPatchParameters` +- New field `CommandOutputSettings`, `RuntimeProtectionConfiguration`, `SecretArchive`, `UpdateStrategy` in struct `ClusterPatchProperties` +- New field `CommandOutputSettings`, `RuntimeProtectionConfiguration`, `SecretArchive`, `UpdateStrategy` in struct `ClusterProperties` +- New anonymous field `OperationStatusResult` in struct `ClustersClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `ConsolesClientDeleteResponse` +- New field `AdministratorConfiguration` in struct `ControlPlaneNodePatchConfiguration` +- New field `UserPrincipalName` in struct `KeySetUser` +- New field `AdministratorConfiguration` in struct `KubernetesClusterPatchProperties` +- New anonymous field `OperationStatusResult` in struct `KubernetesClustersClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `L2NetworksClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `L3NetworksClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `MetricsConfigurationsClientDeleteResponse` +- New field `L2ServiceLoadBalancerConfiguration` in struct `NetworkConfiguration` +- New field `Properties` in struct `OperationStatusResult` +- New anonymous field `OperationStatusResult` in struct `RacksClientDeleteResponse` +- New field `Manufacturer`, `Model`, `SecretRotationStatus`, `Version` in struct `StorageApplianceProperties` +- New anonymous field `OperationStatusResult` in struct `StorageAppliancesClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `TrunkedNetworksClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `VirtualMachinesClientDeleteResponse` +- New anonymous field `OperationStatusResult` in struct `VolumesClientDeleteResponse` + + ## 1.1.0 (2023-11-24) ### Features Added diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/README.md b/sdk/resourcemanager/networkcloud/armnetworkcloud/README.md index 1fba9d0cea5d..edf0053076eb 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/README.md +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/README.md @@ -55,7 +55,7 @@ client, err := armnetworkcloud.NewClientFactory(, cred, &option A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. ```go -client := clientFactory.NewTrunkedNetworksClient() +client := clientFactory.NewAgentPoolsClient() ``` ## Fakes diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/agentpools_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/agentpools_client.go index 049607d2f074..0a36c6c665d9 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/agentpools_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/agentpools_client.go @@ -46,7 +46,7 @@ func NewAgentPoolsClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Create a new Kubernetes cluster agent pool or update the properties of the existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - agentPoolName - The name of the Kubernetes cluster agent pool. @@ -74,7 +74,7 @@ func (client *AgentPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Create a new Kubernetes cluster agent pool or update the properties of the existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *AgentPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, agentPoolName string, agentPoolParameters AgentPool, options *AgentPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "AgentPoolsClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *AgentPoolsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, agentPoolParameters); err != nil { @@ -132,7 +132,7 @@ func (client *AgentPoolsClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete the provided Kubernetes cluster agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - agentPoolName - The name of the Kubernetes cluster agent pool. @@ -158,7 +158,7 @@ func (client *AgentPoolsClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Delete the provided Kubernetes cluster agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *AgentPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, kubernetesClusterName string, agentPoolName string, options *AgentPoolsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "AgentPoolsClient.BeginDelete" @@ -204,7 +204,7 @@ func (client *AgentPoolsClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -213,7 +213,7 @@ func (client *AgentPoolsClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get properties of the provided Kubernetes cluster agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - agentPoolName - The name of the Kubernetes cluster agent pool. @@ -264,7 +264,7 @@ func (client *AgentPoolsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +281,7 @@ func (client *AgentPoolsClient) getHandleResponse(resp *http.Response) (AgentPoo // NewListByKubernetesClusterPager - Get a list of agent pools for the provided Kubernetes cluster. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - options - AgentPoolsClientListByKubernetesClusterOptions contains the optional parameters for the AgentPoolsClient.NewListByKubernetesClusterPager @@ -329,7 +329,7 @@ func (client *AgentPoolsClient) listByKubernetesClusterCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,7 +348,7 @@ func (client *AgentPoolsClient) listByKubernetesClusterHandleResponse(resp *http // Kubernetes cluster agent pool. Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - agentPoolName - The name of the Kubernetes cluster agent pool. @@ -376,7 +376,7 @@ func (client *AgentPoolsClient) BeginUpdate(ctx context.Context, resourceGroupNa // cluster agent pool. Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *AgentPoolsClient) update(ctx context.Context, resourceGroupName string, kubernetesClusterName string, agentPoolName string, agentPoolUpdateParameters AgentPoolPatchParameters, options *AgentPoolsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "AgentPoolsClient.BeginUpdate" @@ -422,7 +422,7 @@ func (client *AgentPoolsClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, agentPoolUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/agentpools_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/agentpools_client_example_test.go index 22073da30db9..26b2c4a7a80a 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/agentpools_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/agentpools_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_ListByKubernetesCluster.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_ListByKubernetesCluster.json func ExampleAgentPoolsClient_NewListByKubernetesClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -100,7 +100,7 @@ func ExampleAgentPoolsClient_NewListByKubernetesClusterPager() { // Count: to.Ptr[int64](3), // DetailedStatus: to.Ptr(armnetworkcloud.AgentPoolDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Agent pool is available"), - // KubernetesVersion: to.Ptr("1.24.3-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), @@ -116,14 +116,14 @@ func ExampleAgentPoolsClient_NewListByKubernetesClusterPager() { // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json func ExampleAgentPoolsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -199,7 +199,7 @@ func ExampleAgentPoolsClient_Get() { // Count: to.Ptr[int64](3), // DetailedStatus: to.Ptr(armnetworkcloud.AgentPoolDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Agent pool is available"), - // KubernetesVersion: to.Ptr("1.24.3-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), @@ -215,12 +215,12 @@ func ExampleAgentPoolsClient_Get() { // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Create.json func ExampleAgentPoolsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -290,7 +290,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate() { UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ MaxSurge: to.Ptr("1"), }, - VMSKUName: to.Ptr("NC_M16_v1"), + VMSKUName: to.Ptr("NC_XXXX"), }, }, nil) if err != nil { @@ -361,7 +361,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate() { // Count: to.Ptr[int64](3), // DetailedStatus: to.Ptr(armnetworkcloud.AgentPoolDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Agent pool is available"), - // KubernetesVersion: to.Ptr("1.24.3-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), @@ -377,12 +377,12 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate() { // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Delete.json func ExampleAgentPoolsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -403,7 +403,7 @@ func ExampleAgentPoolsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Patch.json func ExampleAgentPoolsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -416,9 +416,17 @@ func ExampleAgentPoolsClient_BeginUpdate() { } poller, err := clientFactory.NewAgentPoolsClient().BeginUpdate(ctx, "resourceGroupName", "kubernetesClusterName", "agentPoolName", armnetworkcloud.AgentPoolPatchParameters{ Properties: &armnetworkcloud.AgentPoolPatchProperties{ + AdministratorConfiguration: &armnetworkcloud.NodePoolAdministratorConfigurationPatch{ + SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ + { + KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), + }}, + }, Count: to.Ptr[int64](3), UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ - MaxSurge: to.Ptr("1"), + DrainTimeout: to.Ptr[int64](1800), + MaxSurge: to.Ptr("1"), + MaxUnavailable: to.Ptr("0"), }, }, Tags: map[string]*string{ @@ -494,7 +502,7 @@ func ExampleAgentPoolsClient_BeginUpdate() { // Count: to.Ptr[int64](3), // DetailedStatus: to.Ptr(armnetworkcloud.AgentPoolDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Agent pool is available"), - // KubernetesVersion: to.Ptr("1.24.3-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), @@ -510,7 +518,7 @@ func ExampleAgentPoolsClient_BeginUpdate() { // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }, // } } diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/autorest.md b/sdk/resourcemanager/networkcloud/armnetworkcloud/autorest.md index 9c6b8feeec8d..3adef5eb5c1f 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/autorest.md +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 -tag: package-2023-07-01 +module-version: 1.2.0-beta.1 +tag: package-2024-06-01-preview ``` \ No newline at end of file diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachinekeysets_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachinekeysets_client.go index 5f0d8fcc3012..7dc1ea47eaa2 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachinekeysets_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachinekeysets_client.go @@ -46,7 +46,7 @@ func NewBareMetalMachineKeySetsClient(subscriptionID string, credential azcore.T // BeginCreateOrUpdate - Create a new bare metal machine key set or update the existing one for the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - bareMetalMachineKeySetName - The name of the bare metal machine key set. @@ -74,7 +74,7 @@ func (client *BareMetalMachineKeySetsClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Create a new bare metal machine key set or update the existing one for the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachineKeySetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, bareMetalMachineKeySetName string, bareMetalMachineKeySetParameters BareMetalMachineKeySet, options *BareMetalMachineKeySetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachineKeySetsClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *BareMetalMachineKeySetsClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, bareMetalMachineKeySetParameters); err != nil { @@ -132,7 +132,7 @@ func (client *BareMetalMachineKeySetsClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Delete the bare metal machine key set of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - bareMetalMachineKeySetName - The name of the bare metal machine key set. @@ -159,7 +159,7 @@ func (client *BareMetalMachineKeySetsClient) BeginDelete(ctx context.Context, re // Delete - Delete the bare metal machine key set of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachineKeySetsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, bareMetalMachineKeySetName string, options *BareMetalMachineKeySetsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachineKeySetsClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *BareMetalMachineKeySetsClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *BareMetalMachineKeySetsClient) deleteCreateRequest(ctx context.Con // Get - Get bare metal machine key set of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - bareMetalMachineKeySetName - The name of the bare metal machine key set. @@ -266,7 +266,7 @@ func (client *BareMetalMachineKeySetsClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *BareMetalMachineKeySetsClient) getHandleResponse(resp *http.Respon // NewListByClusterPager - Get a list of bare metal machine key sets for the provided cluster. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - options - BareMetalMachineKeySetsClientListByClusterOptions contains the optional parameters for the BareMetalMachineKeySetsClient.NewListByClusterPager @@ -331,7 +331,7 @@ func (client *BareMetalMachineKeySetsClient) listByClusterCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -350,7 +350,7 @@ func (client *BareMetalMachineKeySetsClient) listByClusterHandleResponse(resp *h // it. Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - bareMetalMachineKeySetName - The name of the bare metal machine key set. @@ -379,7 +379,7 @@ func (client *BareMetalMachineKeySetsClient) BeginUpdate(ctx context.Context, re // Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachineKeySetsClient) update(ctx context.Context, resourceGroupName string, clusterName string, bareMetalMachineKeySetName string, bareMetalMachineKeySetUpdateParameters BareMetalMachineKeySetPatchParameters, options *BareMetalMachineKeySetsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachineKeySetsClient.BeginUpdate" @@ -425,7 +425,7 @@ func (client *BareMetalMachineKeySetsClient) updateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, bareMetalMachineKeySetUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachinekeysets_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachinekeysets_client_example_test.go index eb8c3bc0b9f8..b08ae4d11ddf 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachinekeysets_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachinekeysets_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_ListByCluster.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_ListByCluster.json func ExampleBareMetalMachineKeySetsClient_NewListByClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -68,7 +68,7 @@ func ExampleBareMetalMachineKeySetsClient_NewListByClusterPager() { // Properties: &armnetworkcloud.BareMetalMachineKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineKeySetDetailedStatusSomeInvalid), - // DetailedStatusMessage: to.Ptr("Inalid Azure user(s) were provided: userXYZ"), + // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // JumpHostsAllowed: []*string{ // to.Ptr("192.0.2.1"), @@ -84,6 +84,7 @@ func ExampleBareMetalMachineKeySetsClient_NewListByClusterPager() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -91,6 +92,7 @@ func ExampleBareMetalMachineKeySetsClient_NewListByClusterPager() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { @@ -109,7 +111,7 @@ func ExampleBareMetalMachineKeySetsClient_NewListByClusterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json func ExampleBareMetalMachineKeySetsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -151,7 +153,7 @@ func ExampleBareMetalMachineKeySetsClient_Get() { // Properties: &armnetworkcloud.BareMetalMachineKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineKeySetDetailedStatusSomeInvalid), - // DetailedStatusMessage: to.Ptr("Inalid Azure user(s) were provided: userXYZ"), + // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // JumpHostsAllowed: []*string{ // to.Ptr("192.0.2.1"), @@ -167,6 +169,7 @@ func ExampleBareMetalMachineKeySetsClient_Get() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -174,6 +177,7 @@ func ExampleBareMetalMachineKeySetsClient_Get() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { @@ -190,7 +194,7 @@ func ExampleBareMetalMachineKeySetsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Create.json func ExampleBareMetalMachineKeySetsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -226,6 +230,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginCreateOrUpdate() { SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, + UserPrincipalName: to.Ptr("userABC@contoso.com"), }, { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -233,6 +238,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginCreateOrUpdate() { SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, + UserPrincipalName: to.Ptr("userABC@contoso.com"), }}, }, }, nil) @@ -270,7 +276,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginCreateOrUpdate() { // Properties: &armnetworkcloud.BareMetalMachineKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineKeySetDetailedStatusSomeInvalid), - // DetailedStatusMessage: to.Ptr("Inalid Azure user(s) were provided: userXYZ"), + // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // JumpHostsAllowed: []*string{ // to.Ptr("192.0.2.1"), @@ -286,6 +292,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginCreateOrUpdate() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -293,6 +300,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginCreateOrUpdate() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { @@ -309,7 +317,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Delete.json func ExampleBareMetalMachineKeySetsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -330,7 +338,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Patch.json func ExampleBareMetalMachineKeySetsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -354,6 +362,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginUpdate() { SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, + UserPrincipalName: to.Ptr("userABC@contoso.com"), }, { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -361,6 +370,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginUpdate() { SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, + UserPrincipalName: to.Ptr("userABC@contoso.com"), }}, }, Tags: map[string]*string{ @@ -402,7 +412,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginUpdate() { // Properties: &armnetworkcloud.BareMetalMachineKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineKeySetDetailedStatusSomeInvalid), - // DetailedStatusMessage: to.Ptr("Inalid Azure user(s) were provided: userXYZ"), + // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // JumpHostsAllowed: []*string{ // to.Ptr("192.0.2.1"), @@ -418,6 +428,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginUpdate() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -425,6 +436,7 @@ func ExampleBareMetalMachineKeySetsClient_BeginUpdate() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachines_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachines_client.go index 107d950bbeee..21242011492e 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachines_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachines_client.go @@ -46,7 +46,7 @@ func NewBareMetalMachinesClient(subscriptionID string, credential azcore.TokenCr // BeginCordon - Cordon the provided bare metal machine's Kubernetes node. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - options - BareMetalMachinesClientBeginCordonOptions contains the optional parameters for the BareMetalMachinesClient.BeginCordon @@ -72,7 +72,7 @@ func (client *BareMetalMachinesClient) BeginCordon(ctx context.Context, resource // Cordon - Cordon the provided bare metal machine's Kubernetes node. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) cordon(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginCordonOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginCordon" @@ -87,7 +87,7 @@ func (client *BareMetalMachinesClient) cordon(ctx context.Context, resourceGroup if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -114,7 +114,7 @@ func (client *BareMetalMachinesClient) cordonCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.BareMetalMachineCordonParameters != nil { @@ -130,7 +130,7 @@ func (client *BareMetalMachinesClient) cordonCreateRequest(ctx context.Context, // requests will be rejected as the life cycle of this resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - bareMetalMachineParameters - The request body. @@ -158,7 +158,7 @@ func (client *BareMetalMachinesClient) BeginCreateOrUpdate(ctx context.Context, // will be rejected as the life cycle of this resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) createOrUpdate(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineParameters BareMetalMachine, options *BareMetalMachinesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginCreateOrUpdate" @@ -200,7 +200,7 @@ func (client *BareMetalMachinesClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, bareMetalMachineParameters); err != nil { @@ -213,7 +213,7 @@ func (client *BareMetalMachinesClient) createOrUpdateCreateRequest(ctx context.C // of this resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - options - BareMetalMachinesClientBeginDeleteOptions contains the optional parameters for the BareMetalMachinesClient.BeginDelete @@ -240,7 +240,7 @@ func (client *BareMetalMachinesClient) BeginDelete(ctx context.Context, resource // this resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) deleteOperation(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginDelete" @@ -282,7 +282,7 @@ func (client *BareMetalMachinesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -291,7 +291,7 @@ func (client *BareMetalMachinesClient) deleteCreateRequest(ctx context.Context, // Get - Get properties of the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - options - BareMetalMachinesClientGetOptions contains the optional parameters for the BareMetalMachinesClient.Get method. @@ -337,7 +337,7 @@ func (client *BareMetalMachinesClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -354,7 +354,7 @@ func (client *BareMetalMachinesClient) getHandleResponse(resp *http.Response) (B // NewListByResourceGroupPager - Get a list of bare metal machines in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - BareMetalMachinesClientListByResourceGroupOptions contains the optional parameters for the BareMetalMachinesClient.NewListByResourceGroupPager // method. @@ -397,7 +397,7 @@ func (client *BareMetalMachinesClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -414,7 +414,7 @@ func (client *BareMetalMachinesClient) listByResourceGroupHandleResponse(resp *h // NewListBySubscriptionPager - Get a list of bare metal machines in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - BareMetalMachinesClientListBySubscriptionOptions contains the optional parameters for the BareMetalMachinesClient.NewListBySubscriptionPager // method. func (client *BareMetalMachinesClient) NewListBySubscriptionPager(options *BareMetalMachinesClientListBySubscriptionOptions) *runtime.Pager[BareMetalMachinesClientListBySubscriptionResponse] { @@ -452,7 +452,7 @@ func (client *BareMetalMachinesClient) listBySubscriptionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -470,7 +470,7 @@ func (client *BareMetalMachinesClient) listBySubscriptionHandleResponse(resp *ht // BeginPowerOff - Power off the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - options - BareMetalMachinesClientBeginPowerOffOptions contains the optional parameters for the BareMetalMachinesClient.BeginPowerOff @@ -496,7 +496,7 @@ func (client *BareMetalMachinesClient) BeginPowerOff(ctx context.Context, resour // PowerOff - Power off the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) powerOff(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginPowerOffOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginPowerOff" @@ -511,7 +511,7 @@ func (client *BareMetalMachinesClient) powerOff(ctx context.Context, resourceGro if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -538,7 +538,7 @@ func (client *BareMetalMachinesClient) powerOffCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.BareMetalMachinePowerOffParameters != nil { @@ -553,7 +553,7 @@ func (client *BareMetalMachinesClient) powerOffCreateRequest(ctx context.Context // BeginReimage - Reimage the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - options - BareMetalMachinesClientBeginReimageOptions contains the optional parameters for the BareMetalMachinesClient.BeginReimage @@ -579,7 +579,7 @@ func (client *BareMetalMachinesClient) BeginReimage(ctx context.Context, resourc // Reimage - Reimage the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) reimage(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginReimageOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginReimage" @@ -594,7 +594,7 @@ func (client *BareMetalMachinesClient) reimage(ctx context.Context, resourceGrou if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -621,7 +621,7 @@ func (client *BareMetalMachinesClient) reimageCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -630,7 +630,7 @@ func (client *BareMetalMachinesClient) reimageCreateRequest(ctx context.Context, // BeginReplace - Replace the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - options - BareMetalMachinesClientBeginReplaceOptions contains the optional parameters for the BareMetalMachinesClient.BeginReplace @@ -656,7 +656,7 @@ func (client *BareMetalMachinesClient) BeginReplace(ctx context.Context, resourc // Replace - Replace the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) replace(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginReplaceOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginReplace" @@ -671,7 +671,7 @@ func (client *BareMetalMachinesClient) replace(ctx context.Context, resourceGrou if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -698,7 +698,7 @@ func (client *BareMetalMachinesClient) replaceCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.BareMetalMachineReplaceParameters != nil { @@ -713,7 +713,7 @@ func (client *BareMetalMachinesClient) replaceCreateRequest(ctx context.Context, // BeginRestart - Restart the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - options - BareMetalMachinesClientBeginRestartOptions contains the optional parameters for the BareMetalMachinesClient.BeginRestart @@ -739,7 +739,7 @@ func (client *BareMetalMachinesClient) BeginRestart(ctx context.Context, resourc // Restart - Restart the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) restart(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginRestartOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginRestart" @@ -754,7 +754,7 @@ func (client *BareMetalMachinesClient) restart(ctx context.Context, resourceGrou if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -781,7 +781,7 @@ func (client *BareMetalMachinesClient) restartCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -792,7 +792,7 @@ func (client *BareMetalMachinesClient) restartCreateRequest(ctx context.Context, // once available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - bareMetalMachineRunCommandParameters - The request body. @@ -821,7 +821,7 @@ func (client *BareMetalMachinesClient) BeginRunCommand(ctx context.Context, reso // once available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) runCommand(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineRunCommandParameters BareMetalMachineRunCommandParameters, options *BareMetalMachinesClientBeginRunCommandOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginRunCommand" @@ -836,7 +836,7 @@ func (client *BareMetalMachinesClient) runCommand(ctx context.Context, resourceG if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -863,7 +863,7 @@ func (client *BareMetalMachinesClient) runCommandCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, bareMetalMachineRunCommandParameters); err != nil { @@ -877,7 +877,7 @@ func (client *BareMetalMachinesClient) runCommandCreateRequest(ctx context.Conte // API once available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - bareMetalMachineRunDataExtractsParameters - The request body. @@ -906,7 +906,7 @@ func (client *BareMetalMachinesClient) BeginRunDataExtracts(ctx context.Context, // API once available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) runDataExtracts(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineRunDataExtractsParameters BareMetalMachineRunDataExtractsParameters, options *BareMetalMachinesClientBeginRunDataExtractsOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginRunDataExtracts" @@ -921,7 +921,7 @@ func (client *BareMetalMachinesClient) runDataExtracts(ctx context.Context, reso if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -948,7 +948,7 @@ func (client *BareMetalMachinesClient) runDataExtractsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, bareMetalMachineRunDataExtractsParameters); err != nil { @@ -962,7 +962,7 @@ func (client *BareMetalMachinesClient) runDataExtractsCreateRequest(ctx context. // status API once available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - bareMetalMachineRunReadCommandsParameters - The request body. @@ -991,7 +991,7 @@ func (client *BareMetalMachinesClient) BeginRunReadCommands(ctx context.Context, // status API once available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) runReadCommands(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineRunReadCommandsParameters BareMetalMachineRunReadCommandsParameters, options *BareMetalMachinesClientBeginRunReadCommandsOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginRunReadCommands" @@ -1006,7 +1006,7 @@ func (client *BareMetalMachinesClient) runReadCommands(ctx context.Context, reso if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -1033,7 +1033,7 @@ func (client *BareMetalMachinesClient) runReadCommandsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, bareMetalMachineRunReadCommandsParameters); err != nil { @@ -1045,7 +1045,7 @@ func (client *BareMetalMachinesClient) runReadCommandsCreateRequest(ctx context. // BeginStart - Start the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - options - BareMetalMachinesClientBeginStartOptions contains the optional parameters for the BareMetalMachinesClient.BeginStart @@ -1071,7 +1071,7 @@ func (client *BareMetalMachinesClient) BeginStart(ctx context.Context, resourceG // Start - Start the provided bare metal machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) start(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginStart" @@ -1086,7 +1086,7 @@ func (client *BareMetalMachinesClient) start(ctx context.Context, resourceGroupN if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -1113,7 +1113,7 @@ func (client *BareMetalMachinesClient) startCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1122,7 +1122,7 @@ func (client *BareMetalMachinesClient) startCreateRequest(ctx context.Context, r // BeginUncordon - Uncordon the provided bare metal machine's Kubernetes node. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - options - BareMetalMachinesClientBeginUncordonOptions contains the optional parameters for the BareMetalMachinesClient.BeginUncordon @@ -1148,7 +1148,7 @@ func (client *BareMetalMachinesClient) BeginUncordon(ctx context.Context, resour // Uncordon - Uncordon the provided bare metal machine's Kubernetes node. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) uncordon(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginUncordonOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginUncordon" @@ -1163,7 +1163,7 @@ func (client *BareMetalMachinesClient) uncordon(ctx context.Context, resourceGro if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -1190,7 +1190,7 @@ func (client *BareMetalMachinesClient) uncordonCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1200,7 +1200,7 @@ func (client *BareMetalMachinesClient) uncordonCreateRequest(ctx context.Context // Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - bareMetalMachineName - The name of the bare metal machine. // - bareMetalMachineUpdateParameters - The request body. @@ -1228,7 +1228,7 @@ func (client *BareMetalMachinesClient) BeginUpdate(ctx context.Context, resource // and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BareMetalMachinesClient) update(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineUpdateParameters BareMetalMachinePatchParameters, options *BareMetalMachinesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BareMetalMachinesClient.BeginUpdate" @@ -1270,7 +1270,7 @@ func (client *BareMetalMachinesClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, bareMetalMachineUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachines_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachines_client_example_test.go index 3185413213a5..9cb0b532318c 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachines_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/baremetalmachines_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListBySubscription.json func ExampleBareMetalMachinesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -91,27 +91,49 @@ func ExampleBareMetalMachinesClient_NewListBySubscriptionPager() { // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), - // KubernetesVersion: to.Ptr("1.21"), + // KubernetesVersion: to.Ptr("1.28.3"), + // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), - // MachineSKUID: to.Ptr("684E-3B16-399E"), - // OamIPv4Address: to.Ptr("192.0.2.1"), - // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), - // OSImage: to.Ptr("v20220805e"), - // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), - // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), - // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), - // RackSlot: to.Ptr[int64](1), - // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), - // SerialNumber: to.Ptr("BM1219XXX"), - // ServiceTag: to.Ptr("ST1219XXX"), - // }, - // }}, - // } + // MachineRoles: []*string{ + // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, + // MachineSKUID: to.Ptr("684E-3B16-399E"), + // OamIPv4Address: to.Ptr("192.0.2.1"), + // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), + // OSImage: to.Ptr("v20220805e"), + // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), + // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), + // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), + // RackSlot: to.Ptr[int64](1), + // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), + // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ + // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), + // DefinitionsVersion: to.Ptr("1.2.3"), + // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), + // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), + // }, + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Bare Metal Machine Identity - console"), + // }}, + // SerialNumber: to.Ptr("BM1219XXX"), + // ServiceTag: to.Ptr("ST1219XXX"), + // }, + // }}, + // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListByResourceGroup.json func ExampleBareMetalMachinesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -184,27 +206,49 @@ func ExampleBareMetalMachinesClient_NewListByResourceGroupPager() { // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), - // KubernetesVersion: to.Ptr("1.21"), + // KubernetesVersion: to.Ptr("1.28.3"), + // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), - // MachineSKUID: to.Ptr("684E-3B16-399E"), - // OamIPv4Address: to.Ptr("192.0.2.1"), - // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), - // OSImage: to.Ptr("v20220805e"), - // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), - // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), - // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), - // RackSlot: to.Ptr[int64](1), - // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), - // SerialNumber: to.Ptr("BM1219XXX"), - // ServiceTag: to.Ptr("ST1219XXX"), - // }, - // }}, - // } + // MachineRoles: []*string{ + // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, + // MachineSKUID: to.Ptr("684E-3B16-399E"), + // OamIPv4Address: to.Ptr("192.0.2.1"), + // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), + // OSImage: to.Ptr("v20220805e"), + // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), + // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), + // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), + // RackSlot: to.Ptr[int64](1), + // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), + // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ + // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), + // DefinitionsVersion: to.Ptr("1.2.3"), + // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), + // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), + // }, + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Bare Metal Machine Identity - console"), + // }}, + // SerialNumber: to.Ptr("BM1219XXX"), + // ServiceTag: to.Ptr("ST1219XXX"), + // }, + // }}, + // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json func ExampleBareMetalMachinesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -271,25 +315,47 @@ func ExampleBareMetalMachinesClient_Get() { // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), - // KubernetesVersion: to.Ptr("1.21"), + // KubernetesVersion: to.Ptr("1.28.3"), + // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), - // MachineSKUID: to.Ptr("684E-3B16-399E"), - // OamIPv4Address: to.Ptr("192.0.2.1"), - // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), - // OSImage: to.Ptr("v20220805e"), - // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), - // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), - // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), - // RackSlot: to.Ptr[int64](1), - // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), - // SerialNumber: to.Ptr("BM1219XXX"), - // ServiceTag: to.Ptr("ST1219XXX"), - // }, - // } + // MachineRoles: []*string{ + // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, + // MachineSKUID: to.Ptr("684E-3B16-399E"), + // OamIPv4Address: to.Ptr("192.0.2.1"), + // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), + // OSImage: to.Ptr("v20220805e"), + // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), + // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), + // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), + // RackSlot: to.Ptr[int64](1), + // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), + // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ + // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), + // DefinitionsVersion: to.Ptr("1.2.3"), + // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), + // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), + // }, + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Bare Metal Machine Identity - console"), + // }}, + // SerialNumber: to.Ptr("BM1219XXX"), + // ServiceTag: to.Ptr("ST1219XXX"), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Create.json func ExampleBareMetalMachinesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -385,25 +451,47 @@ func ExampleBareMetalMachinesClient_BeginCreateOrUpdate() { // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), - // KubernetesVersion: to.Ptr("1.21"), + // KubernetesVersion: to.Ptr("1.28.3"), + // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), - // MachineSKUID: to.Ptr("684E-3B16-399E"), - // OamIPv4Address: to.Ptr("192.0.2.1"), - // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), - // OSImage: to.Ptr("v20220805e"), - // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), - // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), - // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), - // RackSlot: to.Ptr[int64](1), - // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), - // SerialNumber: to.Ptr("BM1219XXX"), - // ServiceTag: to.Ptr("ST1219XXX"), - // }, - // } + // MachineRoles: []*string{ + // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, + // MachineSKUID: to.Ptr("684E-3B16-399E"), + // OamIPv4Address: to.Ptr("192.0.2.1"), + // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), + // OSImage: to.Ptr("v20220805e"), + // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), + // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), + // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), + // RackSlot: to.Ptr[int64](1), + // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), + // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ + // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), + // DefinitionsVersion: to.Ptr("1.2.3"), + // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), + // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), + // }, + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Bare Metal Machine Identity - console"), + // }}, + // SerialNumber: to.Ptr("BM1219XXX"), + // ServiceTag: to.Ptr("ST1219XXX"), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Delete.json func ExampleBareMetalMachinesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -424,7 +512,7 @@ func ExampleBareMetalMachinesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Patch.json func ExampleBareMetalMachinesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -503,25 +591,47 @@ func ExampleBareMetalMachinesClient_BeginUpdate() { // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), - // KubernetesVersion: to.Ptr("1.21"), + // KubernetesVersion: to.Ptr("1.28.3"), + // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), - // MachineSKUID: to.Ptr("684E-3B16-399E"), - // OamIPv4Address: to.Ptr("192.0.2.1"), - // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), - // OSImage: to.Ptr("v20220805e"), - // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), - // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), - // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), - // RackSlot: to.Ptr[int64](1), - // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), - // SerialNumber: to.Ptr("BM1219XXX"), - // ServiceTag: to.Ptr("ST1219XXX"), - // }, - // } + // MachineRoles: []*string{ + // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, + // MachineSKUID: to.Ptr("684E-3B16-399E"), + // OamIPv4Address: to.Ptr("192.0.2.1"), + // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), + // OSImage: to.Ptr("v20220805e"), + // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), + // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), + // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), + // RackSlot: to.Ptr[int64](1), + // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), + // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ + // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), + // DefinitionsVersion: to.Ptr("1.2.3"), + // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), + // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), + // }, + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Bare Metal Machine Identity - console"), + // }}, + // SerialNumber: to.Ptr("BM1219XXX"), + // ServiceTag: to.Ptr("ST1219XXX"), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Cordon.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Cordon.json func ExampleBareMetalMachinesClient_BeginCordon() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -545,7 +655,7 @@ func ExampleBareMetalMachinesClient_BeginCordon() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_PowerOff.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_PowerOff.json func ExampleBareMetalMachinesClient_BeginPowerOff() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -569,7 +679,7 @@ func ExampleBareMetalMachinesClient_BeginPowerOff() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Reimage.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Reimage.json func ExampleBareMetalMachinesClient_BeginReimage() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -590,7 +700,7 @@ func ExampleBareMetalMachinesClient_BeginReimage() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Replace.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Replace.json func ExampleBareMetalMachinesClient_BeginReplace() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -621,7 +731,7 @@ func ExampleBareMetalMachinesClient_BeginReplace() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Restart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Restart.json func ExampleBareMetalMachinesClient_BeginRestart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -642,7 +752,7 @@ func ExampleBareMetalMachinesClient_BeginRestart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_RunCommand.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunCommand.json func ExampleBareMetalMachinesClient_BeginRunCommand() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -669,7 +779,7 @@ func ExampleBareMetalMachinesClient_BeginRunCommand() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_RunDataExtracts.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunDataExtracts.json func ExampleBareMetalMachinesClient_BeginRunDataExtracts() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -699,7 +809,7 @@ func ExampleBareMetalMachinesClient_BeginRunDataExtracts() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_RunReadCommands.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunReadCommands.json func ExampleBareMetalMachinesClient_BeginRunReadCommands() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -736,7 +846,7 @@ func ExampleBareMetalMachinesClient_BeginRunReadCommands() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Start.json func ExampleBareMetalMachinesClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -757,7 +867,7 @@ func ExampleBareMetalMachinesClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Uncordon.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Uncordon.json func ExampleBareMetalMachinesClient_BeginUncordon() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/bmckeysets_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/bmckeysets_client.go index 60df79fb9f8e..4acf9fdb06e0 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/bmckeysets_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/bmckeysets_client.go @@ -47,7 +47,7 @@ func NewBmcKeySetsClient(subscriptionID string, credential azcore.TokenCredentia // cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - bmcKeySetName - The name of the baseboard management controller key set. @@ -75,7 +75,7 @@ func (client *BmcKeySetsClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Create a new baseboard management controller key set or update the existing one for the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BmcKeySetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, bmcKeySetName string, bmcKeySetParameters BmcKeySet, options *BmcKeySetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "BmcKeySetsClient.BeginCreateOrUpdate" @@ -121,7 +121,7 @@ func (client *BmcKeySetsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, bmcKeySetParameters); err != nil { @@ -133,7 +133,7 @@ func (client *BmcKeySetsClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete the baseboard management controller key set of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - bmcKeySetName - The name of the baseboard management controller key set. @@ -159,7 +159,7 @@ func (client *BmcKeySetsClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Delete the baseboard management controller key set of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BmcKeySetsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, bmcKeySetName string, options *BmcKeySetsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BmcKeySetsClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *BmcKeySetsClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *BmcKeySetsClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get baseboard management controller key set of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - bmcKeySetName - The name of the baseboard management controller key set. @@ -265,7 +265,7 @@ func (client *BmcKeySetsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -282,7 +282,7 @@ func (client *BmcKeySetsClient) getHandleResponse(resp *http.Response) (BmcKeySe // NewListByClusterPager - Get a list of baseboard management controller key sets for the provided cluster. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - options - BmcKeySetsClientListByClusterOptions contains the optional parameters for the BmcKeySetsClient.NewListByClusterPager @@ -330,7 +330,7 @@ func (client *BmcKeySetsClient) listByClusterCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -349,7 +349,7 @@ func (client *BmcKeySetsClient) listByClusterHandleResponse(resp *http.Response) // associated with it. Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - bmcKeySetName - The name of the baseboard management controller key set. @@ -377,7 +377,7 @@ func (client *BmcKeySetsClient) BeginUpdate(ctx context.Context, resourceGroupNa // with it. Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *BmcKeySetsClient) update(ctx context.Context, resourceGroupName string, clusterName string, bmcKeySetName string, bmcKeySetUpdateParameters BmcKeySetPatchParameters, options *BmcKeySetsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BmcKeySetsClient.BeginUpdate" @@ -423,7 +423,7 @@ func (client *BmcKeySetsClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, bmcKeySetUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/bmckeysets_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/bmckeysets_client_example_test.go index ec0215d48f6f..62d519d3dc0f 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/bmckeysets_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/bmckeysets_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_ListByCluster.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_ListByCluster.json func ExampleBmcKeySetsClient_NewListByClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -68,7 +68,7 @@ func ExampleBmcKeySetsClient_NewListByClusterPager() { // Properties: &armnetworkcloud.BmcKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BmcKeySetDetailedStatusSomeInvalid), - // DetailedStatusMessage: to.Ptr("Inalid Azure user(s) were provided: userXYZ"), + // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // PrivilegeLevel: to.Ptr(armnetworkcloud.BmcKeySetPrivilegeLevelAdministrator), @@ -80,6 +80,7 @@ func ExampleBmcKeySetsClient_NewListByClusterPager() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -87,6 +88,7 @@ func ExampleBmcKeySetsClient_NewListByClusterPager() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userXYZ@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { @@ -105,7 +107,7 @@ func ExampleBmcKeySetsClient_NewListByClusterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json func ExampleBmcKeySetsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -147,7 +149,7 @@ func ExampleBmcKeySetsClient_Get() { // Properties: &armnetworkcloud.BmcKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BmcKeySetDetailedStatusSomeInvalid), - // DetailedStatusMessage: to.Ptr("Inalid Azure user(s) were provided: userXYZ"), + // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // PrivilegeLevel: to.Ptr(armnetworkcloud.BmcKeySetPrivilegeLevelAdministrator), @@ -159,6 +161,7 @@ func ExampleBmcKeySetsClient_Get() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -166,6 +169,7 @@ func ExampleBmcKeySetsClient_Get() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userXYZ@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { @@ -182,7 +186,7 @@ func ExampleBmcKeySetsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Create.json func ExampleBmcKeySetsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -214,6 +218,7 @@ func ExampleBmcKeySetsClient_BeginCreateOrUpdate() { SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, + UserPrincipalName: to.Ptr("userABC@contoso.com"), }, { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -221,6 +226,7 @@ func ExampleBmcKeySetsClient_BeginCreateOrUpdate() { SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, + UserPrincipalName: to.Ptr("userABC@contoso.com"), }}, }, }, nil) @@ -258,7 +264,7 @@ func ExampleBmcKeySetsClient_BeginCreateOrUpdate() { // Properties: &armnetworkcloud.BmcKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BmcKeySetDetailedStatusSomeInvalid), - // DetailedStatusMessage: to.Ptr("Inalid Azure user(s) were provided: userXYZ"), + // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // PrivilegeLevel: to.Ptr(armnetworkcloud.BmcKeySetPrivilegeLevelAdministrator), @@ -270,6 +276,7 @@ func ExampleBmcKeySetsClient_BeginCreateOrUpdate() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -277,6 +284,7 @@ func ExampleBmcKeySetsClient_BeginCreateOrUpdate() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userXYZ@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { @@ -293,7 +301,7 @@ func ExampleBmcKeySetsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Delete.json func ExampleBmcKeySetsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -314,7 +322,7 @@ func ExampleBmcKeySetsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Patch.json func ExampleBmcKeySetsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -335,6 +343,7 @@ func ExampleBmcKeySetsClient_BeginUpdate() { SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, + UserPrincipalName: to.Ptr("userABC@contoso.com"), }, { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -342,6 +351,7 @@ func ExampleBmcKeySetsClient_BeginUpdate() { SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, + UserPrincipalName: to.Ptr("userABC@contoso.com"), }}, }, Tags: map[string]*string{ @@ -383,7 +393,7 @@ func ExampleBmcKeySetsClient_BeginUpdate() { // Properties: &armnetworkcloud.BmcKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BmcKeySetDetailedStatusSomeInvalid), - // DetailedStatusMessage: to.Ptr("Inalid Azure user(s) were provided: userXYZ"), + // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // PrivilegeLevel: to.Ptr(armnetworkcloud.BmcKeySetPrivilegeLevelAdministrator), @@ -395,6 +405,7 @@ func ExampleBmcKeySetsClient_BeginUpdate() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), @@ -402,6 +413,7 @@ func ExampleBmcKeySetsClient_BeginUpdate() { // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, + // UserPrincipalName: to.Ptr("userXYZ@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/client_factory.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/client_factory.go index e9c7b4c3e412..e8bf4a37f815 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/client_factory.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/client_factory.go @@ -17,8 +17,7 @@ import ( // Don't use this type directly, use NewClientFactory instead. type ClientFactory struct { subscriptionID string - credential azcore.TokenCredential - options *arm.ClientOptions + internal *arm.Client } // NewClientFactory creates a new instance of ClientFactory with the specified values. @@ -27,126 +26,171 @@ type ClientFactory struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName, moduleVersion, credential, options) + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } return &ClientFactory{ - subscriptionID: subscriptionID, credential: credential, - options: options.Clone(), + subscriptionID: subscriptionID, + internal: internal, }, nil } // NewAgentPoolsClient creates a new instance of AgentPoolsClient. func (c *ClientFactory) NewAgentPoolsClient() *AgentPoolsClient { - subClient, _ := NewAgentPoolsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &AgentPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewBareMetalMachineKeySetsClient creates a new instance of BareMetalMachineKeySetsClient. func (c *ClientFactory) NewBareMetalMachineKeySetsClient() *BareMetalMachineKeySetsClient { - subClient, _ := NewBareMetalMachineKeySetsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &BareMetalMachineKeySetsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewBareMetalMachinesClient creates a new instance of BareMetalMachinesClient. func (c *ClientFactory) NewBareMetalMachinesClient() *BareMetalMachinesClient { - subClient, _ := NewBareMetalMachinesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &BareMetalMachinesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewBmcKeySetsClient creates a new instance of BmcKeySetsClient. func (c *ClientFactory) NewBmcKeySetsClient() *BmcKeySetsClient { - subClient, _ := NewBmcKeySetsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &BmcKeySetsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewCloudServicesNetworksClient creates a new instance of CloudServicesNetworksClient. func (c *ClientFactory) NewCloudServicesNetworksClient() *CloudServicesNetworksClient { - subClient, _ := NewCloudServicesNetworksClient(c.subscriptionID, c.credential, c.options) - return subClient + return &CloudServicesNetworksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewClusterManagersClient creates a new instance of ClusterManagersClient. func (c *ClientFactory) NewClusterManagersClient() *ClusterManagersClient { - subClient, _ := NewClusterManagersClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ClusterManagersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewClustersClient creates a new instance of ClustersClient. func (c *ClientFactory) NewClustersClient() *ClustersClient { - subClient, _ := NewClustersClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ClustersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewConsolesClient creates a new instance of ConsolesClient. func (c *ClientFactory) NewConsolesClient() *ConsolesClient { - subClient, _ := NewConsolesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ConsolesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewKubernetesClusterFeaturesClient creates a new instance of KubernetesClusterFeaturesClient. +func (c *ClientFactory) NewKubernetesClusterFeaturesClient() *KubernetesClusterFeaturesClient { + return &KubernetesClusterFeaturesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKubernetesClustersClient creates a new instance of KubernetesClustersClient. func (c *ClientFactory) NewKubernetesClustersClient() *KubernetesClustersClient { - subClient, _ := NewKubernetesClustersClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KubernetesClustersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewL2NetworksClient creates a new instance of L2NetworksClient. func (c *ClientFactory) NewL2NetworksClient() *L2NetworksClient { - subClient, _ := NewL2NetworksClient(c.subscriptionID, c.credential, c.options) - return subClient + return &L2NetworksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewL3NetworksClient creates a new instance of L3NetworksClient. func (c *ClientFactory) NewL3NetworksClient() *L3NetworksClient { - subClient, _ := NewL3NetworksClient(c.subscriptionID, c.credential, c.options) - return subClient + return &L3NetworksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewMetricsConfigurationsClient creates a new instance of MetricsConfigurationsClient. func (c *ClientFactory) NewMetricsConfigurationsClient() *MetricsConfigurationsClient { - subClient, _ := NewMetricsConfigurationsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &MetricsConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewOperationsClient creates a new instance of OperationsClient. func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient + return &OperationsClient{ + internal: c.internal, + } } // NewRackSKUsClient creates a new instance of RackSKUsClient. func (c *ClientFactory) NewRackSKUsClient() *RackSKUsClient { - subClient, _ := NewRackSKUsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &RackSKUsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewRacksClient creates a new instance of RacksClient. func (c *ClientFactory) NewRacksClient() *RacksClient { - subClient, _ := NewRacksClient(c.subscriptionID, c.credential, c.options) - return subClient + return &RacksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewStorageAppliancesClient creates a new instance of StorageAppliancesClient. func (c *ClientFactory) NewStorageAppliancesClient() *StorageAppliancesClient { - subClient, _ := NewStorageAppliancesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &StorageAppliancesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewTrunkedNetworksClient creates a new instance of TrunkedNetworksClient. func (c *ClientFactory) NewTrunkedNetworksClient() *TrunkedNetworksClient { - subClient, _ := NewTrunkedNetworksClient(c.subscriptionID, c.credential, c.options) - return subClient + return &TrunkedNetworksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewVirtualMachinesClient creates a new instance of VirtualMachinesClient. func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient { - subClient, _ := NewVirtualMachinesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &VirtualMachinesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewVolumesClient creates a new instance of VolumesClient. func (c *ClientFactory) NewVolumesClient() *VolumesClient { - subClient, _ := NewVolumesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &VolumesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/cloudservicesnetworks_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/cloudservicesnetworks_client.go index 3fa3e32aa6b7..f535e7d44482 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/cloudservicesnetworks_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/cloudservicesnetworks_client.go @@ -46,7 +46,7 @@ func NewCloudServicesNetworksClient(subscriptionID string, credential azcore.Tok // BeginCreateOrUpdate - Create a new cloud services network or update the properties of the existing cloud services network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - cloudServicesNetworkName - The name of the cloud services network. // - cloudServicesNetworkParameters - The request body. @@ -73,7 +73,7 @@ func (client *CloudServicesNetworksClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Create a new cloud services network or update the properties of the existing cloud services network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *CloudServicesNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, cloudServicesNetworkParameters CloudServicesNetwork, options *CloudServicesNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "CloudServicesNetworksClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *CloudServicesNetworksClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, cloudServicesNetworkParameters); err != nil { @@ -127,7 +127,7 @@ func (client *CloudServicesNetworksClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Delete the provided cloud services network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - cloudServicesNetworkName - The name of the cloud services network. // - options - CloudServicesNetworksClientBeginDeleteOptions contains the optional parameters for the CloudServicesNetworksClient.BeginDelete @@ -153,7 +153,7 @@ func (client *CloudServicesNetworksClient) BeginDelete(ctx context.Context, reso // Delete - Delete the provided cloud services network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *CloudServicesNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, options *CloudServicesNetworksClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "CloudServicesNetworksClient.BeginDelete" @@ -195,7 +195,7 @@ func (client *CloudServicesNetworksClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +204,7 @@ func (client *CloudServicesNetworksClient) deleteCreateRequest(ctx context.Conte // Get - Get properties of the provided cloud services network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - cloudServicesNetworkName - The name of the cloud services network. // - options - CloudServicesNetworksClientGetOptions contains the optional parameters for the CloudServicesNetworksClient.Get @@ -251,7 +251,7 @@ func (client *CloudServicesNetworksClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -268,7 +268,7 @@ func (client *CloudServicesNetworksClient) getHandleResponse(resp *http.Response // NewListByResourceGroupPager - Get a list of cloud services networks in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - CloudServicesNetworksClientListByResourceGroupOptions contains the optional parameters for the CloudServicesNetworksClient.NewListByResourceGroupPager // method. @@ -311,7 +311,7 @@ func (client *CloudServicesNetworksClient) listByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,7 +328,7 @@ func (client *CloudServicesNetworksClient) listByResourceGroupHandleResponse(res // NewListBySubscriptionPager - Get a list of cloud services networks in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - CloudServicesNetworksClientListBySubscriptionOptions contains the optional parameters for the CloudServicesNetworksClient.NewListBySubscriptionPager // method. func (client *CloudServicesNetworksClient) NewListBySubscriptionPager(options *CloudServicesNetworksClientListBySubscriptionOptions) *runtime.Pager[CloudServicesNetworksClientListBySubscriptionResponse] { @@ -366,7 +366,7 @@ func (client *CloudServicesNetworksClient) listBySubscriptionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -385,7 +385,7 @@ func (client *CloudServicesNetworksClient) listBySubscriptionHandleResponse(resp // and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - cloudServicesNetworkName - The name of the cloud services network. // - cloudServicesNetworkUpdateParameters - The request body. @@ -413,7 +413,7 @@ func (client *CloudServicesNetworksClient) BeginUpdate(ctx context.Context, reso // tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *CloudServicesNetworksClient) update(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, cloudServicesNetworkUpdateParameters CloudServicesNetworkPatchParameters, options *CloudServicesNetworksClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "CloudServicesNetworksClient.BeginUpdate" @@ -455,7 +455,7 @@ func (client *CloudServicesNetworksClient) updateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, cloudServicesNetworkUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/cloudservicesnetworks_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/cloudservicesnetworks_client_example_test.go index dd96cf00ea87..ab045faa4273 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/cloudservicesnetworks_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/cloudservicesnetworks_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListBySubscription.json func ExampleCloudServicesNetworksClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -69,7 +69,7 @@ func ExampleCloudServicesNetworksClient_NewListBySubscriptionPager() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, @@ -84,7 +84,7 @@ func ExampleCloudServicesNetworksClient_NewListBySubscriptionPager() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, @@ -96,7 +96,7 @@ func ExampleCloudServicesNetworksClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListByResourceGroup.json func ExampleCloudServicesNetworksClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -147,7 +147,7 @@ func ExampleCloudServicesNetworksClient_NewListByResourceGroupPager() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, @@ -162,7 +162,7 @@ func ExampleCloudServicesNetworksClient_NewListByResourceGroupPager() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, @@ -174,7 +174,7 @@ func ExampleCloudServicesNetworksClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json func ExampleCloudServicesNetworksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -219,7 +219,7 @@ func ExampleCloudServicesNetworksClient_Get() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, @@ -234,7 +234,7 @@ func ExampleCloudServicesNetworksClient_Get() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, @@ -244,7 +244,7 @@ func ExampleCloudServicesNetworksClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Create.json func ExampleCloudServicesNetworksClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -271,7 +271,7 @@ func ExampleCloudServicesNetworksClient_BeginCreateOrUpdate() { Category: to.Ptr("azure-resource-management"), Endpoints: []*armnetworkcloud.EndpointDependency{ { - DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), Port: to.Ptr[int64](443), }}, }}, @@ -315,7 +315,7 @@ func ExampleCloudServicesNetworksClient_BeginCreateOrUpdate() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, @@ -330,7 +330,7 @@ func ExampleCloudServicesNetworksClient_BeginCreateOrUpdate() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, @@ -340,7 +340,7 @@ func ExampleCloudServicesNetworksClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Delete.json func ExampleCloudServicesNetworksClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -361,7 +361,7 @@ func ExampleCloudServicesNetworksClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Patch.json func ExampleCloudServicesNetworksClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -379,7 +379,7 @@ func ExampleCloudServicesNetworksClient_BeginUpdate() { Category: to.Ptr("azure-resource-management"), Endpoints: []*armnetworkcloud.EndpointDependency{ { - DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), Port: to.Ptr[int64](443), }}, }}, @@ -427,7 +427,7 @@ func ExampleCloudServicesNetworksClient_BeginUpdate() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, @@ -442,7 +442,7 @@ func ExampleCloudServicesNetworksClient_BeginUpdate() { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { - // DomainName: to.Ptr("https://storageaccountex.blob.core.windows.net"), + // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/clustermanagers_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/clustermanagers_client.go index e66bd4056550..093367e9cc4e 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/clustermanagers_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/clustermanagers_client.go @@ -46,7 +46,7 @@ func NewClusterManagersClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Create a new cluster manager or update properties of the cluster manager if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterManagerName - The name of the cluster manager. // - clusterManagerParameters - The request body. @@ -73,7 +73,7 @@ func (client *ClusterManagersClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Create a new cluster manager or update properties of the cluster manager if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ClusterManagersClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterManagerName string, clusterManagerParameters ClusterManager, options *ClusterManagersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ClusterManagersClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *ClusterManagersClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, clusterManagerParameters); err != nil { @@ -127,7 +127,7 @@ func (client *ClusterManagersClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Delete the provided cluster manager. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterManagerName - The name of the cluster manager. // - options - ClusterManagersClientBeginDeleteOptions contains the optional parameters for the ClusterManagersClient.BeginDelete @@ -153,7 +153,7 @@ func (client *ClusterManagersClient) BeginDelete(ctx context.Context, resourceGr // Delete - Delete the provided cluster manager. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ClusterManagersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterManagerName string, options *ClusterManagersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ClusterManagersClient.BeginDelete" @@ -195,7 +195,7 @@ func (client *ClusterManagersClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +204,7 @@ func (client *ClusterManagersClient) deleteCreateRequest(ctx context.Context, re // Get - Get the properties of the provided cluster manager. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterManagerName - The name of the cluster manager. // - options - ClusterManagersClientGetOptions contains the optional parameters for the ClusterManagersClient.Get method. @@ -250,7 +250,7 @@ func (client *ClusterManagersClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,7 +267,7 @@ func (client *ClusterManagersClient) getHandleResponse(resp *http.Response) (Clu // NewListByResourceGroupPager - Get a list of cluster managers in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ClusterManagersClientListByResourceGroupOptions contains the optional parameters for the ClusterManagersClient.NewListByResourceGroupPager // method. @@ -310,7 +310,7 @@ func (client *ClusterManagersClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,7 +327,7 @@ func (client *ClusterManagersClient) listByResourceGroupHandleResponse(resp *htt // NewListBySubscriptionPager - Get a list of cluster managers in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - ClusterManagersClientListBySubscriptionOptions contains the optional parameters for the ClusterManagersClient.NewListBySubscriptionPager // method. func (client *ClusterManagersClient) NewListBySubscriptionPager(options *ClusterManagersClientListBySubscriptionOptions) *runtime.Pager[ClusterManagersClientListBySubscriptionResponse] { @@ -365,7 +365,7 @@ func (client *ClusterManagersClient) listBySubscriptionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -384,7 +384,7 @@ func (client *ClusterManagersClient) listBySubscriptionHandleResponse(resp *http // and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterManagerName - The name of the cluster manager. // - clusterManagerUpdateParameters - The request body. @@ -431,7 +431,7 @@ func (client *ClusterManagersClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, clusterManagerUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/clustermanagers_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/clustermanagers_client_example_test.go index e90a625d591d..6049cf64a5df 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/clustermanagers_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/clustermanagers_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListBySubscription.json func ExampleClusterManagersClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,6 +59,11 @@ func ExampleClusterManagersClient_NewListBySubscriptionPager() { // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), + // TenantID: to.Ptr("199e9999-e89b-12d3-a456-426655441111"), + // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ @@ -88,7 +93,7 @@ func ExampleClusterManagersClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListByResourceGroup.json func ExampleClusterManagersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -129,6 +134,11 @@ func ExampleClusterManagersClient_NewListByResourceGroupPager() { // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), + // TenantID: to.Ptr("199e9999-e89b-12d3-a456-426655441111"), + // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ @@ -158,7 +168,7 @@ func ExampleClusterManagersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json func ExampleClusterManagersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -193,6 +203,11 @@ func ExampleClusterManagersClient_Get() { // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), + // TenantID: to.Ptr("199e9999-e89b-12d3-a456-426655441111"), + // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ @@ -220,8 +235,8 @@ func ExampleClusterManagersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Create.json -func ExampleClusterManagersClient_BeginCreateOrUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create.json +func ExampleClusterManagersClient_BeginCreateOrUpdate_createOrUpdateClusterManager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -237,6 +252,9 @@ func ExampleClusterManagersClient_BeginCreateOrUpdate() { "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, + Identity: &armnetworkcloud.ManagedServiceIdentity{ + Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), + }, Properties: &armnetworkcloud.ClusterManagerProperties{ AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), @@ -273,6 +291,11 @@ func ExampleClusterManagersClient_BeginCreateOrUpdate() { // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), + // TenantID: to.Ptr("199e9999-e89b-12d3-a456-426655441111"), + // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ @@ -300,7 +323,102 @@ func ExampleClusterManagersClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create_Uami.json +func ExampleClusterManagersClient_BeginCreateOrUpdate_createOrUpdateClusterManagerWithUserAssignedIdentity() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewClusterManagersClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "clusterManagerName", armnetworkcloud.ClusterManager{ + Location: to.Ptr("location"), + Tags: map[string]*string{ + "key1": to.Ptr("myvalue1"), + "key2": to.Ptr("myvalue2"), + }, + Identity: &armnetworkcloud.ManagedServiceIdentity{ + Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": {}, + }, + }, + Properties: &armnetworkcloud.ClusterManagerProperties{ + AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), + FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), + ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ + Name: to.Ptr("my-managed-rg"), + Location: to.Ptr("East US"), + }, + }, + }, 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.ClusterManager = armnetworkcloud.ClusterManager{ + // Name: to.Ptr("clusterManagerName"), + // Type: to.Ptr("Microsoft.NetworkCloud/clusterManagers"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // ClientID: to.Ptr("200e0000-e89b-12d3-a456-426655440000"), + // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), + // }, + // }, + // }, + // Properties: &armnetworkcloud.ClusterManagerProperties{ + // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), + // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ + // { + // SupportExpiryDate: to.Ptr("2023-04-29"), + // TargetClusterVersion: to.Ptr("1.0.0"), + // }, + // { + // SupportExpiryDate: to.Ptr("2025-01-01"), + // TargetClusterVersion: to.Ptr("1.0.2"), + // }}, + // DetailedStatus: to.Ptr(armnetworkcloud.ClusterManagerDetailedStatusAvailable), + // DetailedStatusMessage: to.Ptr("cluster manager is up and running"), + // FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), + // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ + // Name: to.Ptr("my-managed-rg"), + // Location: to.Ptr("East US"), + // }, + // ManagerExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // ProvisioningState: to.Ptr(armnetworkcloud.ClusterManagerProvisioningStateSucceeded), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Delete.json func ExampleClusterManagersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -321,7 +439,7 @@ func ExampleClusterManagersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Patch.json func ExampleClusterManagersClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -333,6 +451,13 @@ func ExampleClusterManagersClient_Update() { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClusterManagersClient().Update(ctx, "resourceGroupName", "clusterManagerName", armnetworkcloud.ClusterManagerPatchParameters{ + Identity: &armnetworkcloud.ManagedServiceIdentity{ + Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": nil, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": {}, + }, + }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), @@ -361,6 +486,15 @@ func ExampleClusterManagersClient_Update() { // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": &armnetworkcloud.UserAssignedIdentity{ + // ClientID: to.Ptr("200e0000-e89b-12d3-a456-426655440000"), + // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), + // }, + // }, + // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/clusters_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/clusters_client.go index 2c9786f60862..d29574cef86c 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/clusters_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/clusters_client.go @@ -43,10 +43,93 @@ func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, return client, nil } +// BeginContinueUpdateVersion - Trigger the continuation of an update for a cluster with a matching update strategy that has +// paused after completing a segment of the update. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the cluster. +// - clusterContinueUpdateVersionParameters - The request body. +// - options - ClustersClientBeginContinueUpdateVersionOptions contains the optional parameters for the ClustersClient.BeginContinueUpdateVersion +// method. +func (client *ClustersClient) BeginContinueUpdateVersion(ctx context.Context, resourceGroupName string, clusterName string, clusterContinueUpdateVersionParameters ClusterContinueUpdateVersionParameters, options *ClustersClientBeginContinueUpdateVersionOptions) (*runtime.Poller[ClustersClientContinueUpdateVersionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.continueUpdateVersion(ctx, resourceGroupName, clusterName, clusterContinueUpdateVersionParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientContinueUpdateVersionResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientContinueUpdateVersionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ContinueUpdateVersion - Trigger the continuation of an update for a cluster with a matching update strategy that has paused +// after completing a segment of the update. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +func (client *ClustersClient) continueUpdateVersion(ctx context.Context, resourceGroupName string, clusterName string, clusterContinueUpdateVersionParameters ClusterContinueUpdateVersionParameters, options *ClustersClientBeginContinueUpdateVersionOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginContinueUpdateVersion" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.continueUpdateVersionCreateRequest(ctx, resourceGroupName, clusterName, clusterContinueUpdateVersionParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// continueUpdateVersionCreateRequest creates the ContinueUpdateVersion request. +func (client *ClustersClient) continueUpdateVersionCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, clusterContinueUpdateVersionParameters ClusterContinueUpdateVersionParameters, options *ClustersClientBeginContinueUpdateVersionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/continueUpdateVersion" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, clusterContinueUpdateVersionParameters); err != nil { + return nil, err + } + return req, nil +} + // BeginCreateOrUpdate - Create a new cluster or update the properties of the cluster if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - clusterParameters - The request body. @@ -73,7 +156,7 @@ func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create a new cluster or update the properties of the cluster if it exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, clusterParameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ClustersClient.BeginCreateOrUpdate" @@ -115,7 +198,7 @@ func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, clusterParameters); err != nil { @@ -127,7 +210,7 @@ func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Delete the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. @@ -152,7 +235,7 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ClustersClient.BeginDelete" @@ -194,16 +277,16 @@ func (client *ClustersClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDeploy - Deploy the cluster to the provided rack. +// BeginDeploy - Deploy the cluster using the rack configuration provided during creation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - options - ClustersClientBeginDeployOptions contains the optional parameters for the ClustersClient.BeginDeploy method. @@ -225,10 +308,10 @@ func (client *ClustersClient) BeginDeploy(ctx context.Context, resourceGroupName } } -// Deploy - Deploy the cluster to the provided rack. +// Deploy - Deploy the cluster using the rack configuration provided during creation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ClustersClient) deploy(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeployOptions) (*http.Response, error) { var err error const operationName = "ClustersClient.BeginDeploy" @@ -243,7 +326,7 @@ func (client *ClustersClient) deploy(ctx context.Context, resourceGroupName stri if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -270,7 +353,7 @@ func (client *ClustersClient) deployCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.ClusterDeployParameters != nil { @@ -285,7 +368,7 @@ func (client *ClustersClient) deployCreateRequest(ctx context.Context, resourceG // Get - Get properties of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. @@ -331,7 +414,7 @@ func (client *ClustersClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,7 +431,7 @@ func (client *ClustersClient) getHandleResponse(resp *http.Response) (ClustersCl // NewListByResourceGroupPager - Get a list of clusters in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager // method. @@ -391,7 +474,7 @@ func (client *ClustersClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -408,7 +491,7 @@ func (client *ClustersClient) listByResourceGroupHandleResponse(resp *http.Respo // NewListBySubscriptionPager - Get a list of clusters in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager // method. func (client *ClustersClient) NewListBySubscriptionPager(options *ClustersClientListBySubscriptionOptions) *runtime.Pager[ClustersClientListBySubscriptionResponse] { @@ -446,7 +529,7 @@ func (client *ClustersClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -461,11 +544,96 @@ func (client *ClustersClient) listBySubscriptionHandleResponse(resp *http.Respon return result, nil } +// BeginScanRuntime - Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance +// with the cluster configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the cluster. +// - options - ClustersClientBeginScanRuntimeOptions contains the optional parameters for the ClustersClient.BeginScanRuntime +// method. +func (client *ClustersClient) BeginScanRuntime(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginScanRuntimeOptions) (*runtime.Poller[ClustersClientScanRuntimeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.scanRuntime(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientScanRuntimeResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientScanRuntimeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ScanRuntime - Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance +// with the cluster configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +func (client *ClustersClient) scanRuntime(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginScanRuntimeOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginScanRuntime" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.scanRuntimeCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// scanRuntimeCreateRequest creates the ScanRuntime request. +func (client *ClustersClient) scanRuntimeCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginScanRuntimeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/scanRuntime" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.ClusterScanRuntimeParameters != nil { + if err := runtime.MarshalAsJSON(req, *options.ClusterScanRuntimeParameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + // BeginUpdate - Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties // and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - clusterUpdateParameters - The request body. @@ -492,7 +660,7 @@ func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName // updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ClustersClient) update(ctx context.Context, resourceGroupName string, clusterName string, clusterUpdateParameters ClusterPatchParameters, options *ClustersClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ClustersClient.BeginUpdate" @@ -534,7 +702,7 @@ func (client *ClustersClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, clusterUpdateParameters); err != nil { @@ -546,7 +714,7 @@ func (client *ClustersClient) updateCreateRequest(ctx context.Context, resourceG // BeginUpdateVersion - Update the version of the provided cluster to one of the available supported versions. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - clusterUpdateVersionParameters - The request body. @@ -573,7 +741,7 @@ func (client *ClustersClient) BeginUpdateVersion(ctx context.Context, resourceGr // UpdateVersion - Update the version of the provided cluster to one of the available supported versions. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ClustersClient) updateVersion(ctx context.Context, resourceGroupName string, clusterName string, clusterUpdateVersionParameters ClusterUpdateVersionParameters, options *ClustersClientBeginUpdateVersionOptions) (*http.Response, error) { var err error const operationName = "ClustersClient.BeginUpdateVersion" @@ -588,7 +756,7 @@ func (client *ClustersClient) updateVersion(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -615,7 +783,7 @@ func (client *ClustersClient) updateVersionCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, clusterUpdateVersionParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/clusters_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/clusters_client_example_test.go index 51653d0d3368..76d08c9609d9 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/clusters_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/clusters_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListBySubscription.json func ExampleClustersClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -63,6 +63,13 @@ func ExampleClustersClient_NewListBySubscriptionPager() { // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // }, + // }, + // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ @@ -139,6 +146,13 @@ func ExampleClustersClient_NewListBySubscriptionPager() { // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), @@ -194,7 +208,21 @@ func ExampleClustersClient_NewListBySubscriptionPager() { // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, @@ -203,7 +231,7 @@ func ExampleClustersClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListByResourceGroup.json func ExampleClustersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -248,6 +276,13 @@ func ExampleClustersClient_NewListByResourceGroupPager() { // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // }, + // }, + // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ @@ -324,6 +359,13 @@ func ExampleClustersClient_NewListByResourceGroupPager() { // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), @@ -379,7 +421,21 @@ func ExampleClustersClient_NewListByResourceGroupPager() { // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, @@ -388,7 +444,7 @@ func ExampleClustersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json func ExampleClustersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -427,6 +483,13 @@ func ExampleClustersClient_Get() { // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // }, + // }, + // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ @@ -503,6 +566,13 @@ func ExampleClustersClient_Get() { // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), @@ -558,14 +628,28 @@ func ExampleClustersClient_Get() { // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Create.json func ExampleClustersClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -586,6 +670,12 @@ func ExampleClustersClient_BeginCreateOrUpdate() { Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, + Identity: &armnetworkcloud.ManagedServiceIdentity{ + Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": {}, + }, + }, Properties: &armnetworkcloud.ClusterProperties{ AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ @@ -638,6 +728,13 @@ func ExampleClustersClient_BeginCreateOrUpdate() { }, ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), ClusterVersion: to.Ptr("1.0.0"), + CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + }, + ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + }, ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), @@ -690,6 +787,20 @@ func ExampleClustersClient_BeginCreateOrUpdate() { Location: to.Ptr("East US"), }, NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), + RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + }, + SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + }, + UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + MaxUnavailable: to.Ptr[int64](4), + StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + ThresholdValue: to.Ptr[int64](4), + WaitTimeMinutes: to.Ptr[int64](10), + }, }, }, nil) if err != nil { @@ -723,6 +834,13 @@ func ExampleClustersClient_BeginCreateOrUpdate() { // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // }, + // }, + // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ @@ -799,6 +917,13 @@ func ExampleClustersClient_BeginCreateOrUpdate() { // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), @@ -854,14 +979,28 @@ func ExampleClustersClient_BeginCreateOrUpdate() { // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Delete.json func ExampleClustersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -882,7 +1021,7 @@ func ExampleClustersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json func ExampleClustersClient_BeginUpdate_patchClusterAggregatorOrSingleRackDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -978,6 +1117,13 @@ func ExampleClustersClient_BeginUpdate_patchClusterAggregatorOrSingleRackDefinit // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // }, + // }, + // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ @@ -1054,6 +1200,13 @@ func ExampleClustersClient_BeginUpdate_patchClusterAggregatorOrSingleRackDefinit // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), @@ -1109,15 +1262,29 @@ func ExampleClustersClient_BeginUpdate_patchClusterAggregatorOrSingleRackDefinit // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Patch_Location.json -func ExampleClustersClient_BeginUpdate_patchClusterLocation() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_CommandOutput.json +func ExampleClustersClient_BeginUpdate_patchClusterCommandOutput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1128,8 +1295,21 @@ func ExampleClustersClient_BeginUpdate_patchClusterLocation() { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ + Identity: &armnetworkcloud.ManagedServiceIdentity{ + Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": nil, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": {}, + }, + }, Properties: &armnetworkcloud.ClusterPatchProperties{ - ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), + CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2"), + }, + ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), @@ -1167,6 +1347,15 @@ func ExampleClustersClient_BeginUpdate_patchClusterLocation() { // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": &armnetworkcloud.UserAssignedIdentity{ + // ClientID: to.Ptr("200e0000-e89b-12d3-a456-426655440000"), + // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), + // }, + // }, + // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ @@ -1243,6 +1432,13 @@ func ExampleClustersClient_BeginUpdate_patchClusterLocation() { // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), @@ -1298,15 +1494,29 @@ func ExampleClustersClient_BeginUpdate_patchClusterLocation() { // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Deploy.json -func ExampleClustersClient_BeginDeploy_deployCluster() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_Location.json +func ExampleClustersClient_BeginUpdate_patchClusterLocation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1316,18 +1526,214 @@ func ExampleClustersClient_BeginDeploy_deployCluster() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewClustersClient().BeginDeploy(ctx, "resourceGroupName", "clusterName", &armnetworkcloud.ClustersClientBeginDeployOptions{ClusterDeployParameters: &armnetworkcloud.ClusterDeployParameters{}}) + poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ + Properties: &armnetworkcloud.ClusterPatchProperties{ + ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), + }, + Tags: map[string]*string{ + "key1": to.Ptr("myvalue1"), + "key2": to.Ptr("myvalue2"), + }, + }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, nil) + 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.Cluster = armnetworkcloud.Cluster{ + // Name: to.Ptr("clusterName"), + // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // }, + // }, + // }, + // Properties: &armnetworkcloud.ClusterProperties{ + // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ + // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName1"), + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // }, + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName2"), + // RackSlot: to.Ptr[int64](2), + // SerialNumber: to.Ptr("BM1219YYY"), + // }}, + // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), + // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), + // RackSerialNumber: to.Ptr("AA1234"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), + // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ + // { + // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // StorageApplianceName: to.Ptr("vmName"), + // }}, + // }, + // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), + // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ + // { + // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), + // ExpectedDuration: to.Ptr("0:0:30"), + // ImpactDescription: to.Ptr("can be done in place"), + // SupportExpiryDate: to.Ptr("2025-01-01"), + // TargetClusterVersion: to.Ptr("1.0.2"), + // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), + // }}, + // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ + // AvailableApplianceStorageGB: to.Ptr[int64](3), + // AvailableCoreCount: to.Ptr[int64](10), + // AvailableHostStorageGB: to.Ptr[int64](20), + // AvailableMemoryGB: to.Ptr[int64](20), + // TotalApplianceStorageGB: to.Ptr[int64](10), + // TotalCoreCount: to.Ptr[int64](10), + // TotalHostStorageGB: to.Ptr[int64](10), + // TotalMemoryGB: to.Ptr[int64](10), + // }, + // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), + // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), + // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), + // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), + // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ + // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), + // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), + // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), + // }, + // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), + // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, + // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ + // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), + // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), + // Value: to.Ptr[int64](90), + // }, + // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ + // { + // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName1"), + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // }, + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName2"), + // RackSlot: to.Ptr[int64](2), + // SerialNumber: to.Ptr("BM1219YYY"), + // }}, + // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), + // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), + // RackSerialNumber: to.Ptr("AA1234"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), + // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ + // { + // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // StorageApplianceName: to.Ptr("vmName"), + // }}, + // }}, + // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), + // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), + // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ + // Name: to.Ptr("my-managed-rg"), + // Location: to.Ptr("East US"), + // }, + // ManualActionCount: to.Ptr[int64](0), + // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), + // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, + // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, + // WorkloadResourceIDs: []*string{ + // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Deploy_SkipValidation.json -func ExampleClustersClient_BeginDeploy_deployClusterSkippingValidation() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_RuntimeProtectionConfiguration.json +func ExampleClustersClient_BeginUpdate_patchRuntimeProtectionConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1337,9 +1743,739 @@ func ExampleClustersClient_BeginDeploy_deployClusterSkippingValidation() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewClustersClient().BeginDeploy(ctx, "resourceGroupName", "clusterName", &armnetworkcloud.ClustersClientBeginDeployOptions{ClusterDeployParameters: &armnetworkcloud.ClusterDeployParameters{ - SkipValidationsForMachines: []*string{ - to.Ptr("bmmName1")}, + poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ + Properties: &armnetworkcloud.ClusterPatchProperties{ + RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + }, + }, + Tags: map[string]*string{ + "key1": to.Ptr("myvalue1"), + "key2": to.Ptr("myvalue2"), + }, + }, 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.Cluster = armnetworkcloud.Cluster{ + // Name: to.Ptr("clusterName"), + // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // }, + // }, + // }, + // Properties: &armnetworkcloud.ClusterProperties{ + // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ + // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName1"), + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // }, + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName2"), + // RackSlot: to.Ptr[int64](2), + // SerialNumber: to.Ptr("BM1219YYY"), + // }}, + // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), + // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), + // RackSerialNumber: to.Ptr("AA1234"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), + // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ + // { + // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // StorageApplianceName: to.Ptr("vmName"), + // }}, + // }, + // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), + // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ + // { + // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), + // ExpectedDuration: to.Ptr("0:0:30"), + // ImpactDescription: to.Ptr("can be done in place"), + // SupportExpiryDate: to.Ptr("2025-01-01"), + // TargetClusterVersion: to.Ptr("1.0.2"), + // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), + // }}, + // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ + // AvailableApplianceStorageGB: to.Ptr[int64](3), + // AvailableCoreCount: to.Ptr[int64](10), + // AvailableHostStorageGB: to.Ptr[int64](20), + // AvailableMemoryGB: to.Ptr[int64](20), + // TotalApplianceStorageGB: to.Ptr[int64](10), + // TotalCoreCount: to.Ptr[int64](10), + // TotalHostStorageGB: to.Ptr[int64](10), + // TotalMemoryGB: to.Ptr[int64](10), + // }, + // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), + // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), + // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), + // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), + // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ + // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), + // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), + // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), + // }, + // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), + // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, + // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ + // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), + // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), + // Value: to.Ptr[int64](90), + // }, + // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ + // { + // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName1"), + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // }, + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName2"), + // RackSlot: to.Ptr[int64](2), + // SerialNumber: to.Ptr("BM1219YYY"), + // }}, + // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), + // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), + // RackSerialNumber: to.Ptr("AA1234"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), + // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ + // { + // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // StorageApplianceName: to.Ptr("vmName"), + // }}, + // }}, + // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), + // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), + // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ + // Name: to.Ptr("my-managed-rg"), + // Location: to.Ptr("East US"), + // }, + // ManualActionCount: to.Ptr[int64](0), + // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), + // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, + // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, + // WorkloadResourceIDs: []*string{ + // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_SecretArchive.json +func ExampleClustersClient_BeginUpdate_patchSecretArchive() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ + Properties: &armnetworkcloud.ClusterPatchProperties{ + SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + }, + }, + Tags: map[string]*string{ + "key1": to.Ptr("myvalue1"), + "key2": to.Ptr("myvalue2"), + }, + }, 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.Cluster = armnetworkcloud.Cluster{ + // Name: to.Ptr("clusterName"), + // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // }, + // }, + // }, + // Properties: &armnetworkcloud.ClusterProperties{ + // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ + // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName1"), + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // }, + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName2"), + // RackSlot: to.Ptr[int64](2), + // SerialNumber: to.Ptr("BM1219YYY"), + // }}, + // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), + // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), + // RackSerialNumber: to.Ptr("AA1234"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), + // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ + // { + // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // StorageApplianceName: to.Ptr("vmName"), + // }}, + // }, + // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), + // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ + // { + // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), + // ExpectedDuration: to.Ptr("0:0:30"), + // ImpactDescription: to.Ptr("can be done in place"), + // SupportExpiryDate: to.Ptr("2025-01-01"), + // TargetClusterVersion: to.Ptr("1.0.2"), + // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), + // }}, + // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ + // AvailableApplianceStorageGB: to.Ptr[int64](3), + // AvailableCoreCount: to.Ptr[int64](10), + // AvailableHostStorageGB: to.Ptr[int64](20), + // AvailableMemoryGB: to.Ptr[int64](20), + // TotalApplianceStorageGB: to.Ptr[int64](10), + // TotalCoreCount: to.Ptr[int64](10), + // TotalHostStorageGB: to.Ptr[int64](10), + // TotalMemoryGB: to.Ptr[int64](10), + // }, + // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), + // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), + // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), + // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), + // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ + // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), + // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), + // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), + // }, + // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), + // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, + // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ + // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), + // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), + // Value: to.Ptr[int64](90), + // }, + // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ + // { + // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName1"), + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // }, + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName2"), + // RackSlot: to.Ptr[int64](2), + // SerialNumber: to.Ptr("BM1219YYY"), + // }}, + // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), + // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), + // RackSerialNumber: to.Ptr("AA1234"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), + // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ + // { + // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // StorageApplianceName: to.Ptr("vmName"), + // }}, + // }}, + // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), + // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), + // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ + // Name: to.Ptr("my-managed-rg"), + // Location: to.Ptr("East US"), + // }, + // ManualActionCount: to.Ptr[int64](0), + // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), + // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, + // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, + // WorkloadResourceIDs: []*string{ + // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_UpdateStrategy.json +func ExampleClustersClient_BeginUpdate_patchUpdateStrategy() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ + Properties: &armnetworkcloud.ClusterPatchProperties{ + UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + MaxUnavailable: to.Ptr[int64](4), + StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + ThresholdValue: to.Ptr[int64](4), + WaitTimeMinutes: to.Ptr[int64](10), + }, + }, + Tags: map[string]*string{ + "key1": to.Ptr("myvalue1"), + "key2": to.Ptr("myvalue2"), + }, + }, 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.Cluster = armnetworkcloud.Cluster{ + // Name: to.Ptr("clusterName"), + // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // Identity: &armnetworkcloud.ManagedServiceIdentity{ + // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ + // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ + // }, + // }, + // }, + // Properties: &armnetworkcloud.ClusterProperties{ + // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ + // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName1"), + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // }, + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName2"), + // RackSlot: to.Ptr[int64](2), + // SerialNumber: to.Ptr("BM1219YYY"), + // }}, + // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), + // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), + // RackSerialNumber: to.Ptr("AA1234"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), + // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ + // { + // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // StorageApplianceName: to.Ptr("vmName"), + // }}, + // }, + // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), + // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ + // { + // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), + // ExpectedDuration: to.Ptr("0:0:30"), + // ImpactDescription: to.Ptr("can be done in place"), + // SupportExpiryDate: to.Ptr("2025-01-01"), + // TargetClusterVersion: to.Ptr("1.0.2"), + // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), + // }}, + // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ + // AvailableApplianceStorageGB: to.Ptr[int64](3), + // AvailableCoreCount: to.Ptr[int64](10), + // AvailableHostStorageGB: to.Ptr[int64](20), + // AvailableMemoryGB: to.Ptr[int64](20), + // TotalApplianceStorageGB: to.Ptr[int64](10), + // TotalCoreCount: to.Ptr[int64](10), + // TotalHostStorageGB: to.Ptr[int64](10), + // TotalMemoryGB: to.Ptr[int64](10), + // }, + // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), + // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), + // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), + // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), + // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ + // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), + // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), + // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), + // }, + // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), + // ClusterVersion: to.Ptr("1.0.0"), + // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ + // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ + // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + // }, + // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + // }, + // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ + // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), + // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), + // Value: to.Ptr[int64](90), + // }, + // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ + // { + // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName1"), + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // }, + // { + // BmcConnectionString: to.Ptr("bmcConnectionString"), + // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), + // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), + // MachineDetails: to.Ptr("extraDetails"), + // MachineName: to.Ptr("bmmName2"), + // RackSlot: to.Ptr[int64](2), + // SerialNumber: to.Ptr("BM1219YYY"), + // }}, + // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), + // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), + // RackSerialNumber: to.Ptr("AA1234"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), + // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ + // { + // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ + // Username: to.Ptr("username"), + // }, + // RackSlot: to.Ptr[int64](1), + // SerialNumber: to.Ptr("BM1219XXX"), + // StorageApplianceName: to.Ptr("vmName"), + // }}, + // }}, + // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), + // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), + // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ + // Name: to.Ptr("my-managed-rg"), + // Location: to.Ptr("East US"), + // }, + // ManualActionCount: to.Ptr[int64](0), + // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), + // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), + // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ + // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), + // }, + // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), + // }, + // SupportExpiryDate: to.Ptr("2023-04-29"), + // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ + // MaxUnavailable: to.Ptr[int64](4), + // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), + // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), + // ThresholdValue: to.Ptr[int64](4), + // WaitTimeMinutes: to.Ptr[int64](10), + // }, + // WorkloadResourceIDs: []*string{ + // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ContinueUpdateVersion.json +func ExampleClustersClient_BeginContinueUpdateVersion() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewClustersClient().BeginContinueUpdateVersion(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterContinueUpdateVersionParameters{ + MachineGroupTargetingMode: to.Ptr(armnetworkcloud.ClusterContinueUpdateVersionMachineGroupTargetingModeAlphaByRack), + }, 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) + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy.json +func ExampleClustersClient_BeginDeploy_deployCluster() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewClustersClient().BeginDeploy(ctx, "resourceGroupName", "clusterName", &armnetworkcloud.ClustersClientBeginDeployOptions{ClusterDeployParameters: &armnetworkcloud.ClusterDeployParameters{}}) + 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) + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy_SkipValidation.json +func ExampleClustersClient_BeginDeploy_deployClusterSkippingValidation() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewClustersClient().BeginDeploy(ctx, "resourceGroupName", "clusterName", &armnetworkcloud.ClustersClientBeginDeployOptions{ClusterDeployParameters: &armnetworkcloud.ClusterDeployParameters{ + SkipValidationsForMachines: []*string{ + to.Ptr("bmmName1")}, + }, + }) + 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) + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ScanRuntime.json +func ExampleClustersClient_BeginScanRuntime() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewClustersClient().BeginScanRuntime(ctx, "resourceGroupName", "clusterName", &armnetworkcloud.ClustersClientBeginScanRuntimeOptions{ClusterScanRuntimeParameters: &armnetworkcloud.ClusterScanRuntimeParameters{ + ScanActivity: to.Ptr(armnetworkcloud.ClusterScanRuntimeParametersScanActivityScan), }, }) if err != nil { @@ -1351,7 +2487,7 @@ func ExampleClustersClient_BeginDeploy_deployClusterSkippingValidation() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_UpdateVersion.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_UpdateVersion.json func ExampleClustersClient_BeginUpdateVersion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/consoles_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/consoles_client.go index 41074ea057a7..14bb1fe41e76 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/consoles_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/consoles_client.go @@ -46,7 +46,7 @@ func NewConsolesClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create a new virtual machine console or update the properties of the existing virtual machine console. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - consoleName - The name of the virtual machine console. @@ -74,7 +74,7 @@ func (client *ConsolesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create a new virtual machine console or update the properties of the existing virtual machine console. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ConsolesClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, consoleName string, consoleParameters Console, options *ConsolesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ConsolesClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *ConsolesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, consoleParameters); err != nil { @@ -132,7 +132,7 @@ func (client *ConsolesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Delete the provided virtual machine console. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - consoleName - The name of the virtual machine console. @@ -158,7 +158,7 @@ func (client *ConsolesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete the provided virtual machine console. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ConsolesClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualMachineName string, consoleName string, options *ConsolesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ConsolesClient.BeginDelete" @@ -204,7 +204,7 @@ func (client *ConsolesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -213,7 +213,7 @@ func (client *ConsolesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get properties of the provided virtual machine console. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - consoleName - The name of the virtual machine console. @@ -264,7 +264,7 @@ func (client *ConsolesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +281,7 @@ func (client *ConsolesClient) getHandleResponse(resp *http.Response) (ConsolesCl // NewListByVirtualMachinePager - Get a list of consoles for the provided virtual machine. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - options - ConsolesClientListByVirtualMachineOptions contains the optional parameters for the ConsolesClient.NewListByVirtualMachinePager @@ -329,7 +329,7 @@ func (client *ConsolesClient) listByVirtualMachineCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,7 +348,7 @@ func (client *ConsolesClient) listByVirtualMachineHandleResponse(resp *http.Resp // machine console. Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - consoleName - The name of the virtual machine console. @@ -376,7 +376,7 @@ func (client *ConsolesClient) BeginUpdate(ctx context.Context, resourceGroupName // console. Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *ConsolesClient) update(ctx context.Context, resourceGroupName string, virtualMachineName string, consoleName string, consoleUpdateParameters ConsolePatchParameters, options *ConsolesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ConsolesClient.BeginUpdate" @@ -422,7 +422,7 @@ func (client *ConsolesClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, consoleUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/consoles_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/consoles_client_example_test.go index 125f3d3261e9..e5c0f593d614 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/consoles_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/consoles_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_ListByVirtualMachine.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_ListByVirtualMachine.json func ExampleConsolesClient_NewListByVirtualMachinePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -82,7 +82,7 @@ func ExampleConsolesClient_NewListByVirtualMachinePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json func ExampleConsolesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -136,7 +136,7 @@ func ExampleConsolesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Create.json func ExampleConsolesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -211,7 +211,7 @@ func ExampleConsolesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Delete.json func ExampleConsolesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -232,7 +232,7 @@ func ExampleConsolesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Patch.json func ExampleConsolesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/constants.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/constants.go index 5b3e44843818..84a2a76c1544 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/constants.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/constants.go @@ -10,7 +10,7 @@ package armnetworkcloud const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" - moduleVersion = "v1.1.0" + moduleVersion = "v1.2.0-beta.1" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. @@ -506,20 +506,37 @@ func PossibleCloudServicesNetworkProvisioningStateValues() []CloudServicesNetwor type ClusterConnectionStatus string const ( - ClusterConnectionStatusConnected ClusterConnectionStatus = "Connected" - ClusterConnectionStatusTimeout ClusterConnectionStatus = "Timeout" - ClusterConnectionStatusUndefined ClusterConnectionStatus = "Undefined" + ClusterConnectionStatusConnected ClusterConnectionStatus = "Connected" + ClusterConnectionStatusDisconnected ClusterConnectionStatus = "Disconnected" + ClusterConnectionStatusTimeout ClusterConnectionStatus = "Timeout" + ClusterConnectionStatusUndefined ClusterConnectionStatus = "Undefined" ) // PossibleClusterConnectionStatusValues returns the possible values for the ClusterConnectionStatus const type. func PossibleClusterConnectionStatusValues() []ClusterConnectionStatus { return []ClusterConnectionStatus{ ClusterConnectionStatusConnected, + ClusterConnectionStatusDisconnected, ClusterConnectionStatusTimeout, ClusterConnectionStatusUndefined, } } +// ClusterContinueUpdateVersionMachineGroupTargetingMode - The mode by which the cluster will target the next grouping of +// servers to continue the update. +type ClusterContinueUpdateVersionMachineGroupTargetingMode string + +const ( + ClusterContinueUpdateVersionMachineGroupTargetingModeAlphaByRack ClusterContinueUpdateVersionMachineGroupTargetingMode = "AlphaByRack" +) + +// PossibleClusterContinueUpdateVersionMachineGroupTargetingModeValues returns the possible values for the ClusterContinueUpdateVersionMachineGroupTargetingMode const type. +func PossibleClusterContinueUpdateVersionMachineGroupTargetingModeValues() []ClusterContinueUpdateVersionMachineGroupTargetingMode { + return []ClusterContinueUpdateVersionMachineGroupTargetingMode{ + ClusterContinueUpdateVersionMachineGroupTargetingModeAlphaByRack, + } +} + // ClusterDetailedStatus - The current detailed status of the cluster. type ClusterDetailedStatus string @@ -531,6 +548,7 @@ const ( ClusterDetailedStatusFailed ClusterDetailedStatus = "Failed" ClusterDetailedStatusPendingDeployment ClusterDetailedStatus = "PendingDeployment" ClusterDetailedStatusRunning ClusterDetailedStatus = "Running" + ClusterDetailedStatusUpdatePaused ClusterDetailedStatus = "UpdatePaused" ClusterDetailedStatusUpdating ClusterDetailedStatus = "Updating" ) @@ -544,6 +562,7 @@ func PossibleClusterDetailedStatusValues() []ClusterDetailedStatus { ClusterDetailedStatusFailed, ClusterDetailedStatusPendingDeployment, ClusterDetailedStatusRunning, + ClusterDetailedStatusUpdatePaused, ClusterDetailedStatusUpdating, } } @@ -676,6 +695,38 @@ func PossibleClusterProvisioningStateValues() []ClusterProvisioningState { } } +// ClusterScanRuntimeParametersScanActivity - The choice of if the scan operation should run the scan. +type ClusterScanRuntimeParametersScanActivity string + +const ( + ClusterScanRuntimeParametersScanActivityScan ClusterScanRuntimeParametersScanActivity = "Scan" + ClusterScanRuntimeParametersScanActivitySkip ClusterScanRuntimeParametersScanActivity = "Skip" +) + +// PossibleClusterScanRuntimeParametersScanActivityValues returns the possible values for the ClusterScanRuntimeParametersScanActivity const type. +func PossibleClusterScanRuntimeParametersScanActivityValues() []ClusterScanRuntimeParametersScanActivity { + return []ClusterScanRuntimeParametersScanActivity{ + ClusterScanRuntimeParametersScanActivityScan, + ClusterScanRuntimeParametersScanActivitySkip, + } +} + +// ClusterSecretArchiveEnabled - The indicator if the specified key vault should be used to archive the secrets of the cluster. +type ClusterSecretArchiveEnabled string + +const ( + ClusterSecretArchiveEnabledFalse ClusterSecretArchiveEnabled = "False" + ClusterSecretArchiveEnabledTrue ClusterSecretArchiveEnabled = "True" +) + +// PossibleClusterSecretArchiveEnabledValues returns the possible values for the ClusterSecretArchiveEnabled const type. +func PossibleClusterSecretArchiveEnabledValues() []ClusterSecretArchiveEnabled { + return []ClusterSecretArchiveEnabled{ + ClusterSecretArchiveEnabledFalse, + ClusterSecretArchiveEnabledTrue, + } +} + // ClusterType - The type of rack configuration for the cluster. type ClusterType string @@ -692,6 +743,22 @@ func PossibleClusterTypeValues() []ClusterType { } } +// ClusterUpdateStrategyType - The mode of operation for runtime protection. +type ClusterUpdateStrategyType string + +const ( + ClusterUpdateStrategyTypePauseAfterRack ClusterUpdateStrategyType = "PauseAfterRack" + ClusterUpdateStrategyTypeRack ClusterUpdateStrategyType = "Rack" +) + +// PossibleClusterUpdateStrategyTypeValues returns the possible values for the ClusterUpdateStrategyType const type. +func PossibleClusterUpdateStrategyTypeValues() []ClusterUpdateStrategyType { + return []ClusterUpdateStrategyType{ + ClusterUpdateStrategyTypePauseAfterRack, + ClusterUpdateStrategyTypeRack, + } +} + // ConsoleDetailedStatus - The more detailed status of the console. type ConsoleDetailedStatus string @@ -708,7 +775,7 @@ func PossibleConsoleDetailedStatusValues() []ConsoleDetailedStatus { } } -// ConsoleEnabled - The credentials used to login to the image repository that has access to the specified image. +// ConsoleEnabled - The indicator of whether the console access is enabled. type ConsoleEnabled string const ( @@ -952,6 +1019,81 @@ func PossibleKubernetesClusterDetailedStatusValues() []KubernetesClusterDetailed } } +// KubernetesClusterFeatureAvailabilityLifecycle - The lifecycle indicator of the feature. +type KubernetesClusterFeatureAvailabilityLifecycle string + +const ( + KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable KubernetesClusterFeatureAvailabilityLifecycle = "GenerallyAvailable" + KubernetesClusterFeatureAvailabilityLifecyclePreview KubernetesClusterFeatureAvailabilityLifecycle = "Preview" +) + +// PossibleKubernetesClusterFeatureAvailabilityLifecycleValues returns the possible values for the KubernetesClusterFeatureAvailabilityLifecycle const type. +func PossibleKubernetesClusterFeatureAvailabilityLifecycleValues() []KubernetesClusterFeatureAvailabilityLifecycle { + return []KubernetesClusterFeatureAvailabilityLifecycle{ + KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable, + KubernetesClusterFeatureAvailabilityLifecyclePreview, + } +} + +// KubernetesClusterFeatureDetailedStatus - The detailed status of the feature. +type KubernetesClusterFeatureDetailedStatus string + +const ( + KubernetesClusterFeatureDetailedStatusError KubernetesClusterFeatureDetailedStatus = "Error" + KubernetesClusterFeatureDetailedStatusInstalled KubernetesClusterFeatureDetailedStatus = "Installed" + KubernetesClusterFeatureDetailedStatusProvisioning KubernetesClusterFeatureDetailedStatus = "Provisioning" +) + +// PossibleKubernetesClusterFeatureDetailedStatusValues returns the possible values for the KubernetesClusterFeatureDetailedStatus const type. +func PossibleKubernetesClusterFeatureDetailedStatusValues() []KubernetesClusterFeatureDetailedStatus { + return []KubernetesClusterFeatureDetailedStatus{ + KubernetesClusterFeatureDetailedStatusError, + KubernetesClusterFeatureDetailedStatusInstalled, + KubernetesClusterFeatureDetailedStatusProvisioning, + } +} + +// KubernetesClusterFeatureProvisioningState - The provisioning state of the Kubernetes cluster feature. +type KubernetesClusterFeatureProvisioningState string + +const ( + KubernetesClusterFeatureProvisioningStateAccepted KubernetesClusterFeatureProvisioningState = "Accepted" + KubernetesClusterFeatureProvisioningStateCanceled KubernetesClusterFeatureProvisioningState = "Canceled" + KubernetesClusterFeatureProvisioningStateDeleting KubernetesClusterFeatureProvisioningState = "Deleting" + KubernetesClusterFeatureProvisioningStateFailed KubernetesClusterFeatureProvisioningState = "Failed" + KubernetesClusterFeatureProvisioningStateSucceeded KubernetesClusterFeatureProvisioningState = "Succeeded" + KubernetesClusterFeatureProvisioningStateUpdating KubernetesClusterFeatureProvisioningState = "Updating" +) + +// PossibleKubernetesClusterFeatureProvisioningStateValues returns the possible values for the KubernetesClusterFeatureProvisioningState const type. +func PossibleKubernetesClusterFeatureProvisioningStateValues() []KubernetesClusterFeatureProvisioningState { + return []KubernetesClusterFeatureProvisioningState{ + KubernetesClusterFeatureProvisioningStateAccepted, + KubernetesClusterFeatureProvisioningStateCanceled, + KubernetesClusterFeatureProvisioningStateDeleting, + KubernetesClusterFeatureProvisioningStateFailed, + KubernetesClusterFeatureProvisioningStateSucceeded, + KubernetesClusterFeatureProvisioningStateUpdating, + } +} + +// KubernetesClusterFeatureRequired - The indicator of if the feature is required or optional. Optional features may be deleted +// by the user, while required features are managed with the kubernetes cluster lifecycle. +type KubernetesClusterFeatureRequired string + +const ( + KubernetesClusterFeatureRequiredFalse KubernetesClusterFeatureRequired = "False" + KubernetesClusterFeatureRequiredTrue KubernetesClusterFeatureRequired = "True" +) + +// PossibleKubernetesClusterFeatureRequiredValues returns the possible values for the KubernetesClusterFeatureRequired const type. +func PossibleKubernetesClusterFeatureRequiredValues() []KubernetesClusterFeatureRequired { + return []KubernetesClusterFeatureRequired{ + KubernetesClusterFeatureRequiredFalse, + KubernetesClusterFeatureRequiredTrue, + } +} + // KubernetesClusterNodeDetailedStatus - The detailed state of this node. type KubernetesClusterNodeDetailedStatus string @@ -1181,6 +1323,42 @@ func PossibleMachineSKUDiskConnectionTypeValues() []MachineSKUDiskConnectionType } } +// ManagedServiceIdentitySelectorType - The type of managed identity that is being selected. +type ManagedServiceIdentitySelectorType string + +const ( + ManagedServiceIdentitySelectorTypeSystemAssignedIdentity ManagedServiceIdentitySelectorType = "SystemAssignedIdentity" + ManagedServiceIdentitySelectorTypeUserAssignedIdentity ManagedServiceIdentitySelectorType = "UserAssignedIdentity" +) + +// PossibleManagedServiceIdentitySelectorTypeValues returns the possible values for the ManagedServiceIdentitySelectorType const type. +func PossibleManagedServiceIdentitySelectorTypeValues() []ManagedServiceIdentitySelectorType { + return []ManagedServiceIdentitySelectorType{ + ManagedServiceIdentitySelectorTypeSystemAssignedIdentity, + ManagedServiceIdentitySelectorTypeUserAssignedIdentity, + } +} + +// ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +type ManagedServiceIdentityType string + +const ( + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ + ManagedServiceIdentityTypeNone, + ManagedServiceIdentityTypeSystemAssigned, + ManagedServiceIdentityTypeSystemAssignedUserAssigned, + ManagedServiceIdentityTypeUserAssigned, + } +} + // Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" type Origin string @@ -1272,12 +1450,16 @@ func PossibleRackProvisioningStateValues() []RackProvisioningState { type RackSKUProvisioningState string const ( + RackSKUProvisioningStateCanceled RackSKUProvisioningState = "Canceled" + RackSKUProvisioningStateFailed RackSKUProvisioningState = "Failed" RackSKUProvisioningStateSucceeded RackSKUProvisioningState = "Succeeded" ) // PossibleRackSKUProvisioningStateValues returns the possible values for the RackSKUProvisioningState const type. func PossibleRackSKUProvisioningStateValues() []RackSKUProvisioningState { return []RackSKUProvisioningState{ + RackSKUProvisioningStateCanceled, + RackSKUProvisioningStateFailed, RackSKUProvisioningStateSucceeded, } } @@ -1335,6 +1517,28 @@ func PossibleRemoteVendorManagementStatusValues() []RemoteVendorManagementStatus } } +// RuntimeProtectionEnforcementLevel - The mode of operation for runtime protection. +type RuntimeProtectionEnforcementLevel string + +const ( + RuntimeProtectionEnforcementLevelAudit RuntimeProtectionEnforcementLevel = "Audit" + RuntimeProtectionEnforcementLevelDisabled RuntimeProtectionEnforcementLevel = "Disabled" + RuntimeProtectionEnforcementLevelOnDemand RuntimeProtectionEnforcementLevel = "OnDemand" + RuntimeProtectionEnforcementLevelPassive RuntimeProtectionEnforcementLevel = "Passive" + RuntimeProtectionEnforcementLevelRealTime RuntimeProtectionEnforcementLevel = "RealTime" +) + +// PossibleRuntimeProtectionEnforcementLevelValues returns the possible values for the RuntimeProtectionEnforcementLevel const type. +func PossibleRuntimeProtectionEnforcementLevelValues() []RuntimeProtectionEnforcementLevel { + return []RuntimeProtectionEnforcementLevel{ + RuntimeProtectionEnforcementLevelAudit, + RuntimeProtectionEnforcementLevelDisabled, + RuntimeProtectionEnforcementLevelOnDemand, + RuntimeProtectionEnforcementLevelPassive, + RuntimeProtectionEnforcementLevelRealTime, + } +} + // SkipShutdown - The indicator of whether to skip the graceful OS shutdown and power off the virtual machine immediately. type SkipShutdown string diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/baremetalmachines_server.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/baremetalmachines_server.go index 9bf5156c375f..d7b9a3c275d8 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/baremetalmachines_server.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/baremetalmachines_server.go @@ -26,7 +26,7 @@ import ( // BareMetalMachinesServer is a fake server for instances of the armnetworkcloud.BareMetalMachinesClient type. type BareMetalMachinesServer struct { // BeginCordon is the fake for method BareMetalMachinesClient.BeginCordon - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginCordon func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *armnetworkcloud.BareMetalMachinesClientBeginCordonOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientCordonResponse], errResp azfake.ErrorResponder) // BeginCreateOrUpdate is the fake for method BareMetalMachinesClient.BeginCreateOrUpdate @@ -50,39 +50,39 @@ type BareMetalMachinesServer struct { NewListBySubscriptionPager func(options *armnetworkcloud.BareMetalMachinesClientListBySubscriptionOptions) (resp azfake.PagerResponder[armnetworkcloud.BareMetalMachinesClientListBySubscriptionResponse]) // BeginPowerOff is the fake for method BareMetalMachinesClient.BeginPowerOff - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginPowerOff func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *armnetworkcloud.BareMetalMachinesClientBeginPowerOffOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientPowerOffResponse], errResp azfake.ErrorResponder) // BeginReimage is the fake for method BareMetalMachinesClient.BeginReimage - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginReimage func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *armnetworkcloud.BareMetalMachinesClientBeginReimageOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientReimageResponse], errResp azfake.ErrorResponder) // BeginReplace is the fake for method BareMetalMachinesClient.BeginReplace - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginReplace func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *armnetworkcloud.BareMetalMachinesClientBeginReplaceOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientReplaceResponse], errResp azfake.ErrorResponder) // BeginRestart is the fake for method BareMetalMachinesClient.BeginRestart - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginRestart func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *armnetworkcloud.BareMetalMachinesClientBeginRestartOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientRestartResponse], errResp azfake.ErrorResponder) // BeginRunCommand is the fake for method BareMetalMachinesClient.BeginRunCommand - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginRunCommand func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineRunCommandParameters armnetworkcloud.BareMetalMachineRunCommandParameters, options *armnetworkcloud.BareMetalMachinesClientBeginRunCommandOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientRunCommandResponse], errResp azfake.ErrorResponder) // BeginRunDataExtracts is the fake for method BareMetalMachinesClient.BeginRunDataExtracts - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginRunDataExtracts func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineRunDataExtractsParameters armnetworkcloud.BareMetalMachineRunDataExtractsParameters, options *armnetworkcloud.BareMetalMachinesClientBeginRunDataExtractsOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientRunDataExtractsResponse], errResp azfake.ErrorResponder) // BeginRunReadCommands is the fake for method BareMetalMachinesClient.BeginRunReadCommands - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginRunReadCommands func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineRunReadCommandsParameters armnetworkcloud.BareMetalMachineRunReadCommandsParameters, options *armnetworkcloud.BareMetalMachinesClientBeginRunReadCommandsOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientRunReadCommandsResponse], errResp azfake.ErrorResponder) // BeginStart is the fake for method BareMetalMachinesClient.BeginStart - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginStart func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *armnetworkcloud.BareMetalMachinesClientBeginStartOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientStartResponse], errResp azfake.ErrorResponder) // BeginUncordon is the fake for method BareMetalMachinesClient.BeginUncordon - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginUncordon func(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *armnetworkcloud.BareMetalMachinesClientBeginUncordonOptions) (resp azfake.PollerResponder[armnetworkcloud.BareMetalMachinesClientUncordonResponse], errResp azfake.ErrorResponder) // BeginUpdate is the fake for method BareMetalMachinesClient.BeginUpdate @@ -233,9 +233,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginCordon(req *http.Request return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginCordon.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginCordon) { b.beginCordon.remove(req) @@ -482,9 +482,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginPowerOff(req *http.Reque return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginPowerOff.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginPowerOff) { b.beginPowerOff.remove(req) @@ -526,9 +526,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginReimage(req *http.Reques return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginReimage.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginReimage) { b.beginReimage.remove(req) @@ -580,9 +580,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginReplace(req *http.Reques return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginReplace.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginReplace) { b.beginReplace.remove(req) @@ -624,9 +624,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginRestart(req *http.Reques return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginRestart.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginRestart) { b.beginRestart.remove(req) @@ -672,9 +672,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginRunCommand(req *http.Req return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginRunCommand.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginRunCommand) { b.beginRunCommand.remove(req) @@ -720,9 +720,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginRunDataExtracts(req *htt return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginRunDataExtracts.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginRunDataExtracts) { b.beginRunDataExtracts.remove(req) @@ -768,9 +768,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginRunReadCommands(req *htt return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginRunReadCommands.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginRunReadCommands) { b.beginRunReadCommands.remove(req) @@ -812,9 +812,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginStart(req *http.Request) return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginStart.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginStart) { b.beginStart.remove(req) @@ -856,9 +856,9 @@ func (b *BareMetalMachinesServerTransport) dispatchBeginUncordon(req *http.Reque return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { b.beginUncordon.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginUncordon) { b.beginUncordon.remove(req) diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/clusters_server.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/clusters_server.go index 2b17bb426911..18e681441812 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/clusters_server.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/clusters_server.go @@ -25,6 +25,10 @@ import ( // ClustersServer is a fake server for instances of the armnetworkcloud.ClustersClient type. type ClustersServer struct { + // BeginContinueUpdateVersion is the fake for method ClustersClient.BeginContinueUpdateVersion + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginContinueUpdateVersion func(ctx context.Context, resourceGroupName string, clusterName string, clusterContinueUpdateVersionParameters armnetworkcloud.ClusterContinueUpdateVersionParameters, options *armnetworkcloud.ClustersClientBeginContinueUpdateVersionOptions) (resp azfake.PollerResponder[armnetworkcloud.ClustersClientContinueUpdateVersionResponse], errResp azfake.ErrorResponder) + // BeginCreateOrUpdate is the fake for method ClustersClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, clusterName string, clusterParameters armnetworkcloud.Cluster, options *armnetworkcloud.ClustersClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armnetworkcloud.ClustersClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -34,7 +38,7 @@ type ClustersServer struct { BeginDelete func(ctx context.Context, resourceGroupName string, clusterName string, options *armnetworkcloud.ClustersClientBeginDeleteOptions) (resp azfake.PollerResponder[armnetworkcloud.ClustersClientDeleteResponse], errResp azfake.ErrorResponder) // BeginDeploy is the fake for method ClustersClient.BeginDeploy - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginDeploy func(ctx context.Context, resourceGroupName string, clusterName string, options *armnetworkcloud.ClustersClientBeginDeployOptions) (resp azfake.PollerResponder[armnetworkcloud.ClustersClientDeployResponse], errResp azfake.ErrorResponder) // Get is the fake for method ClustersClient.Get @@ -49,12 +53,16 @@ type ClustersServer struct { // HTTP status codes to indicate success: http.StatusOK NewListBySubscriptionPager func(options *armnetworkcloud.ClustersClientListBySubscriptionOptions) (resp azfake.PagerResponder[armnetworkcloud.ClustersClientListBySubscriptionResponse]) + // BeginScanRuntime is the fake for method ClustersClient.BeginScanRuntime + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginScanRuntime func(ctx context.Context, resourceGroupName string, clusterName string, options *armnetworkcloud.ClustersClientBeginScanRuntimeOptions) (resp azfake.PollerResponder[armnetworkcloud.ClustersClientScanRuntimeResponse], errResp azfake.ErrorResponder) + // BeginUpdate is the fake for method ClustersClient.BeginUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginUpdate func(ctx context.Context, resourceGroupName string, clusterName string, clusterUpdateParameters armnetworkcloud.ClusterPatchParameters, options *armnetworkcloud.ClustersClientBeginUpdateOptions) (resp azfake.PollerResponder[armnetworkcloud.ClustersClientUpdateResponse], errResp azfake.ErrorResponder) // BeginUpdateVersion is the fake for method ClustersClient.BeginUpdateVersion - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginUpdateVersion func(ctx context.Context, resourceGroupName string, clusterName string, clusterUpdateVersionParameters armnetworkcloud.ClusterUpdateVersionParameters, options *armnetworkcloud.ClustersClientBeginUpdateVersionOptions) (resp azfake.PollerResponder[armnetworkcloud.ClustersClientUpdateVersionResponse], errResp azfake.ErrorResponder) } @@ -64,11 +72,13 @@ type ClustersServer struct { func NewClustersServerTransport(srv *ClustersServer) *ClustersServerTransport { return &ClustersServerTransport{ srv: srv, + beginContinueUpdateVersion: newTracker[azfake.PollerResponder[armnetworkcloud.ClustersClientContinueUpdateVersionResponse]](), beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetworkcloud.ClustersClientCreateOrUpdateResponse]](), beginDelete: newTracker[azfake.PollerResponder[armnetworkcloud.ClustersClientDeleteResponse]](), beginDeploy: newTracker[azfake.PollerResponder[armnetworkcloud.ClustersClientDeployResponse]](), newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetworkcloud.ClustersClientListByResourceGroupResponse]](), newListBySubscriptionPager: newTracker[azfake.PagerResponder[armnetworkcloud.ClustersClientListBySubscriptionResponse]](), + beginScanRuntime: newTracker[azfake.PollerResponder[armnetworkcloud.ClustersClientScanRuntimeResponse]](), beginUpdate: newTracker[azfake.PollerResponder[armnetworkcloud.ClustersClientUpdateResponse]](), beginUpdateVersion: newTracker[azfake.PollerResponder[armnetworkcloud.ClustersClientUpdateVersionResponse]](), } @@ -78,11 +88,13 @@ func NewClustersServerTransport(srv *ClustersServer) *ClustersServerTransport { // Don't use this type directly, use NewClustersServerTransport instead. type ClustersServerTransport struct { srv *ClustersServer + beginContinueUpdateVersion *tracker[azfake.PollerResponder[armnetworkcloud.ClustersClientContinueUpdateVersionResponse]] beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetworkcloud.ClustersClientCreateOrUpdateResponse]] beginDelete *tracker[azfake.PollerResponder[armnetworkcloud.ClustersClientDeleteResponse]] beginDeploy *tracker[azfake.PollerResponder[armnetworkcloud.ClustersClientDeployResponse]] newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetworkcloud.ClustersClientListByResourceGroupResponse]] newListBySubscriptionPager *tracker[azfake.PagerResponder[armnetworkcloud.ClustersClientListBySubscriptionResponse]] + beginScanRuntime *tracker[azfake.PollerResponder[armnetworkcloud.ClustersClientScanRuntimeResponse]] beginUpdate *tracker[azfake.PollerResponder[armnetworkcloud.ClustersClientUpdateResponse]] beginUpdateVersion *tracker[azfake.PollerResponder[armnetworkcloud.ClustersClientUpdateVersionResponse]] } @@ -99,6 +111,8 @@ func (c *ClustersServerTransport) Do(req *http.Request) (*http.Response, error) var err error switch method { + case "ClustersClient.BeginContinueUpdateVersion": + resp, err = c.dispatchBeginContinueUpdateVersion(req) case "ClustersClient.BeginCreateOrUpdate": resp, err = c.dispatchBeginCreateOrUpdate(req) case "ClustersClient.BeginDelete": @@ -111,6 +125,8 @@ func (c *ClustersServerTransport) Do(req *http.Request) (*http.Response, error) resp, err = c.dispatchNewListByResourceGroupPager(req) case "ClustersClient.NewListBySubscriptionPager": resp, err = c.dispatchNewListBySubscriptionPager(req) + case "ClustersClient.BeginScanRuntime": + resp, err = c.dispatchBeginScanRuntime(req) case "ClustersClient.BeginUpdate": resp, err = c.dispatchBeginUpdate(req) case "ClustersClient.BeginUpdateVersion": @@ -126,6 +142,54 @@ func (c *ClustersServerTransport) Do(req *http.Request) (*http.Response, error) return resp, nil } +func (c *ClustersServerTransport) dispatchBeginContinueUpdateVersion(req *http.Request) (*http.Response, error) { + if c.srv.BeginContinueUpdateVersion == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginContinueUpdateVersion not implemented")} + } + beginContinueUpdateVersion := c.beginContinueUpdateVersion.get(req) + if beginContinueUpdateVersion == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetworkCloud/clusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continueUpdateVersion` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetworkcloud.ClusterContinueUpdateVersionParameters](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + clusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("clusterName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.BeginContinueUpdateVersion(req.Context(), resourceGroupNameParam, clusterNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginContinueUpdateVersion = &respr + c.beginContinueUpdateVersion.add(req, beginContinueUpdateVersion) + } + + resp, err := server.PollerResponderNext(beginContinueUpdateVersion, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + c.beginContinueUpdateVersion.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginContinueUpdateVersion) { + c.beginContinueUpdateVersion.remove(req) + } + + return resp, nil +} + func (c *ClustersServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { if c.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} @@ -261,9 +325,9 @@ func (c *ClustersServerTransport) dispatchBeginDeploy(req *http.Request) (*http. return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { c.beginDeploy.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginDeploy) { c.beginDeploy.remove(req) @@ -375,6 +439,60 @@ func (c *ClustersServerTransport) dispatchNewListBySubscriptionPager(req *http.R return resp, nil } +func (c *ClustersServerTransport) dispatchBeginScanRuntime(req *http.Request) (*http.Response, error) { + if c.srv.BeginScanRuntime == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginScanRuntime not implemented")} + } + beginScanRuntime := c.beginScanRuntime.get(req) + if beginScanRuntime == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetworkCloud/clusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scanRuntime` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetworkcloud.ClusterScanRuntimeParameters](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + clusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("clusterName")]) + if err != nil { + return nil, err + } + var options *armnetworkcloud.ClustersClientBeginScanRuntimeOptions + if !reflect.ValueOf(body).IsZero() { + options = &armnetworkcloud.ClustersClientBeginScanRuntimeOptions{ + ClusterScanRuntimeParameters: &body, + } + } + respr, errRespr := c.srv.BeginScanRuntime(req.Context(), resourceGroupNameParam, clusterNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginScanRuntime = &respr + c.beginScanRuntime.add(req, beginScanRuntime) + } + + resp, err := server.PollerResponderNext(beginScanRuntime, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + c.beginScanRuntime.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginScanRuntime) { + c.beginScanRuntime.remove(req) + } + + return resp, nil +} + func (c *ClustersServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response, error) { if c.srv.BeginUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdate not implemented")} @@ -460,9 +578,9 @@ func (c *ClustersServerTransport) dispatchBeginUpdateVersion(req *http.Request) return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { c.beginUpdateVersion.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginUpdateVersion) { c.beginUpdateVersion.remove(req) diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/kubernetesclusterfeatures_server.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/kubernetesclusterfeatures_server.go new file mode 100644 index 000000000000..0c2950ba4858 --- /dev/null +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/kubernetesclusterfeatures_server.go @@ -0,0 +1,332 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" + "net/http" + "net/url" + "regexp" +) + +// KubernetesClusterFeaturesServer is a fake server for instances of the armnetworkcloud.KubernetesClusterFeaturesClient type. +type KubernetesClusterFeaturesServer struct { + // BeginCreateOrUpdate is the fake for method KubernetesClusterFeaturesClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureParameters armnetworkcloud.KubernetesClusterFeature, options *armnetworkcloud.KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armnetworkcloud.KubernetesClusterFeaturesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // BeginDelete is the fake for method KubernetesClusterFeaturesClient.BeginDelete + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDelete func(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, options *armnetworkcloud.KubernetesClusterFeaturesClientBeginDeleteOptions) (resp azfake.PollerResponder[armnetworkcloud.KubernetesClusterFeaturesClientDeleteResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method KubernetesClusterFeaturesClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, options *armnetworkcloud.KubernetesClusterFeaturesClientGetOptions) (resp azfake.Responder[armnetworkcloud.KubernetesClusterFeaturesClientGetResponse], errResp azfake.ErrorResponder) + + // NewListByKubernetesClusterPager is the fake for method KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager + // HTTP status codes to indicate success: http.StatusOK + NewListByKubernetesClusterPager func(resourceGroupName string, kubernetesClusterName string, options *armnetworkcloud.KubernetesClusterFeaturesClientListByKubernetesClusterOptions) (resp azfake.PagerResponder[armnetworkcloud.KubernetesClusterFeaturesClientListByKubernetesClusterResponse]) + + // BeginUpdate is the fake for method KubernetesClusterFeaturesClient.BeginUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginUpdate func(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureUpdateParameters armnetworkcloud.KubernetesClusterFeaturePatchParameters, options *armnetworkcloud.KubernetesClusterFeaturesClientBeginUpdateOptions) (resp azfake.PollerResponder[armnetworkcloud.KubernetesClusterFeaturesClientUpdateResponse], errResp azfake.ErrorResponder) +} + +// NewKubernetesClusterFeaturesServerTransport creates a new instance of KubernetesClusterFeaturesServerTransport with the provided implementation. +// The returned KubernetesClusterFeaturesServerTransport instance is connected to an instance of armnetworkcloud.KubernetesClusterFeaturesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewKubernetesClusterFeaturesServerTransport(srv *KubernetesClusterFeaturesServer) *KubernetesClusterFeaturesServerTransport { + return &KubernetesClusterFeaturesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetworkcloud.KubernetesClusterFeaturesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetworkcloud.KubernetesClusterFeaturesClientDeleteResponse]](), + newListByKubernetesClusterPager: newTracker[azfake.PagerResponder[armnetworkcloud.KubernetesClusterFeaturesClientListByKubernetesClusterResponse]](), + beginUpdate: newTracker[azfake.PollerResponder[armnetworkcloud.KubernetesClusterFeaturesClientUpdateResponse]](), + } +} + +// KubernetesClusterFeaturesServerTransport connects instances of armnetworkcloud.KubernetesClusterFeaturesClient to instances of KubernetesClusterFeaturesServer. +// Don't use this type directly, use NewKubernetesClusterFeaturesServerTransport instead. +type KubernetesClusterFeaturesServerTransport struct { + srv *KubernetesClusterFeaturesServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetworkcloud.KubernetesClusterFeaturesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetworkcloud.KubernetesClusterFeaturesClientDeleteResponse]] + newListByKubernetesClusterPager *tracker[azfake.PagerResponder[armnetworkcloud.KubernetesClusterFeaturesClientListByKubernetesClusterResponse]] + beginUpdate *tracker[azfake.PollerResponder[armnetworkcloud.KubernetesClusterFeaturesClientUpdateResponse]] +} + +// Do implements the policy.Transporter interface for KubernetesClusterFeaturesServerTransport. +func (k *KubernetesClusterFeaturesServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "KubernetesClusterFeaturesClient.BeginCreateOrUpdate": + resp, err = k.dispatchBeginCreateOrUpdate(req) + case "KubernetesClusterFeaturesClient.BeginDelete": + resp, err = k.dispatchBeginDelete(req) + case "KubernetesClusterFeaturesClient.Get": + resp, err = k.dispatchGet(req) + case "KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager": + resp, err = k.dispatchNewListByKubernetesClusterPager(req) + case "KubernetesClusterFeaturesClient.BeginUpdate": + resp, err = k.dispatchBeginUpdate(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (k *KubernetesClusterFeaturesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if k.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := k.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetworkCloud/kubernetesClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/features/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetworkcloud.KubernetesClusterFeature](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + kubernetesClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("kubernetesClusterName")]) + if err != nil { + return nil, err + } + featureNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("featureName")]) + if err != nil { + return nil, err + } + respr, errRespr := k.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, kubernetesClusterNameParam, featureNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + k.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + k.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + k.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (k *KubernetesClusterFeaturesServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { + if k.srv.BeginDelete == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} + } + beginDelete := k.beginDelete.get(req) + if beginDelete == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetworkCloud/kubernetesClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/features/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + kubernetesClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("kubernetesClusterName")]) + if err != nil { + return nil, err + } + featureNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("featureName")]) + if err != nil { + return nil, err + } + respr, errRespr := k.srv.BeginDelete(req.Context(), resourceGroupNameParam, kubernetesClusterNameParam, featureNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDelete = &respr + k.beginDelete.add(req, beginDelete) + } + + resp, err := server.PollerResponderNext(beginDelete, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + k.beginDelete.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDelete) { + k.beginDelete.remove(req) + } + + return resp, nil +} + +func (k *KubernetesClusterFeaturesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if k.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetworkCloud/kubernetesClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/features/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + kubernetesClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("kubernetesClusterName")]) + if err != nil { + return nil, err + } + featureNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("featureName")]) + if err != nil { + return nil, err + } + respr, errRespr := k.srv.Get(req.Context(), resourceGroupNameParam, kubernetesClusterNameParam, featureNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).KubernetesClusterFeature, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (k *KubernetesClusterFeaturesServerTransport) dispatchNewListByKubernetesClusterPager(req *http.Request) (*http.Response, error) { + if k.srv.NewListByKubernetesClusterPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByKubernetesClusterPager not implemented")} + } + newListByKubernetesClusterPager := k.newListByKubernetesClusterPager.get(req) + if newListByKubernetesClusterPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetworkCloud/kubernetesClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/features` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + kubernetesClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("kubernetesClusterName")]) + if err != nil { + return nil, err + } + resp := k.srv.NewListByKubernetesClusterPager(resourceGroupNameParam, kubernetesClusterNameParam, nil) + newListByKubernetesClusterPager = &resp + k.newListByKubernetesClusterPager.add(req, newListByKubernetesClusterPager) + server.PagerResponderInjectNextLinks(newListByKubernetesClusterPager, req, func(page *armnetworkcloud.KubernetesClusterFeaturesClientListByKubernetesClusterResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByKubernetesClusterPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + k.newListByKubernetesClusterPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByKubernetesClusterPager) { + k.newListByKubernetesClusterPager.remove(req) + } + return resp, nil +} + +func (k *KubernetesClusterFeaturesServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response, error) { + if k.srv.BeginUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginUpdate not implemented")} + } + beginUpdate := k.beginUpdate.get(req) + if beginUpdate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.NetworkCloud/kubernetesClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/features/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armnetworkcloud.KubernetesClusterFeaturePatchParameters](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + kubernetesClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("kubernetesClusterName")]) + if err != nil { + return nil, err + } + featureNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("featureName")]) + if err != nil { + return nil, err + } + respr, errRespr := k.srv.BeginUpdate(req.Context(), resourceGroupNameParam, kubernetesClusterNameParam, featureNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginUpdate = &respr + k.beginUpdate.add(req, beginUpdate) + } + + resp, err := server.PollerResponderNext(beginUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + k.beginUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginUpdate) { + k.beginUpdate.remove(req) + } + + return resp, nil +} diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/kubernetesclusters_server.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/kubernetesclusters_server.go index 39a4a0c24b35..a69387b3f270 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/kubernetesclusters_server.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/kubernetesclusters_server.go @@ -45,7 +45,7 @@ type KubernetesClustersServer struct { NewListBySubscriptionPager func(options *armnetworkcloud.KubernetesClustersClientListBySubscriptionOptions) (resp azfake.PagerResponder[armnetworkcloud.KubernetesClustersClientListBySubscriptionResponse]) // BeginRestartNode is the fake for method KubernetesClustersClient.BeginRestartNode - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginRestartNode func(ctx context.Context, resourceGroupName string, kubernetesClusterName string, kubernetesClusterRestartNodeParameters armnetworkcloud.KubernetesClusterRestartNodeParameters, options *armnetworkcloud.KubernetesClustersClientBeginRestartNodeOptions) (resp azfake.PollerResponder[armnetworkcloud.KubernetesClustersClientRestartNodeResponse], errResp azfake.ErrorResponder) // BeginUpdate is the fake for method KubernetesClustersClient.BeginUpdate @@ -349,9 +349,9 @@ func (k *KubernetesClustersServerTransport) dispatchBeginRestartNode(req *http.R return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { k.beginRestartNode.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginRestartNode) { k.beginRestartNode.remove(req) diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/server_factory.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/server_factory.go index 79b118f09c8d..241b039b6903 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/server_factory.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/server_factory.go @@ -19,25 +19,26 @@ import ( // ServerFactory is a fake server for instances of the armnetworkcloud.ClientFactory type. type ServerFactory struct { - AgentPoolsServer AgentPoolsServer - BareMetalMachineKeySetsServer BareMetalMachineKeySetsServer - BareMetalMachinesServer BareMetalMachinesServer - BmcKeySetsServer BmcKeySetsServer - CloudServicesNetworksServer CloudServicesNetworksServer - ClusterManagersServer ClusterManagersServer - ClustersServer ClustersServer - ConsolesServer ConsolesServer - KubernetesClustersServer KubernetesClustersServer - L2NetworksServer L2NetworksServer - L3NetworksServer L3NetworksServer - MetricsConfigurationsServer MetricsConfigurationsServer - OperationsServer OperationsServer - RackSKUsServer RackSKUsServer - RacksServer RacksServer - StorageAppliancesServer StorageAppliancesServer - TrunkedNetworksServer TrunkedNetworksServer - VirtualMachinesServer VirtualMachinesServer - VolumesServer VolumesServer + AgentPoolsServer AgentPoolsServer + BareMetalMachineKeySetsServer BareMetalMachineKeySetsServer + BareMetalMachinesServer BareMetalMachinesServer + BmcKeySetsServer BmcKeySetsServer + CloudServicesNetworksServer CloudServicesNetworksServer + ClusterManagersServer ClusterManagersServer + ClustersServer ClustersServer + ConsolesServer ConsolesServer + KubernetesClusterFeaturesServer KubernetesClusterFeaturesServer + KubernetesClustersServer KubernetesClustersServer + L2NetworksServer L2NetworksServer + L3NetworksServer L3NetworksServer + MetricsConfigurationsServer MetricsConfigurationsServer + OperationsServer OperationsServer + RackSKUsServer RackSKUsServer + RacksServer RacksServer + StorageAppliancesServer StorageAppliancesServer + TrunkedNetworksServer TrunkedNetworksServer + VirtualMachinesServer VirtualMachinesServer + VolumesServer VolumesServer } // NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. @@ -52,27 +53,28 @@ func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { // ServerFactoryTransport connects instances of armnetworkcloud.ClientFactory to instances of ServerFactory. // Don't use this type directly, use NewServerFactoryTransport instead. type ServerFactoryTransport struct { - srv *ServerFactory - trMu sync.Mutex - trAgentPoolsServer *AgentPoolsServerTransport - trBareMetalMachineKeySetsServer *BareMetalMachineKeySetsServerTransport - trBareMetalMachinesServer *BareMetalMachinesServerTransport - trBmcKeySetsServer *BmcKeySetsServerTransport - trCloudServicesNetworksServer *CloudServicesNetworksServerTransport - trClusterManagersServer *ClusterManagersServerTransport - trClustersServer *ClustersServerTransport - trConsolesServer *ConsolesServerTransport - trKubernetesClustersServer *KubernetesClustersServerTransport - trL2NetworksServer *L2NetworksServerTransport - trL3NetworksServer *L3NetworksServerTransport - trMetricsConfigurationsServer *MetricsConfigurationsServerTransport - trOperationsServer *OperationsServerTransport - trRackSKUsServer *RackSKUsServerTransport - trRacksServer *RacksServerTransport - trStorageAppliancesServer *StorageAppliancesServerTransport - trTrunkedNetworksServer *TrunkedNetworksServerTransport - trVirtualMachinesServer *VirtualMachinesServerTransport - trVolumesServer *VolumesServerTransport + srv *ServerFactory + trMu sync.Mutex + trAgentPoolsServer *AgentPoolsServerTransport + trBareMetalMachineKeySetsServer *BareMetalMachineKeySetsServerTransport + trBareMetalMachinesServer *BareMetalMachinesServerTransport + trBmcKeySetsServer *BmcKeySetsServerTransport + trCloudServicesNetworksServer *CloudServicesNetworksServerTransport + trClusterManagersServer *ClusterManagersServerTransport + trClustersServer *ClustersServerTransport + trConsolesServer *ConsolesServerTransport + trKubernetesClusterFeaturesServer *KubernetesClusterFeaturesServerTransport + trKubernetesClustersServer *KubernetesClustersServerTransport + trL2NetworksServer *L2NetworksServerTransport + trL3NetworksServer *L3NetworksServerTransport + trMetricsConfigurationsServer *MetricsConfigurationsServerTransport + trOperationsServer *OperationsServerTransport + trRackSKUsServer *RackSKUsServerTransport + trRacksServer *RacksServerTransport + trStorageAppliancesServer *StorageAppliancesServerTransport + trTrunkedNetworksServer *TrunkedNetworksServerTransport + trVirtualMachinesServer *VirtualMachinesServerTransport + trVolumesServer *VolumesServerTransport } // Do implements the policy.Transporter interface for ServerFactoryTransport. @@ -120,6 +122,11 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { case "ConsolesClient": initServer(s, &s.trConsolesServer, func() *ConsolesServerTransport { return NewConsolesServerTransport(&s.srv.ConsolesServer) }) resp, err = s.trConsolesServer.Do(req) + case "KubernetesClusterFeaturesClient": + initServer(s, &s.trKubernetesClusterFeaturesServer, func() *KubernetesClusterFeaturesServerTransport { + return NewKubernetesClusterFeaturesServerTransport(&s.srv.KubernetesClusterFeaturesServer) + }) + resp, err = s.trKubernetesClusterFeaturesServer.Do(req) case "KubernetesClustersClient": initServer(s, &s.trKubernetesClustersServer, func() *KubernetesClustersServerTransport { return NewKubernetesClustersServerTransport(&s.srv.KubernetesClustersServer) diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/storageappliances_server.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/storageappliances_server.go index 406f323119f7..902839d08ea1 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/storageappliances_server.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/storageappliances_server.go @@ -34,11 +34,11 @@ type StorageAppliancesServer struct { BeginDelete func(ctx context.Context, resourceGroupName string, storageApplianceName string, options *armnetworkcloud.StorageAppliancesClientBeginDeleteOptions) (resp azfake.PollerResponder[armnetworkcloud.StorageAppliancesClientDeleteResponse], errResp azfake.ErrorResponder) // BeginDisableRemoteVendorManagement is the fake for method StorageAppliancesClient.BeginDisableRemoteVendorManagement - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginDisableRemoteVendorManagement func(ctx context.Context, resourceGroupName string, storageApplianceName string, options *armnetworkcloud.StorageAppliancesClientBeginDisableRemoteVendorManagementOptions) (resp azfake.PollerResponder[armnetworkcloud.StorageAppliancesClientDisableRemoteVendorManagementResponse], errResp azfake.ErrorResponder) // BeginEnableRemoteVendorManagement is the fake for method StorageAppliancesClient.BeginEnableRemoteVendorManagement - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginEnableRemoteVendorManagement func(ctx context.Context, resourceGroupName string, storageApplianceName string, options *armnetworkcloud.StorageAppliancesClientBeginEnableRemoteVendorManagementOptions) (resp azfake.PollerResponder[armnetworkcloud.StorageAppliancesClientEnableRemoteVendorManagementResponse], errResp azfake.ErrorResponder) // Get is the fake for method StorageAppliancesClient.Get @@ -251,9 +251,9 @@ func (s *StorageAppliancesServerTransport) dispatchBeginDisableRemoteVendorManag return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { s.beginDisableRemoteVendorManagement.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginDisableRemoteVendorManagement) { s.beginDisableRemoteVendorManagement.remove(req) @@ -305,9 +305,9 @@ func (s *StorageAppliancesServerTransport) dispatchBeginEnableRemoteVendorManage return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { s.beginEnableRemoteVendorManagement.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginEnableRemoteVendorManagement) { s.beginEnableRemoteVendorManagement.remove(req) diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/time_rfc3339.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/time_rfc3339.go index b0535a7b63e6..81f308b0d343 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/time_rfc3339.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/time_rfc3339.go @@ -19,12 +19,16 @@ import ( ) // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) const ( - utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` - utcDateTime = "2006-01-02T15:04:05.999999999" - dateTimeJSON = `"` + time.RFC3339Nano + `"` + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` ) type dateTimeRFC3339 time.Time @@ -40,17 +44,33 @@ func (t dateTimeRFC3339) MarshalText() ([]byte, error) { } func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcDateTimeJSON - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT } return t.Parse(layout, string(data)) } func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { - layout := utcDateTime - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT } return t.Parse(layout, string(data)) } @@ -61,6 +81,10 @@ func (t *dateTimeRFC3339) Parse(layout, value string) error { return err } +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return @@ -74,7 +98,7 @@ func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { } func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { + if data == nil || string(data) == "null" { return nil } var aux dateTimeRFC3339 diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/virtualmachines_server.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/virtualmachines_server.go index de7068097386..38af3483668b 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/virtualmachines_server.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/fake/virtualmachines_server.go @@ -46,19 +46,19 @@ type VirtualMachinesServer struct { NewListBySubscriptionPager func(options *armnetworkcloud.VirtualMachinesClientListBySubscriptionOptions) (resp azfake.PagerResponder[armnetworkcloud.VirtualMachinesClientListBySubscriptionResponse]) // BeginPowerOff is the fake for method VirtualMachinesClient.BeginPowerOff - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginPowerOff func(ctx context.Context, resourceGroupName string, virtualMachineName string, options *armnetworkcloud.VirtualMachinesClientBeginPowerOffOptions) (resp azfake.PollerResponder[armnetworkcloud.VirtualMachinesClientPowerOffResponse], errResp azfake.ErrorResponder) // BeginReimage is the fake for method VirtualMachinesClient.BeginReimage - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginReimage func(ctx context.Context, resourceGroupName string, virtualMachineName string, options *armnetworkcloud.VirtualMachinesClientBeginReimageOptions) (resp azfake.PollerResponder[armnetworkcloud.VirtualMachinesClientReimageResponse], errResp azfake.ErrorResponder) // BeginRestart is the fake for method VirtualMachinesClient.BeginRestart - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginRestart func(ctx context.Context, resourceGroupName string, virtualMachineName string, options *armnetworkcloud.VirtualMachinesClientBeginRestartOptions) (resp azfake.PollerResponder[armnetworkcloud.VirtualMachinesClientRestartResponse], errResp azfake.ErrorResponder) // BeginStart is the fake for method VirtualMachinesClient.BeginStart - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginStart func(ctx context.Context, resourceGroupName string, virtualMachineName string, options *armnetworkcloud.VirtualMachinesClientBeginStartOptions) (resp azfake.PollerResponder[armnetworkcloud.VirtualMachinesClientStartResponse], errResp azfake.ErrorResponder) // BeginUpdate is the fake for method VirtualMachinesClient.BeginUpdate @@ -380,9 +380,9 @@ func (v *VirtualMachinesServerTransport) dispatchBeginPowerOff(req *http.Request return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { v.beginPowerOff.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginPowerOff) { v.beginPowerOff.remove(req) @@ -424,9 +424,9 @@ func (v *VirtualMachinesServerTransport) dispatchBeginReimage(req *http.Request) return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { v.beginReimage.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginReimage) { v.beginReimage.remove(req) @@ -468,9 +468,9 @@ func (v *VirtualMachinesServerTransport) dispatchBeginRestart(req *http.Request) return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { v.beginRestart.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginRestart) { v.beginRestart.remove(req) @@ -512,9 +512,9 @@ func (v *VirtualMachinesServerTransport) dispatchBeginStart(req *http.Request) ( return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { v.beginStart.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginStart) { v.beginStart.remove(req) diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusterfeatures_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusterfeatures_client.go new file mode 100644 index 000000000000..b4d43ff82231 --- /dev/null +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusterfeatures_client.go @@ -0,0 +1,434 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetworkcloud + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// KubernetesClusterFeaturesClient contains the methods for the KubernetesClusterFeatures group. +// Don't use this type directly, use NewKubernetesClusterFeaturesClient() instead. +type KubernetesClusterFeaturesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewKubernetesClusterFeaturesClient creates a new instance of KubernetesClusterFeaturesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewKubernetesClusterFeaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KubernetesClusterFeaturesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &KubernetesClusterFeaturesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if +// it exists. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - kubernetesClusterName - The name of the Kubernetes cluster. +// - featureName - The name of the feature. +// - kubernetesClusterFeatureParameters - The request body. +// - options - KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginCreateOrUpdate +// method. +func (client *KubernetesClusterFeaturesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureParameters KubernetesClusterFeature, options *KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions) (*runtime.Poller[KubernetesClusterFeaturesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, kubernetesClusterName, featureName, kubernetesClusterFeatureParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KubernetesClusterFeaturesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KubernetesClusterFeaturesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +func (client *KubernetesClusterFeaturesClient) createOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureParameters KubernetesClusterFeature, options *KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KubernetesClusterFeaturesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, kubernetesClusterName, featureName, kubernetesClusterFeatureParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *KubernetesClusterFeaturesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureParameters KubernetesClusterFeature, options *KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if kubernetesClusterName == "" { + return nil, errors.New("parameter kubernetesClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{kubernetesClusterName}", url.PathEscape(kubernetesClusterName)) + if featureName == "" { + return nil, errors.New("parameter featureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{featureName}", url.PathEscape(featureName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, kubernetesClusterFeatureParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the provided Kubernetes cluster feature. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - kubernetesClusterName - The name of the Kubernetes cluster. +// - featureName - The name of the feature. +// - options - KubernetesClusterFeaturesClientBeginDeleteOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginDelete +// method. +func (client *KubernetesClusterFeaturesClient) BeginDelete(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, options *KubernetesClusterFeaturesClientBeginDeleteOptions) (*runtime.Poller[KubernetesClusterFeaturesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, kubernetesClusterName, featureName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KubernetesClusterFeaturesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KubernetesClusterFeaturesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the provided Kubernetes cluster feature. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +func (client *KubernetesClusterFeaturesClient) deleteOperation(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, options *KubernetesClusterFeaturesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "KubernetesClusterFeaturesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, kubernetesClusterName, featureName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *KubernetesClusterFeaturesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, options *KubernetesClusterFeaturesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if kubernetesClusterName == "" { + return nil, errors.New("parameter kubernetesClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{kubernetesClusterName}", url.PathEscape(kubernetesClusterName)) + if featureName == "" { + return nil, errors.New("parameter featureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{featureName}", url.PathEscape(featureName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get properties of the provided the Kubernetes cluster feature. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - kubernetesClusterName - The name of the Kubernetes cluster. +// - featureName - The name of the feature. +// - options - KubernetesClusterFeaturesClientGetOptions contains the optional parameters for the KubernetesClusterFeaturesClient.Get +// method. +func (client *KubernetesClusterFeaturesClient) Get(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, options *KubernetesClusterFeaturesClientGetOptions) (KubernetesClusterFeaturesClientGetResponse, error) { + var err error + const operationName = "KubernetesClusterFeaturesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, kubernetesClusterName, featureName, options) + if err != nil { + return KubernetesClusterFeaturesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return KubernetesClusterFeaturesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KubernetesClusterFeaturesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *KubernetesClusterFeaturesClient) getCreateRequest(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, options *KubernetesClusterFeaturesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if kubernetesClusterName == "" { + return nil, errors.New("parameter kubernetesClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{kubernetesClusterName}", url.PathEscape(kubernetesClusterName)) + if featureName == "" { + return nil, errors.New("parameter featureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{featureName}", url.PathEscape(featureName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *KubernetesClusterFeaturesClient) getHandleResponse(resp *http.Response) (KubernetesClusterFeaturesClientGetResponse, error) { + result := KubernetesClusterFeaturesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KubernetesClusterFeature); err != nil { + return KubernetesClusterFeaturesClientGetResponse{}, err + } + return result, nil +} + +// NewListByKubernetesClusterPager - Get a list of features for the provided Kubernetes cluster. +// +// Generated from API version 2024-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - kubernetesClusterName - The name of the Kubernetes cluster. +// - options - KubernetesClusterFeaturesClientListByKubernetesClusterOptions contains the optional parameters for the KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager +// method. +func (client *KubernetesClusterFeaturesClient) NewListByKubernetesClusterPager(resourceGroupName string, kubernetesClusterName string, options *KubernetesClusterFeaturesClientListByKubernetesClusterOptions) *runtime.Pager[KubernetesClusterFeaturesClientListByKubernetesClusterResponse] { + return runtime.NewPager(runtime.PagingHandler[KubernetesClusterFeaturesClientListByKubernetesClusterResponse]{ + More: func(page KubernetesClusterFeaturesClientListByKubernetesClusterResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *KubernetesClusterFeaturesClientListByKubernetesClusterResponse) (KubernetesClusterFeaturesClientListByKubernetesClusterResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByKubernetesClusterCreateRequest(ctx, resourceGroupName, kubernetesClusterName, options) + }, nil) + if err != nil { + return KubernetesClusterFeaturesClientListByKubernetesClusterResponse{}, err + } + return client.listByKubernetesClusterHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByKubernetesClusterCreateRequest creates the ListByKubernetesCluster request. +func (client *KubernetesClusterFeaturesClient) listByKubernetesClusterCreateRequest(ctx context.Context, resourceGroupName string, kubernetesClusterName string, options *KubernetesClusterFeaturesClientListByKubernetesClusterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if kubernetesClusterName == "" { + return nil, errors.New("parameter kubernetesClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{kubernetesClusterName}", url.PathEscape(kubernetesClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByKubernetesClusterHandleResponse handles the ListByKubernetesCluster response. +func (client *KubernetesClusterFeaturesClient) listByKubernetesClusterHandleResponse(resp *http.Response) (KubernetesClusterFeaturesClientListByKubernetesClusterResponse, error) { + result := KubernetesClusterFeaturesClientListByKubernetesClusterResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KubernetesClusterFeatureList); err != nil { + return KubernetesClusterFeaturesClientListByKubernetesClusterResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patch properties of the provided Kubernetes cluster feature. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - kubernetesClusterName - The name of the Kubernetes cluster. +// - featureName - The name of the feature. +// - kubernetesClusterFeatureUpdateParameters - The request body. +// - options - KubernetesClusterFeaturesClientBeginUpdateOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginUpdate +// method. +func (client *KubernetesClusterFeaturesClient) BeginUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureUpdateParameters KubernetesClusterFeaturePatchParameters, options *KubernetesClusterFeaturesClientBeginUpdateOptions) (*runtime.Poller[KubernetesClusterFeaturesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, kubernetesClusterName, featureName, kubernetesClusterFeatureUpdateParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KubernetesClusterFeaturesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KubernetesClusterFeaturesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch properties of the provided Kubernetes cluster feature. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-06-01-preview +func (client *KubernetesClusterFeaturesClient) update(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureUpdateParameters KubernetesClusterFeaturePatchParameters, options *KubernetesClusterFeaturesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KubernetesClusterFeaturesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, kubernetesClusterName, featureName, kubernetesClusterFeatureUpdateParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *KubernetesClusterFeaturesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureUpdateParameters KubernetesClusterFeaturePatchParameters, options *KubernetesClusterFeaturesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if kubernetesClusterName == "" { + return nil, errors.New("parameter kubernetesClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{kubernetesClusterName}", url.PathEscape(kubernetesClusterName)) + if featureName == "" { + return nil, errors.New("parameter featureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{featureName}", url.PathEscape(featureName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, kubernetesClusterFeatureUpdateParameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusterfeatures_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusterfeatures_client_example_test.go new file mode 100644 index 000000000000..2f95c7530de2 --- /dev/null +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusterfeatures_client_example_test.go @@ -0,0 +1,285 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armnetworkcloud_test + +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/networkcloud/armnetworkcloud" +) + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json +func ExampleKubernetesClusterFeaturesClient_NewListByKubernetesClusterPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewKubernetesClusterFeaturesClient().NewListByKubernetesClusterPager("resourceGroupName", "kubernetesClusterName", 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.KubernetesClusterFeatureList = armnetworkcloud.KubernetesClusterFeatureList{ + // Value: []*armnetworkcloud.KubernetesClusterFeature{ + // { + // Name: to.Ptr("featureName"), + // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/features"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/features/featureName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ + // AvailabilityLifecycle: to.Ptr(armnetworkcloud.KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable), + // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterFeatureDetailedStatusInstalled), + // DetailedStatusMessage: to.Ptr("The feature is successfully installed."), + // Options: []*armnetworkcloud.StringKeyValuePair{ + // { + // Key: to.Ptr("featureOptionName"), + // Value: to.Ptr("featureOptionValue"), + // }}, + // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterFeatureProvisioningStateSucceeded), + // Required: to.Ptr(armnetworkcloud.KubernetesClusterFeatureRequiredTrue), + // Version: to.Ptr("1.2.3"), + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json +func ExampleKubernetesClusterFeaturesClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewKubernetesClusterFeaturesClient().Get(ctx, "resourceGroupName", "kubernetesClusterName", "featureName", 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.KubernetesClusterFeature = armnetworkcloud.KubernetesClusterFeature{ + // Name: to.Ptr("featureName"), + // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/features"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/features/featureName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ + // AvailabilityLifecycle: to.Ptr(armnetworkcloud.KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable), + // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterFeatureDetailedStatusInstalled), + // DetailedStatusMessage: to.Ptr("The feature is successfully installed."), + // Options: []*armnetworkcloud.StringKeyValuePair{ + // { + // Key: to.Ptr("featureOptionName"), + // Value: to.Ptr("featureOptionValue"), + // }}, + // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterFeatureProvisioningStateSucceeded), + // Required: to.Ptr(armnetworkcloud.KubernetesClusterFeatureRequiredTrue), + // Version: to.Ptr("1.2.3"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Create.json +func ExampleKubernetesClusterFeaturesClient_BeginCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewKubernetesClusterFeaturesClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "kubernetesClusterName", "featureName", armnetworkcloud.KubernetesClusterFeature{ + Location: to.Ptr("location"), + Tags: map[string]*string{ + "key1": to.Ptr("myvalue1"), + "key2": to.Ptr("myvalue2"), + }, + Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ + Options: []*armnetworkcloud.StringKeyValuePair{ + { + Key: to.Ptr("featureOptionName"), + Value: to.Ptr("featureOptionValue"), + }}, + }, + }, 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.KubernetesClusterFeature = armnetworkcloud.KubernetesClusterFeature{ + // Name: to.Ptr("featureName"), + // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/features"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/features/featureName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ + // AvailabilityLifecycle: to.Ptr(armnetworkcloud.KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable), + // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterFeatureDetailedStatusInstalled), + // DetailedStatusMessage: to.Ptr("The feature is successfully installed."), + // Options: []*armnetworkcloud.StringKeyValuePair{ + // { + // Key: to.Ptr("featureOptionName"), + // Value: to.Ptr("featureOptionValue"), + // }}, + // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterFeatureProvisioningStateSucceeded), + // Required: to.Ptr(armnetworkcloud.KubernetesClusterFeatureRequiredTrue), + // Version: to.Ptr("1.2.3"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Delete.json +func ExampleKubernetesClusterFeaturesClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewKubernetesClusterFeaturesClient().BeginDelete(ctx, "resourceGroupName", "kubernetesClusterName", "featureName", 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) + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Patch.json +func ExampleKubernetesClusterFeaturesClient_BeginUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewKubernetesClusterFeaturesClient().BeginUpdate(ctx, "resourceGroupName", "kubernetesClusterName", "featureName", armnetworkcloud.KubernetesClusterFeaturePatchParameters{ + Properties: &armnetworkcloud.KubernetesClusterFeaturePatchProperties{ + Options: []*armnetworkcloud.StringKeyValuePair{ + { + Key: to.Ptr("featureOptionName"), + Value: to.Ptr("featureOptionValue"), + }}, + }, + Tags: map[string]*string{ + "key1": to.Ptr("myvalue1"), + "key2": to.Ptr("myvalue2"), + }, + }, 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.KubernetesClusterFeature = armnetworkcloud.KubernetesClusterFeature{ + // Name: to.Ptr("featureName"), + // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/features"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/features/featureName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ + // AvailabilityLifecycle: to.Ptr(armnetworkcloud.KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable), + // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterFeatureDetailedStatusInstalled), + // DetailedStatusMessage: to.Ptr("The feature is successfully installed."), + // Options: []*armnetworkcloud.StringKeyValuePair{ + // { + // Key: to.Ptr("featureOptionName"), + // Value: to.Ptr("featureOptionValue"), + // }}, + // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterFeatureProvisioningStateSucceeded), + // Required: to.Ptr(armnetworkcloud.KubernetesClusterFeatureRequiredTrue), + // Version: to.Ptr("1.2.3"), + // }, + // } +} diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusters_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusters_client.go index ab1a8b0f4c32..b92a728a02fa 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusters_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusters_client.go @@ -46,7 +46,7 @@ func NewKubernetesClustersClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Create a new Kubernetes cluster or update the properties of the existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - kubernetesClusterParameters - The request body. @@ -73,7 +73,7 @@ func (client *KubernetesClustersClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create a new Kubernetes cluster or update the properties of the existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *KubernetesClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, kubernetesClusterParameters KubernetesCluster, options *KubernetesClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "KubernetesClustersClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *KubernetesClustersClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, kubernetesClusterParameters); err != nil { @@ -127,7 +127,7 @@ func (client *KubernetesClustersClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Delete the provided Kubernetes cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - options - KubernetesClustersClientBeginDeleteOptions contains the optional parameters for the KubernetesClustersClient.BeginDelete @@ -153,7 +153,7 @@ func (client *KubernetesClustersClient) BeginDelete(ctx context.Context, resourc // Delete - Delete the provided Kubernetes cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *KubernetesClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, kubernetesClusterName string, options *KubernetesClustersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "KubernetesClustersClient.BeginDelete" @@ -195,7 +195,7 @@ func (client *KubernetesClustersClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +204,7 @@ func (client *KubernetesClustersClient) deleteCreateRequest(ctx context.Context, // Get - Get properties of the provided the Kubernetes cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - options - KubernetesClustersClientGetOptions contains the optional parameters for the KubernetesClustersClient.Get method. @@ -250,7 +250,7 @@ func (client *KubernetesClustersClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,7 +267,7 @@ func (client *KubernetesClustersClient) getHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - Get a list of Kubernetes clusters in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - KubernetesClustersClientListByResourceGroupOptions contains the optional parameters for the KubernetesClustersClient.NewListByResourceGroupPager // method. @@ -310,7 +310,7 @@ func (client *KubernetesClustersClient) listByResourceGroupCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,7 +327,7 @@ func (client *KubernetesClustersClient) listByResourceGroupHandleResponse(resp * // NewListBySubscriptionPager - Get a list of Kubernetes clusters in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - KubernetesClustersClientListBySubscriptionOptions contains the optional parameters for the KubernetesClustersClient.NewListBySubscriptionPager // method. func (client *KubernetesClustersClient) NewListBySubscriptionPager(options *KubernetesClustersClientListBySubscriptionOptions) *runtime.Pager[KubernetesClustersClientListBySubscriptionResponse] { @@ -365,7 +365,7 @@ func (client *KubernetesClustersClient) listBySubscriptionCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -383,7 +383,7 @@ func (client *KubernetesClustersClient) listBySubscriptionHandleResponse(resp *h // BeginRestartNode - Restart a targeted node of a Kubernetes cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - kubernetesClusterRestartNodeParameters - The request body. @@ -410,7 +410,7 @@ func (client *KubernetesClustersClient) BeginRestartNode(ctx context.Context, re // RestartNode - Restart a targeted node of a Kubernetes cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *KubernetesClustersClient) restartNode(ctx context.Context, resourceGroupName string, kubernetesClusterName string, kubernetesClusterRestartNodeParameters KubernetesClusterRestartNodeParameters, options *KubernetesClustersClientBeginRestartNodeOptions) (*http.Response, error) { var err error const operationName = "KubernetesClustersClient.BeginRestartNode" @@ -425,7 +425,7 @@ func (client *KubernetesClustersClient) restartNode(ctx context.Context, resourc if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -452,7 +452,7 @@ func (client *KubernetesClustersClient) restartNodeCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, kubernetesClusterRestartNodeParameters); err != nil { @@ -465,7 +465,7 @@ func (client *KubernetesClustersClient) restartNodeCreateRequest(ctx context.Con // cluster. Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - kubernetesClusterName - The name of the Kubernetes cluster. // - kubernetesClusterUpdateParameters - The request body. @@ -493,7 +493,7 @@ func (client *KubernetesClustersClient) BeginUpdate(ctx context.Context, resourc // Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *KubernetesClustersClient) update(ctx context.Context, resourceGroupName string, kubernetesClusterName string, kubernetesClusterUpdateParameters KubernetesClusterPatchParameters, options *KubernetesClustersClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "KubernetesClustersClient.BeginUpdate" @@ -535,7 +535,7 @@ func (client *KubernetesClustersClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, kubernetesClusterUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusters_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusters_client_example_test.go index 72a437c7d3b9..d5e2b0c02599 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusters_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/kubernetesclusters_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListBySubscription.json func ExampleKubernetesClustersClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -82,11 +82,11 @@ func ExampleKubernetesClustersClient_NewListBySubscriptionPager() { // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), - // Version: to.Ptr("1.24.13-1"), + // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), - // ControlPlaneKubernetesVersion: to.Ptr("1.24.12-1"), + // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), @@ -100,7 +100,7 @@ func ExampleKubernetesClustersClient_NewListBySubscriptionPager() { // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), - // VMSKUName: to.Ptr("NC_G4_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), @@ -162,9 +162,9 @@ func ExampleKubernetesClustersClient_NewListBySubscriptionPager() { // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), @@ -232,7 +232,7 @@ func ExampleKubernetesClustersClient_NewListBySubscriptionPager() { // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("machine1"), - // AgentPoolID: to.Ptr("pool1"), + // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](20), @@ -240,7 +240,7 @@ func ExampleKubernetesClustersClient_NewListBySubscriptionPager() { // DetailedStatusMessage: to.Ptr("No issues detected"), // DiskSizeGB: to.Ptr[int64](120), // Image: to.Ptr("myacr.azurecr.io/foobar:latest"), - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), @@ -265,7 +265,7 @@ func ExampleKubernetesClustersClient_NewListBySubscriptionPager() { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true"), // }}, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, @@ -274,7 +274,7 @@ func ExampleKubernetesClustersClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListByResourceGroup.json func ExampleKubernetesClustersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -338,11 +338,11 @@ func ExampleKubernetesClustersClient_NewListByResourceGroupPager() { // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), - // Version: to.Ptr("1.24.13-1"), + // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), - // ControlPlaneKubernetesVersion: to.Ptr("1.24.12-1"), + // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), @@ -356,7 +356,7 @@ func ExampleKubernetesClustersClient_NewListByResourceGroupPager() { // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), - // VMSKUName: to.Ptr("NC_G4_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), @@ -418,9 +418,9 @@ func ExampleKubernetesClustersClient_NewListByResourceGroupPager() { // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), @@ -488,7 +488,7 @@ func ExampleKubernetesClustersClient_NewListByResourceGroupPager() { // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("machine1"), - // AgentPoolID: to.Ptr("pool1"), + // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](20), @@ -496,7 +496,7 @@ func ExampleKubernetesClustersClient_NewListByResourceGroupPager() { // DetailedStatusMessage: to.Ptr("No issues detected"), // DiskSizeGB: to.Ptr[int64](120), // Image: to.Ptr("myacr.azurecr.io/foobar:latest"), - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), @@ -521,7 +521,7 @@ func ExampleKubernetesClustersClient_NewListByResourceGroupPager() { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true"), // }}, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, @@ -530,7 +530,7 @@ func ExampleKubernetesClustersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json func ExampleKubernetesClustersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -588,11 +588,11 @@ func ExampleKubernetesClustersClient_Get() { // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), - // Version: to.Ptr("1.24.13-1"), + // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), - // ControlPlaneKubernetesVersion: to.Ptr("1.24.12-1"), + // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), @@ -606,7 +606,7 @@ func ExampleKubernetesClustersClient_Get() { // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), - // VMSKUName: to.Ptr("NC_G4_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), @@ -668,9 +668,9 @@ func ExampleKubernetesClustersClient_Get() { // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), @@ -738,7 +738,7 @@ func ExampleKubernetesClustersClient_Get() { // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("machine1"), - // AgentPoolID: to.Ptr("pool1"), + // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](20), @@ -746,7 +746,7 @@ func ExampleKubernetesClustersClient_Get() { // DetailedStatusMessage: to.Ptr("No issues detected"), // DiskSizeGB: to.Ptr[int64](120), // Image: to.Ptr("myacr.azurecr.io/foobar:latest"), - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), @@ -771,15 +771,15 @@ func ExampleKubernetesClustersClient_Get() { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true"), // }}, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Create.json -func ExampleKubernetesClustersClient_BeginCreateOrUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Create.json +func ExampleKubernetesClustersClient_BeginCreateOrUpdate_createOrUpdateKubernetesCluster() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -824,7 +824,7 @@ func ExampleKubernetesClustersClient_BeginCreateOrUpdate() { to.Ptr("2"), to.Ptr("3")}, Count: to.Ptr[int64](3), - VMSKUName: to.Ptr("NC_G4_v1"), + VMSKUName: to.Ptr("NC_XXXX"), }, InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ { @@ -877,9 +877,9 @@ func ExampleKubernetesClustersClient_BeginCreateOrUpdate() { UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ MaxSurge: to.Ptr("1"), }, - VMSKUName: to.Ptr("NC_M16_v1"), + VMSKUName: to.Ptr("NC_XXXX"), }}, - KubernetesVersion: to.Ptr("1.24.12-1"), + KubernetesVersion: to.Ptr("1.XX.Y"), ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ Name: to.Ptr("my-managed-rg"), Location: to.Ptr("East US"), @@ -996,11 +996,11 @@ func ExampleKubernetesClustersClient_BeginCreateOrUpdate() { // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), - // Version: to.Ptr("1.24.13-1"), + // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), - // ControlPlaneKubernetesVersion: to.Ptr("1.24.12-1"), + // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), @@ -1014,7 +1014,7 @@ func ExampleKubernetesClustersClient_BeginCreateOrUpdate() { // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), - // VMSKUName: to.Ptr("NC_G4_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), @@ -1076,9 +1076,9 @@ func ExampleKubernetesClustersClient_BeginCreateOrUpdate() { // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), @@ -1146,7 +1146,7 @@ func ExampleKubernetesClustersClient_BeginCreateOrUpdate() { // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("machine1"), - // AgentPoolID: to.Ptr("pool1"), + // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](20), @@ -1154,7 +1154,7 @@ func ExampleKubernetesClustersClient_BeginCreateOrUpdate() { // DetailedStatusMessage: to.Ptr("No issues detected"), // DiskSizeGB: to.Ptr[int64](120), // Image: to.Ptr("myacr.azurecr.io/foobar:latest"), - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), @@ -1179,14 +1179,374 @@ func ExampleKubernetesClustersClient_BeginCreateOrUpdate() { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true"), // }}, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_L2LoadBalancer_Create.json +func ExampleKubernetesClustersClient_BeginCreateOrUpdate_createOrUpdateKubernetesClusterWithALayer2LoadBalancer() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armnetworkcloud.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewKubernetesClustersClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "kubernetesClusterName", armnetworkcloud.KubernetesCluster{ + Location: to.Ptr("location"), + Tags: map[string]*string{ + "key1": to.Ptr("myvalue1"), + "key2": to.Ptr("myvalue2"), + }, + ExtendedLocation: &armnetworkcloud.ExtendedLocation{ + Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), + Type: to.Ptr("CustomLocation"), + }, + Properties: &armnetworkcloud.KubernetesClusterProperties{ + AADConfiguration: &armnetworkcloud.AADConfiguration{ + AdminGroupObjectIDs: []*string{ + to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, + }, + AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ + AdminUsername: to.Ptr("azure"), + SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ + { + KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), + }}, + }, + ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ + AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ + AdminUsername: to.Ptr("azure"), + SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ + { + KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), + }}, + }, + AvailabilityZones: []*string{ + to.Ptr("1"), + to.Ptr("2"), + to.Ptr("3")}, + Count: to.Ptr[int64](3), + VMSKUName: to.Ptr("NC_XXXX"), + }, + InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ + { + Name: to.Ptr("SystemPool-1"), + AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ + AdminUsername: to.Ptr("azure"), + SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ + { + KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), + }}, + }, + AgentOptions: &armnetworkcloud.AgentOptions{ + HugepagesCount: to.Ptr[int64](96), + HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), + }, + AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ + L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ + { + NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), + PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), + }}, + L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ + { + IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), + NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), + PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), + }}, + TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ + { + NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), + PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), + }}, + }, + AvailabilityZones: []*string{ + to.Ptr("1"), + to.Ptr("2"), + to.Ptr("3")}, + Count: to.Ptr[int64](3), + Labels: []*armnetworkcloud.KubernetesLabel{ + { + Key: to.Ptr("kubernetes.label"), + Value: to.Ptr("true"), + }}, + Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), + Taints: []*armnetworkcloud.KubernetesLabel{ + { + Key: to.Ptr("kubernetes.taint"), + Value: to.Ptr("true"), + }}, + UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ + MaxSurge: to.Ptr("1"), + }, + VMSKUName: to.Ptr("NC_XXXX"), + }}, + KubernetesVersion: to.Ptr("1.XX.Y"), + ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ + Name: to.Ptr("my-managed-rg"), + Location: to.Ptr("East US"), + }, + NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ + AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ + L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ + { + NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), + PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), + }}, + L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ + { + IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), + NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), + PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), + }}, + TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ + { + NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), + PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), + }}, + }, + CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), + CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), + DNSServiceIP: to.Ptr("198.51.101.2"), + L2ServiceLoadBalancerConfiguration: &armnetworkcloud.L2ServiceLoadBalancerConfiguration{ + IPAddressPools: []*armnetworkcloud.IPAddressPool{ + { + Name: to.Ptr("pool1"), + Addresses: []*string{ + to.Ptr("198.51.102.2-198.51.102.254")}, + AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), + }}, + }, + PodCidrs: []*string{ + to.Ptr("198.51.100.0/24")}, + ServiceCidrs: []*string{ + to.Ptr("198.51.101.0/24")}, + }, + }, + }, 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.KubernetesCluster = armnetworkcloud.KubernetesCluster{ + // Name: to.Ptr("KubernetesClusterName"), + // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters"), + // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName"), + // SystemData: &armnetworkcloud.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), + // CreatedBy: to.Ptr("identityA"), + // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), + // LastModifiedBy: to.Ptr("identityB"), + // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), + // }, + // Location: to.Ptr("location"), + // Tags: map[string]*string{ + // "key1": to.Ptr("myvalue1"), + // "key2": to.Ptr("myvalue2"), + // }, + // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ + // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), + // Type: to.Ptr("CustomLocation"), + // }, + // Properties: &armnetworkcloud.KubernetesClusterProperties{ + // AADConfiguration: &armnetworkcloud.AADConfiguration{ + // AdminGroupObjectIDs: []*string{ + // to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, + // }, + // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ + // AdminUsername: to.Ptr("azure"), + // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ + // { + // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), + // }}, + // }, + // AttachedNetworkIDs: []*string{ + // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), + // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), + // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")}, + // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ + // { + // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), + // Version: to.Ptr("1.XX.Y"), + // }}, + // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), + // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), + // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), + // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ + // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ + // AdminUsername: to.Ptr("azure"), + // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ + // { + // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), + // }}, + // }, + // AvailabilityZones: []*string{ + // to.Ptr("1"), + // to.Ptr("2"), + // to.Ptr("3")}, + // Count: to.Ptr[int64](3), + // VMSKUName: to.Ptr("NC_XXXX"), + // }, + // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), + // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), + // FeatureStatuses: []*armnetworkcloud.FeatureStatus{ + // { + // Name: to.Ptr("Feature1"), + // DetailedStatus: to.Ptr(armnetworkcloud.FeatureDetailedStatusRunning), + // DetailedStatusMessage: to.Ptr("No issues detected"), + // Version: to.Ptr("1"), + // }}, + // InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ + // { + // Name: to.Ptr("SystemPool-1"), + // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ + // AdminUsername: to.Ptr("azure"), + // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ + // { + // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), + // }}, + // }, + // AgentOptions: &armnetworkcloud.AgentOptions{ + // HugepagesCount: to.Ptr[int64](96), + // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), + // }, + // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ + // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ + // { + // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), + // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), + // }}, + // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ + // { + // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), + // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), + // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), + // }}, + // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ + // { + // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), + // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), + // }}, + // }, + // AvailabilityZones: []*string{ + // to.Ptr("1"), + // to.Ptr("2"), + // to.Ptr("3")}, + // Count: to.Ptr[int64](3), + // Labels: []*armnetworkcloud.KubernetesLabel{ + // { + // Key: to.Ptr("kubernetes.label"), + // Value: to.Ptr("true"), + // }}, + // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), + // Taints: []*armnetworkcloud.KubernetesLabel{ + // { + // Key: to.Ptr("kubernetes.taint"), + // Value: to.Ptr("true"), + // }}, + // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ + // MaxSurge: to.Ptr("1"), + // }, + // VMSKUName: to.Ptr("NC_XXXX"), + // }}, + // KubernetesVersion: to.Ptr("1.XX.Y"), + // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ + // Name: to.Ptr("my-managed-rg"), + // Location: to.Ptr("East US"), + // }, + // NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ + // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ + // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ + // { + // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), + // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), + // }}, + // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ + // { + // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), + // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), + // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), + // }}, + // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ + // { + // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), + // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), + // }}, + // }, + // CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), + // CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), + // DNSServiceIP: to.Ptr("198.51.101.2"), + // L2ServiceLoadBalancerConfiguration: &armnetworkcloud.L2ServiceLoadBalancerConfiguration{ + // IPAddressPools: []*armnetworkcloud.IPAddressPool{ + // { + // Name: to.Ptr("pool1"), + // Addresses: []*string{ + // to.Ptr("198.51.102.2-198.51.102.254")}, + // AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), + // }}, + // }, + // PodCidrs: []*string{ + // to.Ptr("198.51.100.0/24")}, + // ServiceCidrs: []*string{ + // to.Ptr("198.51.101.0/24")}, + // }, + // Nodes: []*armnetworkcloud.KubernetesClusterNode{ + // { + // Name: to.Ptr("machine1"), + // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), + // AvailabilityZone: to.Ptr("1"), + // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), + // CPUCores: to.Ptr[int64](20), + // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusAvailable), + // DetailedStatusMessage: to.Ptr("No issues detected"), + // DiskSizeGB: to.Ptr[int64](120), + // Image: to.Ptr("myacr.azurecr.io/foobar:latest"), + // KubernetesVersion: to.Ptr("1.XX.Y"), + // Labels: []*armnetworkcloud.KubernetesLabel{ + // { + // Key: to.Ptr("kubernetes.label"), + // Value: to.Ptr("true"), + // }}, + // MemorySizeGB: to.Ptr[int64](256), + // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), + // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ + // { + // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), + // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayTrue), + // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), + // IPv4Address: to.Ptr("198.51.100.1"), + // IPv6Address: to.Ptr("2001:0db8:0000:0000:0000:0000:0000:0000"), + // MacAddress: to.Ptr("bf:1c:29:31:31:1f"), + // NetworkAttachmentName: to.Ptr("netAttachName01"), + // }}, + // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), + // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleControlPlane), + // Taints: []*armnetworkcloud.KubernetesLabel{ + // { + // Key: to.Ptr("kubernetes.taint"), + // Value: to.Ptr("true"), + // }}, + // VMSKUName: to.Ptr("NC_XXXX"), + // }}, + // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Delete.json func ExampleKubernetesClustersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1207,7 +1567,7 @@ func ExampleKubernetesClustersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Patch.json func ExampleKubernetesClustersClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1220,10 +1580,22 @@ func ExampleKubernetesClustersClient_BeginUpdate() { } poller, err := clientFactory.NewKubernetesClustersClient().BeginUpdate(ctx, "resourceGroupName", "kubernetesClusterName", armnetworkcloud.KubernetesClusterPatchParameters{ Properties: &armnetworkcloud.KubernetesClusterPatchProperties{ + AdministratorConfiguration: &armnetworkcloud.AdministratorConfigurationPatch{ + SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ + { + KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), + }}, + }, ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodePatchConfiguration{ + AdministratorConfiguration: &armnetworkcloud.AdministratorConfigurationPatch{ + SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ + { + KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), + }}, + }, Count: to.Ptr[int64](3), }, - KubernetesVersion: to.Ptr("1.24.12"), + KubernetesVersion: to.Ptr("1.XX.Y"), }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), @@ -1280,11 +1652,11 @@ func ExampleKubernetesClustersClient_BeginUpdate() { // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), - // Version: to.Ptr("1.24.13-1"), + // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), - // ControlPlaneKubernetesVersion: to.Ptr("1.24.12-1"), + // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), @@ -1298,7 +1670,7 @@ func ExampleKubernetesClustersClient_BeginUpdate() { // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), - // VMSKUName: to.Ptr("NC_G4_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), @@ -1360,9 +1732,9 @@ func ExampleKubernetesClustersClient_BeginUpdate() { // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), @@ -1430,7 +1802,7 @@ func ExampleKubernetesClustersClient_BeginUpdate() { // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("machine1"), - // AgentPoolID: to.Ptr("pool1"), + // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](20), @@ -1438,7 +1810,7 @@ func ExampleKubernetesClustersClient_BeginUpdate() { // DetailedStatusMessage: to.Ptr("No issues detected"), // DiskSizeGB: to.Ptr[int64](120), // Image: to.Ptr("myacr.azurecr.io/foobar:latest"), - // KubernetesVersion: to.Ptr("1.24.12-1"), + // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), @@ -1463,14 +1835,14 @@ func ExampleKubernetesClustersClient_BeginUpdate() { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true"), // }}, - // VMSKUName: to.Ptr("NC_M16_v1"), + // VMSKUName: to.Ptr("NC_XXXX"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_RestartNode.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_RestartNode.json func ExampleKubernetesClustersClient_BeginRestartNode() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/l2networks_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/l2networks_client.go index 67ccdb977a21..1c744a23b0ca 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/l2networks_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/l2networks_client.go @@ -46,7 +46,7 @@ func NewL2NetworksClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Create a new layer 2 (L2) network or update the properties of the existing network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - l2NetworkName - The name of the L2 network. // - l2NetworkParameters - The request body. @@ -73,7 +73,7 @@ func (client *L2NetworksClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Create a new layer 2 (L2) network or update the properties of the existing network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *L2NetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, l2NetworkName string, l2NetworkParameters L2Network, options *L2NetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "L2NetworksClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *L2NetworksClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, l2NetworkParameters); err != nil { @@ -127,7 +127,7 @@ func (client *L2NetworksClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete the provided layer 2 (L2) network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - l2NetworkName - The name of the L2 network. // - options - L2NetworksClientBeginDeleteOptions contains the optional parameters for the L2NetworksClient.BeginDelete method. @@ -152,7 +152,7 @@ func (client *L2NetworksClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Delete the provided layer 2 (L2) network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *L2NetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, l2NetworkName string, options *L2NetworksClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "L2NetworksClient.BeginDelete" @@ -194,7 +194,7 @@ func (client *L2NetworksClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -203,7 +203,7 @@ func (client *L2NetworksClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get properties of the provided layer 2 (L2) network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - l2NetworkName - The name of the L2 network. // - options - L2NetworksClientGetOptions contains the optional parameters for the L2NetworksClient.Get method. @@ -249,7 +249,7 @@ func (client *L2NetworksClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -266,7 +266,7 @@ func (client *L2NetworksClient) getHandleResponse(resp *http.Response) (L2Networ // NewListByResourceGroupPager - Get a list of layer 2 (L2) networks in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - L2NetworksClientListByResourceGroupOptions contains the optional parameters for the L2NetworksClient.NewListByResourceGroupPager // method. @@ -309,7 +309,7 @@ func (client *L2NetworksClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -326,7 +326,7 @@ func (client *L2NetworksClient) listByResourceGroupHandleResponse(resp *http.Res // NewListBySubscriptionPager - Get a list of layer 2 (L2) networks in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - L2NetworksClientListBySubscriptionOptions contains the optional parameters for the L2NetworksClient.NewListBySubscriptionPager // method. func (client *L2NetworksClient) NewListBySubscriptionPager(options *L2NetworksClientListBySubscriptionOptions) *runtime.Pager[L2NetworksClientListBySubscriptionResponse] { @@ -364,7 +364,7 @@ func (client *L2NetworksClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -382,7 +382,7 @@ func (client *L2NetworksClient) listBySubscriptionHandleResponse(resp *http.Resp // Update - Update tags associated with the provided layer 2 (L2) network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - l2NetworkName - The name of the L2 network. // - l2NetworkUpdateParameters - The request body. @@ -429,7 +429,7 @@ func (client *L2NetworksClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, l2NetworkUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/l2networks_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/l2networks_client_example_test.go index ed78563a68b0..e448ce8699eb 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/l2networks_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/l2networks_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListBySubscription.json func ExampleL2NetworksClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -78,7 +78,7 @@ func ExampleL2NetworksClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListByResourceGroup.json func ExampleL2NetworksClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -138,7 +138,7 @@ func ExampleL2NetworksClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json func ExampleL2NetworksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -190,7 +190,7 @@ func ExampleL2NetworksClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Create.json func ExampleL2NetworksClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -261,7 +261,7 @@ func ExampleL2NetworksClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Delete.json func ExampleL2NetworksClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -282,7 +282,7 @@ func ExampleL2NetworksClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Patch.json func ExampleL2NetworksClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/l3networks_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/l3networks_client.go index 713f89edf435..ef6666333dee 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/l3networks_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/l3networks_client.go @@ -46,7 +46,7 @@ func NewL3NetworksClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Create a new layer 3 (L3) network or update the properties of the existing network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - l3NetworkName - The name of the L3 network. // - l3NetworkParameters - The request body. @@ -73,7 +73,7 @@ func (client *L3NetworksClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Create a new layer 3 (L3) network or update the properties of the existing network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *L3NetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, l3NetworkName string, l3NetworkParameters L3Network, options *L3NetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "L3NetworksClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *L3NetworksClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, l3NetworkParameters); err != nil { @@ -127,7 +127,7 @@ func (client *L3NetworksClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete the provided layer 3 (L3) network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - l3NetworkName - The name of the L3 network. // - options - L3NetworksClientBeginDeleteOptions contains the optional parameters for the L3NetworksClient.BeginDelete method. @@ -152,7 +152,7 @@ func (client *L3NetworksClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Delete the provided layer 3 (L3) network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *L3NetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, l3NetworkName string, options *L3NetworksClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "L3NetworksClient.BeginDelete" @@ -194,7 +194,7 @@ func (client *L3NetworksClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -203,7 +203,7 @@ func (client *L3NetworksClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get properties of the provided layer 3 (L3) network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - l3NetworkName - The name of the L3 network. // - options - L3NetworksClientGetOptions contains the optional parameters for the L3NetworksClient.Get method. @@ -249,7 +249,7 @@ func (client *L3NetworksClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -266,7 +266,7 @@ func (client *L3NetworksClient) getHandleResponse(resp *http.Response) (L3Networ // NewListByResourceGroupPager - Get a list of layer 3 (L3) networks in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - L3NetworksClientListByResourceGroupOptions contains the optional parameters for the L3NetworksClient.NewListByResourceGroupPager // method. @@ -309,7 +309,7 @@ func (client *L3NetworksClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -326,7 +326,7 @@ func (client *L3NetworksClient) listByResourceGroupHandleResponse(resp *http.Res // NewListBySubscriptionPager - Get a list of layer 3 (L3) networks in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - L3NetworksClientListBySubscriptionOptions contains the optional parameters for the L3NetworksClient.NewListBySubscriptionPager // method. func (client *L3NetworksClient) NewListBySubscriptionPager(options *L3NetworksClientListBySubscriptionOptions) *runtime.Pager[L3NetworksClientListBySubscriptionResponse] { @@ -364,7 +364,7 @@ func (client *L3NetworksClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -382,7 +382,7 @@ func (client *L3NetworksClient) listBySubscriptionHandleResponse(resp *http.Resp // Update - Update tags associated with the provided layer 3 (L3) network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - l3NetworkName - The name of the L3 network. // - l3NetworkUpdateParameters - The request body. @@ -429,7 +429,7 @@ func (client *L3NetworksClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, l3NetworkUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/l3networks_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/l3networks_client_example_test.go index 7aaa82bd442e..59b8a76e5555 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/l3networks_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/l3networks_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListBySubscription.json func ExampleL3NetworksClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -82,7 +82,7 @@ func ExampleL3NetworksClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListByResourceGroup.json func ExampleL3NetworksClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -146,7 +146,7 @@ func ExampleL3NetworksClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json func ExampleL3NetworksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -202,7 +202,7 @@ func ExampleL3NetworksClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Create.json func ExampleL3NetworksClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -280,7 +280,7 @@ func ExampleL3NetworksClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Delete.json func ExampleL3NetworksClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -301,7 +301,7 @@ func ExampleL3NetworksClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Patch.json func ExampleL3NetworksClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/metricsconfigurations_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/metricsconfigurations_client.go index 4b4df21c67ee..1a6d40e37eed 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/metricsconfigurations_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/metricsconfigurations_client.go @@ -46,7 +46,7 @@ func NewMetricsConfigurationsClient(subscriptionID string, credential azcore.Tok // BeginCreateOrUpdate - Create new or update the existing metrics configuration of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - metricsConfigurationName - The name of the metrics configuration for the cluster. @@ -74,7 +74,7 @@ func (client *MetricsConfigurationsClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Create new or update the existing metrics configuration of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *MetricsConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, metricsConfigurationName string, metricsConfigurationParameters ClusterMetricsConfiguration, options *MetricsConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "MetricsConfigurationsClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *MetricsConfigurationsClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, metricsConfigurationParameters); err != nil { @@ -132,7 +132,7 @@ func (client *MetricsConfigurationsClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Delete the metrics configuration of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - metricsConfigurationName - The name of the metrics configuration for the cluster. @@ -159,7 +159,7 @@ func (client *MetricsConfigurationsClient) BeginDelete(ctx context.Context, reso // Delete - Delete the metrics configuration of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *MetricsConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, metricsConfigurationName string, options *MetricsConfigurationsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "MetricsConfigurationsClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *MetricsConfigurationsClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *MetricsConfigurationsClient) deleteCreateRequest(ctx context.Conte // Get - Get metrics configuration of the provided cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - metricsConfigurationName - The name of the metrics configuration for the cluster. @@ -266,7 +266,7 @@ func (client *MetricsConfigurationsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *MetricsConfigurationsClient) getHandleResponse(resp *http.Response // NewListByClusterPager - Get a list of metrics configurations for the provided cluster. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - options - MetricsConfigurationsClientListByClusterOptions contains the optional parameters for the MetricsConfigurationsClient.NewListByClusterPager @@ -331,7 +331,7 @@ func (client *MetricsConfigurationsClient) listByClusterCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -350,7 +350,7 @@ func (client *MetricsConfigurationsClient) listByClusterHandleResponse(resp *htt // Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the cluster. // - metricsConfigurationName - The name of the metrics configuration for the cluster. @@ -379,7 +379,7 @@ func (client *MetricsConfigurationsClient) BeginUpdate(ctx context.Context, reso // and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *MetricsConfigurationsClient) update(ctx context.Context, resourceGroupName string, clusterName string, metricsConfigurationName string, metricsConfigurationUpdateParameters ClusterMetricsConfigurationPatchParameters, options *MetricsConfigurationsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "MetricsConfigurationsClient.BeginUpdate" @@ -425,7 +425,7 @@ func (client *MetricsConfigurationsClient) updateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, metricsConfigurationUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/metricsconfigurations_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/metricsconfigurations_client_example_test.go index e392b3719cf6..0442e4201e60 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/metricsconfigurations_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/metricsconfigurations_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_ListByCluster.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_ListByCluster.json func ExampleMetricsConfigurationsClient_NewListByClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,7 +80,7 @@ func ExampleMetricsConfigurationsClient_NewListByClusterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json func ExampleMetricsConfigurationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -134,7 +134,7 @@ func ExampleMetricsConfigurationsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Create.json func ExampleMetricsConfigurationsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -208,7 +208,7 @@ func ExampleMetricsConfigurationsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Delete.json func ExampleMetricsConfigurationsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -229,7 +229,7 @@ func ExampleMetricsConfigurationsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Patch.json func ExampleMetricsConfigurationsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/models.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/models.go index 752fc3aa5b73..bc8b34982eb3 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/models.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/models.go @@ -37,6 +37,12 @@ type AdministratorConfiguration struct { SSHPublicKeys []*SSHPublicKey } +// AdministratorConfigurationPatch represents the patching capabilities for the administrator configuration. +type AdministratorConfigurationPatch struct { + // SshPublicKey represents the public key used to authenticate with a resource through SSH. + SSHPublicKeys []*SSHPublicKey +} + // AgentOptions are configurations that will be applied to each agent in an agent pool. type AgentOptions struct { // REQUIRED; The number of hugepages to allocate. @@ -93,6 +99,9 @@ type AgentPoolPatchParameters struct { // AgentPoolPatchProperties represents the properties of an agent pool that can be modified. type AgentPoolPatchProperties struct { + // The configuration of administrator credentials for the control plane nodes. + AdministratorConfiguration *NodePoolAdministratorConfigurationPatch + // The number of virtual machines that use this configuration. Count *int64 @@ -150,11 +159,23 @@ type AgentPoolProperties struct { // AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool. type AgentPoolUpgradeSettings struct { + // The maximum time in seconds that is allowed for a node drain to complete before proceeding with the upgrade of the agent + // pool. If not specified during creation, a value of 1800 seconds is used. + DrainTimeout *int64 + // The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') // or a percentage (e.g. '50%'). If a percentage is specified, it is the // percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If - // not specified, the default is 1. + // not specified during creation, a value of 1 is used. One of MaxSurge and + // MaxUnavailable must be greater than 0. MaxSurge *string + + // The maximum number or percentage of nodes that can be unavailable during upgrade. This can either be set to an integer + // (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the + // percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If + // not specified during creation, a value of 0 is used. One of MaxSurge and + // MaxUnavailable must be greater than 0. + MaxUnavailable *string } // AttachedNetworkConfiguration represents the set of workload networks to attach to a resource. @@ -407,6 +428,9 @@ type BareMetalMachineProperties struct { // REQUIRED; The serial number of the bare metal machine. SerialNumber *string + // The cluster version that has been applied to this machine during deployment or a version update. + MachineClusterVersion *string + // READ-ONLY; The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. AssociatedResourceIDs []*string @@ -438,6 +462,9 @@ type BareMetalMachineProperties struct { // READ-ONLY; The version of Kubernetes running on this machine. KubernetesVersion *string + // READ-ONLY; The list of roles that are assigned to the cluster node running on this machine. + MachineRoles []*string + // READ-ONLY; The image that is currently provisioned to the OS disk. OSImage *string @@ -456,6 +483,12 @@ type BareMetalMachineProperties struct { // READ-ONLY; The indicator of whether the bare metal machine is ready to receive workloads. ReadyState *BareMetalMachineReadyState + // READ-ONLY; The runtime protection status of the bare metal machine. + RuntimeProtectionStatus *RuntimeProtectionStatus + + // READ-ONLY; The list of statuses that represent secret rotation activity. + SecretRotationStatus []*SecretRotationStatus + // READ-ONLY; The discovered value of the machine's service tag. ServiceTag *string @@ -549,7 +582,7 @@ type BgpServiceLoadBalancerConfiguration struct { // The indicator to specify if the load balancer peers with the network fabric. FabricPeeringEnabled *FabricPeeringEnabled - // The list of pools of IP addresses that can be allocated to Load Balancer services. + // The list of pools of IP addresses that can be allocated to load balancer services. IPAddressPools []*IPAddressPool } @@ -745,6 +778,9 @@ type Cluster struct { // REQUIRED; The list of the resource properties. Properties *ClusterProperties + // The identity for the resource. + Identity *ManagedServiceIdentity + // Resource tags. Tags map[string]*string @@ -793,31 +829,37 @@ type ClusterAvailableVersion struct { // ClusterCapacity represents various details regarding compute capacity. type ClusterCapacity struct { - // The remaining appliance-based storage in GB available for workload use. + // The remaining appliance-based storage in GB available for workload use. Measured in gibibytes. AvailableApplianceStorageGB *int64 // The remaining number of cores that are available in this cluster for workload use. AvailableCoreCount *int64 - // The remaining machine or host-based storage in GB available for workload use. + // The remaining machine or host-based storage in GB available for workload use. Measured in gibibytes. AvailableHostStorageGB *int64 - // The remaining memory in GB that are available in this cluster for workload use. + // The remaining memory in GB that are available in this cluster for workload use. Measured in gibibytes. AvailableMemoryGB *int64 - // The total appliance-based storage in GB supported by this cluster for workload use. + // The total appliance-based storage in GB supported by this cluster for workload use. Measured in gibibytes. TotalApplianceStorageGB *int64 // The total number of cores that are supported by this cluster for workload use. TotalCoreCount *int64 - // The total machine or host-based storage in GB supported by this cluster for workload use. + // The total machine or host-based storage in GB supported by this cluster for workload use. Measured in gibibytes. TotalHostStorageGB *int64 - // The total memory supported by this cluster for workload use. + // The total memory supported by this cluster for workload use. Measured in gibibytes. TotalMemoryGB *int64 } +// ClusterContinueUpdateVersionParameters represents the body of the request to continue the update of a cluster version. +type ClusterContinueUpdateVersionParameters struct { + // The mode by which the cluster will target the next grouping of servers to continue the update. + MachineGroupTargetingMode *ClusterContinueUpdateVersionMachineGroupTargetingMode +} + // ClusterDeployParameters represents the body of the request to deploy cluster. type ClusterDeployParameters struct { // The names of bare metal machines in the cluster that should be skipped during environment validation. @@ -841,6 +883,9 @@ type ClusterManager struct { // REQUIRED; The list of the resource properties. Properties *ClusterManagerProperties + // The identity of the cluster manager. + Identity *ManagedServiceIdentity + // Resource tags. Tags map[string]*string @@ -868,6 +913,9 @@ type ClusterManagerList struct { // ClusterManagerPatchParameters represents the body of the request to patch the cluster properties. type ClusterManagerPatchParameters struct { + // The identity for the resource. + Identity *ManagedServiceIdentity + // The Azure resource tags that will replace the existing ones. Tags map[string]*string } @@ -988,6 +1036,9 @@ type ClusterMetricsConfigurationProperties struct { // ClusterPatchParameters represents the body of the request to patch the cluster properties. type ClusterPatchParameters struct { + // The identity for the resource. + Identity *ManagedServiceIdentity + // The list of the resource properties. Properties *ClusterPatchProperties @@ -1007,11 +1058,23 @@ type ClusterPatchProperties struct { // The service principal to be used by the cluster during Arc Appliance installation. ClusterServicePrincipal *ServicePrincipalInformation + // The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. + CommandOutputSettings *CommandOutputSettings + // The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. ComputeDeploymentThreshold *ValidationThreshold // The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster. ComputeRackDefinitions []*RackDefinition + + // The settings for cluster runtime protection. + RuntimeProtectionConfiguration *RuntimeProtectionConfiguration + + // The configuration for use of a key vault to store secrets for later retrieval by the operator. + SecretArchive *ClusterSecretArchive + + // The strategy for updating the cluster. + UpdateStrategy *ClusterUpdateStrategy } // ClusterProperties represents the properties of a cluster. @@ -1038,6 +1101,9 @@ type ClusterProperties struct { // The service principal to be used by the cluster during Arc Appliance installation. ClusterServicePrincipal *ServicePrincipalInformation + // The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. + CommandOutputSettings *CommandOutputSettings + // The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. ComputeDeploymentThreshold *ValidationThreshold @@ -1047,6 +1113,15 @@ type ClusterProperties struct { // The configuration of the managed resource group associated with the resource. ManagedResourceGroupConfiguration *ManagedResourceGroupConfiguration + // The settings for cluster runtime protection. + RuntimeProtectionConfiguration *RuntimeProtectionConfiguration + + // The configuration for use of a key vault to store secrets for later retrieval by the operator. + SecretArchive *ClusterSecretArchive + + // The strategy for updating the cluster. + UpdateStrategy *ClusterUpdateStrategy + // READ-ONLY; The list of cluster runtime version upgrades available for this cluster. AvailableUpgradeVersions []*ClusterAvailableUpgradeVersion @@ -1092,12 +1167,58 @@ type ClusterProperties struct { WorkloadResourceIDs []*string } +// ClusterScanRuntimeParameters defines the parameters for the cluster scan runtime operation. +type ClusterScanRuntimeParameters struct { + // The choice of if the scan operation should run the scan. + ScanActivity *ClusterScanRuntimeParametersScanActivity +} + +// ClusterSecretArchive configures the key vault to archive the secrets of the cluster for later retrieval. +type ClusterSecretArchive struct { + // REQUIRED; The resource ID of the key vault to archive the secrets of the cluster. + KeyVaultID *string + + // The indicator if the specified key vault should be used to archive the secrets of the cluster. + UseKeyVault *ClusterSecretArchiveEnabled +} + +// ClusterUpdateStrategy represents the strategy for updating the cluster. +type ClusterUpdateStrategy struct { + // REQUIRED; The mode of operation for runtime protection. + StrategyType *ClusterUpdateStrategyType + + // REQUIRED; Selection of how the threshold should be evaluated. + ThresholdType *ValidationThresholdType + + // REQUIRED; The numeric threshold value. + ThresholdValue *int64 + + // The maximum number of worker nodes that can be offline within the increment of update, e.g., rack-by-rack. Limited by the + // maximum number of machines in the increment. Defaults to the whole increment + // size. + MaxUnavailable *int64 + + // The time to wait between the increments of update defined by the strategy. + WaitTimeMinutes *int64 +} + // ClusterUpdateVersionParameters represents the body of the request to update cluster version. type ClusterUpdateVersionParameters struct { // REQUIRED; The version to be applied to the cluster during update. TargetClusterVersion *string } +// CommandOutputSettings represents the settings for commands run within the cluster such as bare metal machine run read-only +// commands. +type CommandOutputSettings struct { + // The selection of the managed identity to use with this storage account container. The identity type must be either system + // assigned or user assigned. + AssociatedIdentity *IdentitySelector + + // The URL of the storage account container that is to be used by the specified identities. + ContainerURL *string +} + // Console represents the console of an on-premises Network Cloud virtual machine. type Console struct { // REQUIRED; The extended location of the cluster manager associated with the cluster this virtual machine is created on. @@ -1145,7 +1266,7 @@ type ConsolePatchParameters struct { // ConsolePatchProperties represents the properties of the virtual machine console that can be patched. type ConsolePatchProperties struct { - // The credentials used to login to the image repository that has access to the specified image. + // The indicator of whether the console access is enabled. Enabled *ConsoleEnabled // The date and time after which the key will be disallowed access. @@ -1204,6 +1325,9 @@ type ControlPlaneNodeConfiguration struct { // ControlPlaneNodePatchConfiguration represents the properties of the control plane that can be patched for this Kubernetes // cluster. type ControlPlaneNodePatchConfiguration struct { + // The configuration of administrator credentials for the control plane nodes. + AdministratorConfiguration *AdministratorConfigurationPatch + // The number of virtual machines that use this configuration. Count *int64 } @@ -1322,7 +1446,8 @@ type HardwareValidationStatus struct { // IPAddressPool - IpAddressPool represents a pool of IP addresses that can be allocated to a service. type IPAddressPool struct { // REQUIRED; The list of IP address ranges. Each range can be a either a subnet in CIDR format or an explicit start-end range - // of IP addresses. + // of IP addresses. For a BGP service load balancer configuration, only CIDR format is + // supported and excludes /32 (IPv4) and /128 (IPv6) prefixes. Addresses []*string // REQUIRED; The name used to identify this IP address pool for association with a BGP advertisement. @@ -1336,6 +1461,15 @@ type IPAddressPool struct { OnlyUseHostIPs *BfdEnabled } +// IdentitySelector represents the selection of a managed identity for use. +type IdentitySelector struct { + // The type of managed identity that is being selected. + IdentityType *ManagedServiceIdentitySelectorType + + // The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. + UserAssignedIdentityResourceID *string +} + // ImageRepositoryCredentials represents the credentials used to login to the image repository. type ImageRepositoryCredentials struct { // REQUIRED; The password or token used to access an image in the target repository. @@ -1399,6 +1533,9 @@ type KeySetUser struct { // The free-form description for this user. Description *string + + // The user principal name (email format) used to validate this user's group membership. + UserPrincipalName *string } // KeySetUserStatus represents the status of the key set user. @@ -1440,6 +1577,79 @@ type KubernetesCluster struct { Type *string } +// KubernetesClusterFeature represents the feature of a Kubernetes cluster. +type KubernetesClusterFeature struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // The list of the resource properties. + Properties *KubernetesClusterFeatureProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/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 +} + +// KubernetesClusterFeatureList represents the list of Kubernetes cluster feature resources. +type KubernetesClusterFeatureList struct { + // The link used to get the next page of operations. + NextLink *string + + // The list of Kubernetes cluster features. + Value []*KubernetesClusterFeature +} + +// KubernetesClusterFeaturePatchParameters represents the body of the request to patch the Kubernetes cluster feature. +type KubernetesClusterFeaturePatchParameters struct { + // The list of the resource properties. + Properties *KubernetesClusterFeaturePatchProperties + + // The Azure resource tags that will replace the existing ones. + Tags map[string]*string +} + +// KubernetesClusterFeaturePatchProperties represents the Kubernetes cluster feature properties for patching. +type KubernetesClusterFeaturePatchProperties struct { + // The configured options for the feature. + Options []*StringKeyValuePair +} + +// KubernetesClusterFeatureProperties represents the properties of a Kubernetes cluster feature. +type KubernetesClusterFeatureProperties struct { + // The configured options for the feature. + Options []*StringKeyValuePair + + // READ-ONLY; The lifecycle indicator of the feature. + AvailabilityLifecycle *KubernetesClusterFeatureAvailabilityLifecycle + + // READ-ONLY; The detailed status of the feature. + DetailedStatus *KubernetesClusterFeatureDetailedStatus + + // READ-ONLY; The descriptive message for the detailed status of the feature. + DetailedStatusMessage *string + + // READ-ONLY; The provisioning state of the Kubernetes cluster feature. + ProvisioningState *KubernetesClusterFeatureProvisioningState + + // READ-ONLY; The indicator of if the feature is required or optional. Optional features may be deleted by the user, while + // required features are managed with the kubernetes cluster lifecycle. + Required *KubernetesClusterFeatureRequired + + // READ-ONLY; The version of the feature. + Version *string +} + // KubernetesClusterList represents a list of Kubernetes clusters. type KubernetesClusterList struct { // The link used to get the next page of operations. @@ -1470,7 +1680,7 @@ type KubernetesClusterNode struct { // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string - // READ-ONLY; The size of the disk configured for this node. + // READ-ONLY; The size of the disk configured for this node. Allocations are measured in gibibytes. DiskSizeGB *int64 // READ-ONLY; The machine image used to deploy this node. @@ -1482,7 +1692,8 @@ type KubernetesClusterNode struct { // READ-ONLY; The list of labels on this node that have been assigned to the agent pool containing this node. Labels []*KubernetesLabel - // READ-ONLY; The amount of memory configured for this node, derived from the vm SKU specified. + // READ-ONLY; The amount of memory configured for this node, derived from the vm SKU specified. Allocations are measured in + // gibibytes. MemorySizeGB *int64 // READ-ONLY; The mode of the agent pool containing this node. Not applicable for control plane nodes. @@ -1518,11 +1729,13 @@ type KubernetesClusterPatchParameters struct { // KubernetesClusterPatchProperties represents the properties of the Kubernetes cluster that can be patched. type KubernetesClusterPatchProperties struct { + // The configuration of the default administrator credentials. + AdministratorConfiguration *AdministratorConfigurationPatch + // The defining characteristics of the control plane that can be patched for this Kubernetes cluster. ControlPlaneNodeConfiguration *ControlPlaneNodePatchConfiguration - // The Kubernetes version for this cluster. Accepts n.n, n.n.n, and n.n.n-n format. The interpreted version used will be resolved - // into this field after creation or update. + // The Kubernetes version for this cluster. KubernetesVersion *string } @@ -1537,8 +1750,7 @@ type KubernetesClusterProperties struct { // sub-resource. InitialAgentPoolConfigurations []*InitialAgentPoolConfiguration - // REQUIRED; The Kubernetes version for this cluster. Accepts n.n, n.n.n, and n.n.n-n format. The interpreted version used - // will be resolved into this field after creation or update. + // REQUIRED; The Kubernetes version for this cluster. KubernetesVersion *string // REQUIRED; The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. @@ -1689,6 +1901,12 @@ type L2NetworkProperties struct { VirtualMachinesAssociatedIDs []*string } +// L2ServiceLoadBalancerConfiguration represents the configuration of a layer 2 service load balancer. +type L2ServiceLoadBalancerConfiguration struct { + // The list of pools of IP addresses that can be allocated to load balancer services. + IPAddressPools []*IPAddressPool +} + // L3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. type L3Network struct { // REQUIRED; The extended location of the cluster associated with the resource. @@ -1815,7 +2033,7 @@ type LldpNeighbor struct { // MachineDisk - Disk represents the properties of the disk. type MachineDisk struct { - // READ-ONLY; The maximum amount of storage in GB. + // READ-ONLY; The maximum amount of storage. Measured in gibibytes. CapacityGB *int64 // READ-ONLY; The connection type of the rack SKU resource. @@ -1845,7 +2063,7 @@ type MachineSKUProperties struct { // READ-ONLY; The hardware version of the machine. HardwareVersion *string - // READ-ONLY; The maximum amount of memory in GB. + // READ-ONLY; The maximum amount of memory. Measured in gibibytes. MemoryCapacityGB *int64 // READ-ONLY; The model of the machine. @@ -1879,6 +2097,26 @@ type ManagedResourceGroupConfiguration struct { Name *string } +// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +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 +} + // NetworkAttachment represents the single network attachment. type NetworkAttachment struct { // REQUIRED; The resource ID of the associated network attached to the virtual machine. It can be one of cloudServicesNetwork, @@ -1928,13 +2166,18 @@ type NetworkConfiguration struct { // The configuration of networks being attached to the cluster for use by the workloads that run on this Kubernetes cluster. AttachedNetworkConfiguration *AttachedNetworkConfiguration - // The configuration of the BGP service load balancer for this Kubernetes cluster. + // The configuration of the BGP service load balancer for this Kubernetes cluster. A maximum of one service load balancer + // may be specified, either Layer 2 or BGP. BgpServiceLoadBalancerConfiguration *BgpServiceLoadBalancerConfiguration // The IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified // in service CIDR. DNSServiceIP *string + // The configuration of the Layer 2 service load balancer for this Kubernetes cluster. A maximum of one service load balancer + // may be specified, either Layer 2 or BGP. + L2ServiceLoadBalancerConfiguration *L2ServiceLoadBalancerConfiguration + // The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, // one for each IP family (IPv4/IPv6), is expected for dual-stack networking. PodCidrs []*string @@ -1962,7 +2205,7 @@ type NetworkInterface struct { // READ-ONLY; The number of ports on the device. PortCount *int64 - // READ-ONLY; The maximum amount of data in GB that the line card transmits through a port at any given second. + // READ-ONLY; The maximum amount of data in gigabits that the line card transmits through a port at any given second. PortSpeed *int64 // READ-ONLY; The vendor name of the device. @@ -1981,6 +2224,12 @@ type Nic struct { Name *string } +// NodePoolAdministratorConfigurationPatch represents the patching capabilities for the administrator configuration. +type NodePoolAdministratorConfigurationPatch struct { + // SshPublicKey represents the public key used to authenticate with a resource through SSH. + SSHPublicKeys []*SSHPublicKey +} + // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { // Localized display information for this particular operation. @@ -2035,34 +2284,52 @@ type OperationStatusResult struct { // REQUIRED; Operation status. Status *string - // The end time of the operation. + // The additional properties of the operation status result. + Properties *OperationStatusResultProperties + + // READ-ONLY; The end time of the operation. EndTime *time.Time - // If present, details of the operation error. + // READ-ONLY; If present, details of the operation error. Error *ErrorDetail - // Fully qualified ID for the async operation. + // READ-ONLY; Fully qualified ID for the async operation. ID *string - // Name of the async operation. + // READ-ONLY; Name of the async operation. Name *string - // The operations list. + // READ-ONLY; The operations list. Operations []*OperationStatusResult - // Percent of the operation that is complete. + // READ-ONLY; Percent of the operation that is complete. PercentComplete *float32 - // The start time of the operation. - StartTime *time.Time - // READ-ONLY; Fully qualified ID of the resource against which the original async operation was started. ResourceID *string + + // READ-ONLY; The start time of the operation. + StartTime *time.Time +} + +// OperationStatusResultProperties represents additional properties of the operation status result. +type OperationStatusResultProperties struct { + // READ-ONLY; For actions that run commands or scripts, the exit code of the script execution. + ExitCode *string + + // READ-ONLY; For actions that run commands or scripts, the leading bytes of the output of the script execution. + OutputHead *string + + // READ-ONLY; For actions that run commands or scripts, a reference to the location of the result. + ResultRef *string + + // READ-ONLY; For actions that run commands or scripts, the URL where the full output of the script output can be retrieved. + ResultURL *string } // OsDisk represents configuration of the boot disk. type OsDisk struct { - // REQUIRED; The size of the disk in gigabytes. Required if the createOption is Ephemeral. + // REQUIRED; The size of the disk. Required if the createOption is Ephemeral. Allocations are measured in gibibytes. DiskSizeGB *int64 // The strategy for creating the OS disk. @@ -2236,12 +2503,66 @@ type RacksPatchProperties struct { RackSerialNumber *string } +// RuntimeProtectionConfiguration represents the runtime protection configuration for the cluster. +type RuntimeProtectionConfiguration struct { + // The mode of operation for runtime protection. + EnforcementLevel *RuntimeProtectionEnforcementLevel +} + +// RuntimeProtectionStatus represents the runtime protection status of the bare metal machine. +type RuntimeProtectionStatus struct { + // READ-ONLY; The timestamp when the malware definitions were last updated. + DefinitionsLastUpdated *time.Time + + // READ-ONLY; The version of the malware definitions. + DefinitionsVersion *string + + // READ-ONLY; The timestamp of the most recently completed scan, or empty if there has never been a scan. + ScanCompletedTime *time.Time + + // READ-ONLY; The timestamp of the most recently scheduled scan, or empty if no scan has been scheduled. + ScanScheduledTime *time.Time + + // READ-ONLY; The timestamp of the most recently started scan, or empty if there has never been a scan. + ScanStartedTime *time.Time +} + // SSHPublicKey - SshPublicKey represents the public key used to authenticate with a resource through SSH. type SSHPublicKey struct { // REQUIRED; The SSH public key data. KeyData *string } +// SecretArchiveReference represents the reference to a secret in a key vault. +type SecretArchiveReference struct { + // READ-ONLY; The resource ID of the key vault containing the secret. + KeyVaultID *string + + // READ-ONLY; The name of the secret in the key vault. + SecretName *string + + // READ-ONLY; The version of the secret in the key vault. + SecretVersion *string +} + +// SecretRotationStatus represents the status of a secret rotation. +type SecretRotationStatus struct { + // READ-ONLY; The maximum number of days the secret may be used before it must be changed. + ExpirePeriodDays *int64 + + // READ-ONLY; The date and time when the secret was last changed. + LastRotationTime *time.Time + + // READ-ONLY; The number of days a secret exists before rotations will be attempted. + RotationPeriodDays *int64 + + // READ-ONLY; The reference to the secret in a key vault. + SecretArchiveReference *SecretArchiveReference + + // READ-ONLY; The type name used to identify the purpose of the secret. + SecretType *string +} + // ServiceLoadBalancerBgpPeer represents the configuration of the BGP service load balancer for the Kubernetes cluster. type ServiceLoadBalancerBgpPeer struct { // REQUIRED; The name used to identify this BGP peer for association with a BGP advertisement. @@ -2259,10 +2580,14 @@ type ServiceLoadBalancerBgpPeer struct { // The indicator to enable multi-hop peering support. BgpMultiHop *BgpMultiHop - // The requested BGP hold time value. This field uses ISO 8601 duration format, for example P1H. + // Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The requested + // BGP hold time value. This field uses ISO 8601 duration format, for example + // P1H. HoldTime *string - // The requested BGP keepalive time value. This field uses ISO 8601 duration format, for example P1H. + // Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The requested + // BGP keepalive time value. This field uses ISO 8601 duration format, for + // example P1H. KeepAliveTime *string // The autonomous system number used for the local end of the BGP session. @@ -2401,6 +2726,12 @@ type StorageApplianceProperties struct { // READ-ONLY; The endpoint for the management interface of the storage appliance. ManagementIPv4Address *string + // READ-ONLY; The manufacturer of the storage appliance. + Manufacturer *string + + // READ-ONLY; The model of the storage appliance. + Model *string + // READ-ONLY; The provisioning state of the storage appliance. ProvisioningState *StorageApplianceProvisioningState @@ -2410,11 +2741,17 @@ type StorageApplianceProperties struct { // READ-ONLY; The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is // an unsupported feature. RemoteVendorManagementStatus *RemoteVendorManagementStatus + + // READ-ONLY; The list of statuses that represent secret rotation activity. + SecretRotationStatus []*SecretRotationStatus + + // READ-ONLY; The version of the storage appliance. + Version *string } // StorageApplianceSKUProperties - StorageApplianceSkuProperties represents the properties of the storage appliance SKU. type StorageApplianceSKUProperties struct { - // READ-ONLY; The maximum capacity of the storage appliance. + // READ-ONLY; The maximum capacity of the storage appliance. Measured in gibibytes. CapacityGB *int64 // READ-ONLY; The model of the storage appliance. @@ -2439,6 +2776,15 @@ type StorageProfile struct { VolumeAttachments []*string } +// StringKeyValuePair represents a single entry in a mapping of keys to values. +type StringKeyValuePair struct { + // REQUIRED; The key to the mapped value. + Key *string + + // REQUIRED; The value of the mapping key. + Value *string +} + // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). @@ -2552,6 +2898,15 @@ type TrunkedNetworkProperties struct { VirtualMachinesAssociatedIDs []*string } +// UserAssignedIdentity - User assigned identity properties +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 +} + // ValidationThreshold indicates allowed machine and node hardware and deployment failures. type ValidationThreshold struct { // REQUIRED; Selection of how the type evaluation is applied to the cluster calculation. @@ -2649,7 +3004,7 @@ type VirtualMachineProperties struct { // REQUIRED; The cloud service network that provides platform-level services for the virtual machine. CloudServicesNetworkAttachment *NetworkAttachment - // REQUIRED; The memory size of the virtual machine in GB. + // REQUIRED; The memory size of the virtual machine. Allocations are measured in gibibytes. MemorySizeGB *int64 // REQUIRED; The storage profile that specifies size and other parameters about the disks related to the virtual machine. @@ -2694,7 +3049,7 @@ type VirtualMachineProperties struct { // READ-ONLY; The cluster availability zone containing this virtual machine. AvailabilityZone *string - // READ-ONLY; The resource ID of the bare metal machine the virtual machine has landed to. + // READ-ONLY; The resource ID of the bare metal machine that hosts the virtual machine. BareMetalMachineID *string // READ-ONLY; The resource ID of the cluster the virtual machine is created for. diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/models_serde.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/models_serde.go index 6aa53bd6b07c..e1e1e7ebf2b5 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/models_serde.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/models_serde.go @@ -104,6 +104,33 @@ func (a *AdministratorConfiguration) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AdministratorConfigurationPatch. +func (a AdministratorConfigurationPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sshPublicKeys", a.SSHPublicKeys) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdministratorConfigurationPatch. +func (a *AdministratorConfigurationPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sshPublicKeys": + err = unpopulate(val, "SSHPublicKeys", &a.SSHPublicKeys) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AgentOptions. func (a AgentOptions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -255,6 +282,7 @@ func (a *AgentPoolPatchParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AgentPoolPatchProperties. func (a AgentPoolPatchProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "administratorConfiguration", a.AdministratorConfiguration) populate(objectMap, "count", a.Count) populate(objectMap, "upgradeSettings", a.UpgradeSettings) return json.Marshal(objectMap) @@ -269,6 +297,9 @@ func (a *AgentPoolPatchProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "administratorConfiguration": + err = unpopulate(val, "AdministratorConfiguration", &a.AdministratorConfiguration) + delete(rawMsg, key) case "count": err = unpopulate(val, "Count", &a.Count) delete(rawMsg, key) @@ -365,7 +396,9 @@ func (a *AgentPoolProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AgentPoolUpgradeSettings. func (a AgentPoolUpgradeSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "drainTimeout", a.DrainTimeout) populate(objectMap, "maxSurge", a.MaxSurge) + populate(objectMap, "maxUnavailable", a.MaxUnavailable) return json.Marshal(objectMap) } @@ -378,9 +411,15 @@ func (a *AgentPoolUpgradeSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "drainTimeout": + err = unpopulate(val, "DrainTimeout", &a.DrainTimeout) + delete(rawMsg, key) case "maxSurge": err = unpopulate(val, "MaxSurge", &a.MaxSurge) delete(rawMsg, key) + case "maxUnavailable": + err = unpopulate(val, "MaxUnavailable", &a.MaxUnavailable) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -975,8 +1014,10 @@ func (b BareMetalMachineProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "hybridAksClustersAssociatedIds", b.HybridAksClustersAssociatedIDs) populate(objectMap, "kubernetesNodeName", b.KubernetesNodeName) populate(objectMap, "kubernetesVersion", b.KubernetesVersion) + populate(objectMap, "machineClusterVersion", b.MachineClusterVersion) populate(objectMap, "machineDetails", b.MachineDetails) populate(objectMap, "machineName", b.MachineName) + populate(objectMap, "machineRoles", b.MachineRoles) populate(objectMap, "machineSkuId", b.MachineSKUID) populate(objectMap, "osImage", b.OSImage) populate(objectMap, "oamIpv4Address", b.OamIPv4Address) @@ -986,6 +1027,8 @@ func (b BareMetalMachineProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "rackId", b.RackID) populate(objectMap, "rackSlot", b.RackSlot) populate(objectMap, "readyState", b.ReadyState) + populate(objectMap, "runtimeProtectionStatus", b.RuntimeProtectionStatus) + populate(objectMap, "secretRotationStatus", b.SecretRotationStatus) populate(objectMap, "serialNumber", b.SerialNumber) populate(objectMap, "serviceTag", b.ServiceTag) populate(objectMap, "virtualMachinesAssociatedIds", b.VirtualMachinesAssociatedIDs) @@ -1043,12 +1086,18 @@ func (b *BareMetalMachineProperties) UnmarshalJSON(data []byte) error { case "kubernetesVersion": err = unpopulate(val, "KubernetesVersion", &b.KubernetesVersion) delete(rawMsg, key) + case "machineClusterVersion": + err = unpopulate(val, "MachineClusterVersion", &b.MachineClusterVersion) + delete(rawMsg, key) case "machineDetails": err = unpopulate(val, "MachineDetails", &b.MachineDetails) delete(rawMsg, key) case "machineName": err = unpopulate(val, "MachineName", &b.MachineName) delete(rawMsg, key) + case "machineRoles": + err = unpopulate(val, "MachineRoles", &b.MachineRoles) + delete(rawMsg, key) case "machineSkuId": err = unpopulate(val, "MachineSKUID", &b.MachineSKUID) delete(rawMsg, key) @@ -1076,6 +1125,12 @@ func (b *BareMetalMachineProperties) UnmarshalJSON(data []byte) error { case "readyState": err = unpopulate(val, "ReadyState", &b.ReadyState) delete(rawMsg, key) + case "runtimeProtectionStatus": + err = unpopulate(val, "RuntimeProtectionStatus", &b.RuntimeProtectionStatus) + delete(rawMsg, key) + case "secretRotationStatus": + err = unpopulate(val, "SecretRotationStatus", &b.SecretRotationStatus) + delete(rawMsg, key) case "serialNumber": err = unpopulate(val, "SerialNumber", &b.SerialNumber) delete(rawMsg, key) @@ -1738,6 +1793,7 @@ func (c Cluster) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "extendedLocation", c.ExtendedLocation) populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) populate(objectMap, "location", c.Location) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -1762,6 +1818,9 @@ func (c *Cluster) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) @@ -1921,6 +1980,33 @@ func (c *ClusterCapacity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ClusterContinueUpdateVersionParameters. +func (c ClusterContinueUpdateVersionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "machineGroupTargetingMode", c.MachineGroupTargetingMode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterContinueUpdateVersionParameters. +func (c *ClusterContinueUpdateVersionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "machineGroupTargetingMode": + err = unpopulate(val, "MachineGroupTargetingMode", &c.MachineGroupTargetingMode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ClusterDeployParameters. func (c ClusterDeployParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1983,6 +2069,7 @@ func (c *ClusterList) UnmarshalJSON(data []byte) error { func (c ClusterManager) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) populate(objectMap, "location", c.Location) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -2004,6 +2091,9 @@ func (c *ClusterManager) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &c.Location) delete(rawMsg, key) @@ -2064,6 +2154,7 @@ func (c *ClusterManagerList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ClusterManagerPatchParameters. func (c ClusterManagerPatchParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "identity", c.Identity) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } @@ -2077,6 +2168,9 @@ func (c *ClusterManagerPatchParameters) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) @@ -2349,6 +2443,7 @@ func (c *ClusterMetricsConfigurationProperties) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ClusterPatchParameters. func (c ClusterPatchParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "identity", c.Identity) populate(objectMap, "properties", c.Properties) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) @@ -2363,6 +2458,9 @@ func (c *ClusterPatchParameters) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) @@ -2383,8 +2481,12 @@ func (c ClusterPatchProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "aggregatorOrSingleRackDefinition", c.AggregatorOrSingleRackDefinition) populate(objectMap, "clusterLocation", c.ClusterLocation) populate(objectMap, "clusterServicePrincipal", c.ClusterServicePrincipal) + populate(objectMap, "commandOutputSettings", c.CommandOutputSettings) populate(objectMap, "computeDeploymentThreshold", c.ComputeDeploymentThreshold) populate(objectMap, "computeRackDefinitions", c.ComputeRackDefinitions) + populate(objectMap, "runtimeProtectionConfiguration", c.RuntimeProtectionConfiguration) + populate(objectMap, "secretArchive", c.SecretArchive) + populate(objectMap, "updateStrategy", c.UpdateStrategy) return json.Marshal(objectMap) } @@ -2406,12 +2508,24 @@ func (c *ClusterPatchProperties) UnmarshalJSON(data []byte) error { case "clusterServicePrincipal": err = unpopulate(val, "ClusterServicePrincipal", &c.ClusterServicePrincipal) delete(rawMsg, key) + case "commandOutputSettings": + err = unpopulate(val, "CommandOutputSettings", &c.CommandOutputSettings) + delete(rawMsg, key) case "computeDeploymentThreshold": err = unpopulate(val, "ComputeDeploymentThreshold", &c.ComputeDeploymentThreshold) delete(rawMsg, key) case "computeRackDefinitions": err = unpopulate(val, "ComputeRackDefinitions", &c.ComputeRackDefinitions) delete(rawMsg, key) + case "runtimeProtectionConfiguration": + err = unpopulate(val, "RuntimeProtectionConfiguration", &c.RuntimeProtectionConfiguration) + delete(rawMsg, key) + case "secretArchive": + err = unpopulate(val, "SecretArchive", &c.SecretArchive) + delete(rawMsg, key) + case "updateStrategy": + err = unpopulate(val, "UpdateStrategy", &c.UpdateStrategy) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", c, err) @@ -2435,6 +2549,7 @@ func (c ClusterProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "clusterServicePrincipal", c.ClusterServicePrincipal) populate(objectMap, "clusterType", c.ClusterType) populate(objectMap, "clusterVersion", c.ClusterVersion) + populate(objectMap, "commandOutputSettings", c.CommandOutputSettings) populate(objectMap, "computeDeploymentThreshold", c.ComputeDeploymentThreshold) populate(objectMap, "computeRackDefinitions", c.ComputeRackDefinitions) populate(objectMap, "detailedStatus", c.DetailedStatus) @@ -2444,7 +2559,10 @@ func (c ClusterProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "manualActionCount", c.ManualActionCount) populate(objectMap, "networkFabricId", c.NetworkFabricID) populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "runtimeProtectionConfiguration", c.RuntimeProtectionConfiguration) + populate(objectMap, "secretArchive", c.SecretArchive) populate(objectMap, "supportExpiryDate", c.SupportExpiryDate) + populate(objectMap, "updateStrategy", c.UpdateStrategy) populate(objectMap, "workloadResourceIds", c.WorkloadResourceIDs) return json.Marshal(objectMap) } @@ -2494,6 +2612,9 @@ func (c *ClusterProperties) UnmarshalJSON(data []byte) error { case "clusterVersion": err = unpopulate(val, "ClusterVersion", &c.ClusterVersion) delete(rawMsg, key) + case "commandOutputSettings": + err = unpopulate(val, "CommandOutputSettings", &c.CommandOutputSettings) + delete(rawMsg, key) case "computeDeploymentThreshold": err = unpopulate(val, "ComputeDeploymentThreshold", &c.ComputeDeploymentThreshold) delete(rawMsg, key) @@ -2521,9 +2642,18 @@ func (c *ClusterProperties) UnmarshalJSON(data []byte) error { case "provisioningState": err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) delete(rawMsg, key) + case "runtimeProtectionConfiguration": + err = unpopulate(val, "RuntimeProtectionConfiguration", &c.RuntimeProtectionConfiguration) + delete(rawMsg, key) + case "secretArchive": + err = unpopulate(val, "SecretArchive", &c.SecretArchive) + delete(rawMsg, key) case "supportExpiryDate": err = unpopulate(val, "SupportExpiryDate", &c.SupportExpiryDate) delete(rawMsg, key) + case "updateStrategy": + err = unpopulate(val, "UpdateStrategy", &c.UpdateStrategy) + delete(rawMsg, key) case "workloadResourceIds": err = unpopulate(val, "WorkloadResourceIDs", &c.WorkloadResourceIDs) delete(rawMsg, key) @@ -2535,6 +2665,107 @@ func (c *ClusterProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ClusterScanRuntimeParameters. +func (c ClusterScanRuntimeParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "scanActivity", c.ScanActivity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterScanRuntimeParameters. +func (c *ClusterScanRuntimeParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scanActivity": + err = unpopulate(val, "ScanActivity", &c.ScanActivity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterSecretArchive. +func (c ClusterSecretArchive) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyVaultId", c.KeyVaultID) + populate(objectMap, "useKeyVault", c.UseKeyVault) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterSecretArchive. +func (c *ClusterSecretArchive) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &c.KeyVaultID) + delete(rawMsg, key) + case "useKeyVault": + err = unpopulate(val, "UseKeyVault", &c.UseKeyVault) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterUpdateStrategy. +func (c ClusterUpdateStrategy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxUnavailable", c.MaxUnavailable) + populate(objectMap, "strategyType", c.StrategyType) + populate(objectMap, "thresholdType", c.ThresholdType) + populate(objectMap, "thresholdValue", c.ThresholdValue) + populate(objectMap, "waitTimeMinutes", c.WaitTimeMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdateStrategy. +func (c *ClusterUpdateStrategy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxUnavailable": + err = unpopulate(val, "MaxUnavailable", &c.MaxUnavailable) + delete(rawMsg, key) + case "strategyType": + err = unpopulate(val, "StrategyType", &c.StrategyType) + delete(rawMsg, key) + case "thresholdType": + err = unpopulate(val, "ThresholdType", &c.ThresholdType) + delete(rawMsg, key) + case "thresholdValue": + err = unpopulate(val, "ThresholdValue", &c.ThresholdValue) + delete(rawMsg, key) + case "waitTimeMinutes": + err = unpopulate(val, "WaitTimeMinutes", &c.WaitTimeMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ClusterUpdateVersionParameters. func (c ClusterUpdateVersionParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2562,6 +2793,37 @@ func (c *ClusterUpdateVersionParameters) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CommandOutputSettings. +func (c CommandOutputSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "associatedIdentity", c.AssociatedIdentity) + populate(objectMap, "containerUrl", c.ContainerURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CommandOutputSettings. +func (c *CommandOutputSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "associatedIdentity": + err = unpopulate(val, "AssociatedIdentity", &c.AssociatedIdentity) + delete(rawMsg, key) + case "containerUrl": + err = unpopulate(val, "ContainerURL", &c.ContainerURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Console. func (c Console) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2811,6 +3073,7 @@ func (c *ControlPlaneNodeConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ControlPlaneNodePatchConfiguration. func (c ControlPlaneNodePatchConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "administratorConfiguration", c.AdministratorConfiguration) populate(objectMap, "count", c.Count) return json.Marshal(objectMap) } @@ -2824,6 +3087,9 @@ func (c *ControlPlaneNodePatchConfiguration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "administratorConfiguration": + err = unpopulate(val, "AdministratorConfiguration", &c.AdministratorConfiguration) + delete(rawMsg, key) case "count": err = unpopulate(val, "Count", &c.Count) delete(rawMsg, key) @@ -3185,6 +3451,37 @@ func (i *IPAddressPool) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type IdentitySelector. +func (i IdentitySelector) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityType", i.IdentityType) + populate(objectMap, "userAssignedIdentityResourceId", i.UserAssignedIdentityResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentitySelector. +func (i *IdentitySelector) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityType": + err = unpopulate(val, "IdentityType", &i.IdentityType) + delete(rawMsg, key) + case "userAssignedIdentityResourceId": + err = unpopulate(val, "UserAssignedIdentityResourceID", &i.UserAssignedIdentityResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ImageRepositoryCredentials. func (i ImageRepositoryCredentials) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3293,6 +3590,7 @@ func (k KeySetUser) MarshalJSON() ([]byte, error) { populate(objectMap, "azureUserName", k.AzureUserName) populate(objectMap, "description", k.Description) populate(objectMap, "sshPublicKey", k.SSHPublicKey) + populate(objectMap, "userPrincipalName", k.UserPrincipalName) return json.Marshal(objectMap) } @@ -3314,6 +3612,9 @@ func (k *KeySetUser) UnmarshalJSON(data []byte) error { case "sshPublicKey": err = unpopulate(val, "SSHPublicKey", &k.SSHPublicKey) delete(rawMsg, key) + case "userPrincipalName": + err = unpopulate(val, "UserPrincipalName", &k.UserPrincipalName) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", k, err) @@ -3412,16 +3713,67 @@ func (k *KubernetesCluster) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterList. -func (k KubernetesClusterList) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeature. +func (k KubernetesClusterFeature) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", k.ID) + populate(objectMap, "location", k.Location) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "systemData", k.SystemData) + populate(objectMap, "tags", k.Tags) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeature. +func (k *KubernetesClusterFeature) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &k.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &k.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeatureList. +func (k KubernetesClusterFeatureList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "nextLink", k.NextLink) populate(objectMap, "value", k.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterList. -func (k *KubernetesClusterList) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeatureList. +func (k *KubernetesClusterFeatureList) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", k, err) @@ -3443,32 +3795,16 @@ func (k *KubernetesClusterList) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterNode. -func (k KubernetesClusterNode) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeaturePatchParameters. +func (k KubernetesClusterFeaturePatchParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "agentPoolId", k.AgentPoolID) - populate(objectMap, "availabilityZone", k.AvailabilityZone) - populate(objectMap, "bareMetalMachineId", k.BareMetalMachineID) - populate(objectMap, "cpuCores", k.CPUCores) - populate(objectMap, "detailedStatus", k.DetailedStatus) - populate(objectMap, "detailedStatusMessage", k.DetailedStatusMessage) - populate(objectMap, "diskSizeGB", k.DiskSizeGB) - populate(objectMap, "image", k.Image) - populate(objectMap, "kubernetesVersion", k.KubernetesVersion) - populate(objectMap, "labels", k.Labels) - populate(objectMap, "memorySizeGB", k.MemorySizeGB) - populate(objectMap, "mode", k.Mode) - populate(objectMap, "name", k.Name) - populate(objectMap, "networkAttachments", k.NetworkAttachments) - populate(objectMap, "powerState", k.PowerState) - populate(objectMap, "role", k.Role) - populate(objectMap, "taints", k.Taints) - populate(objectMap, "vmSkuName", k.VMSKUName) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "tags", k.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterNode. -func (k *KubernetesClusterNode) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeaturePatchParameters. +func (k *KubernetesClusterFeaturePatchParameters) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", k, err) @@ -3476,8 +3812,164 @@ func (k *KubernetesClusterNode) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "agentPoolId": - err = unpopulate(val, "AgentPoolID", &k.AgentPoolID) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeaturePatchProperties. +func (k KubernetesClusterFeaturePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "options", k.Options) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeaturePatchProperties. +func (k *KubernetesClusterFeaturePatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "options": + err = unpopulate(val, "Options", &k.Options) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeatureProperties. +func (k KubernetesClusterFeatureProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availabilityLifecycle", k.AvailabilityLifecycle) + populate(objectMap, "detailedStatus", k.DetailedStatus) + populate(objectMap, "detailedStatusMessage", k.DetailedStatusMessage) + populate(objectMap, "options", k.Options) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "required", k.Required) + populate(objectMap, "version", k.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeatureProperties. +func (k *KubernetesClusterFeatureProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availabilityLifecycle": + err = unpopulate(val, "AvailabilityLifecycle", &k.AvailabilityLifecycle) + delete(rawMsg, key) + case "detailedStatus": + err = unpopulate(val, "DetailedStatus", &k.DetailedStatus) + delete(rawMsg, key) + case "detailedStatusMessage": + err = unpopulate(val, "DetailedStatusMessage", &k.DetailedStatusMessage) + delete(rawMsg, key) + case "options": + err = unpopulate(val, "Options", &k.Options) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "required": + err = unpopulate(val, "Required", &k.Required) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &k.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterList. +func (k KubernetesClusterList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", k.NextLink) + populate(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterList. +func (k *KubernetesClusterList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &k.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterNode. +func (k KubernetesClusterNode) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentPoolId", k.AgentPoolID) + populate(objectMap, "availabilityZone", k.AvailabilityZone) + populate(objectMap, "bareMetalMachineId", k.BareMetalMachineID) + populate(objectMap, "cpuCores", k.CPUCores) + populate(objectMap, "detailedStatus", k.DetailedStatus) + populate(objectMap, "detailedStatusMessage", k.DetailedStatusMessage) + populate(objectMap, "diskSizeGB", k.DiskSizeGB) + populate(objectMap, "image", k.Image) + populate(objectMap, "kubernetesVersion", k.KubernetesVersion) + populate(objectMap, "labels", k.Labels) + populate(objectMap, "memorySizeGB", k.MemorySizeGB) + populate(objectMap, "mode", k.Mode) + populate(objectMap, "name", k.Name) + populate(objectMap, "networkAttachments", k.NetworkAttachments) + populate(objectMap, "powerState", k.PowerState) + populate(objectMap, "role", k.Role) + populate(objectMap, "taints", k.Taints) + populate(objectMap, "vmSkuName", k.VMSKUName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterNode. +func (k *KubernetesClusterNode) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentPoolId": + err = unpopulate(val, "AgentPoolID", &k.AgentPoolID) delete(rawMsg, key) case "availabilityZone": err = unpopulate(val, "AvailabilityZone", &k.AvailabilityZone) @@ -3572,6 +4064,7 @@ func (k *KubernetesClusterPatchParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KubernetesClusterPatchProperties. func (k KubernetesClusterPatchProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "administratorConfiguration", k.AdministratorConfiguration) populate(objectMap, "controlPlaneNodeConfiguration", k.ControlPlaneNodeConfiguration) populate(objectMap, "kubernetesVersion", k.KubernetesVersion) return json.Marshal(objectMap) @@ -3586,6 +4079,9 @@ func (k *KubernetesClusterPatchProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "administratorConfiguration": + err = unpopulate(val, "AdministratorConfiguration", &k.AdministratorConfiguration) + delete(rawMsg, key) case "controlPlaneNodeConfiguration": err = unpopulate(val, "ControlPlaneNodeConfiguration", &k.ControlPlaneNodeConfiguration) delete(rawMsg, key) @@ -3956,6 +4452,33 @@ func (l *L2NetworkProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type L2ServiceLoadBalancerConfiguration. +func (l L2ServiceLoadBalancerConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddressPools", l.IPAddressPools) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type L2ServiceLoadBalancerConfiguration. +func (l *L2ServiceLoadBalancerConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddressPools": + err = unpopulate(val, "IPAddressPools", &l.IPAddressPools) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type L3Network. func (l L3Network) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4390,6 +4913,45 @@ func (m *ManagedResourceGroupConfiguration) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type NetworkAttachment. func (n NetworkAttachment) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4449,6 +5011,7 @@ func (n NetworkConfiguration) MarshalJSON() ([]byte, error) { populate(objectMap, "cloudServicesNetworkId", n.CloudServicesNetworkID) populate(objectMap, "cniNetworkId", n.CniNetworkID) populate(objectMap, "dnsServiceIp", n.DNSServiceIP) + populate(objectMap, "l2ServiceLoadBalancerConfiguration", n.L2ServiceLoadBalancerConfiguration) populate(objectMap, "podCidrs", n.PodCidrs) populate(objectMap, "serviceCidrs", n.ServiceCidrs) return json.Marshal(objectMap) @@ -4478,6 +5041,9 @@ func (n *NetworkConfiguration) UnmarshalJSON(data []byte) error { case "dnsServiceIp": err = unpopulate(val, "DNSServiceIP", &n.DNSServiceIP) delete(rawMsg, key) + case "l2ServiceLoadBalancerConfiguration": + err = unpopulate(val, "L2ServiceLoadBalancerConfiguration", &n.L2ServiceLoadBalancerConfiguration) + delete(rawMsg, key) case "podCidrs": err = unpopulate(val, "PodCidrs", &n.PodCidrs) delete(rawMsg, key) @@ -4578,6 +5144,33 @@ func (n *Nic) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type NodePoolAdministratorConfigurationPatch. +func (n NodePoolAdministratorConfigurationPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sshPublicKeys", n.SSHPublicKeys) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NodePoolAdministratorConfigurationPatch. +func (n *NodePoolAdministratorConfigurationPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sshPublicKeys": + err = unpopulate(val, "SSHPublicKeys", &n.SSHPublicKeys) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Operation. func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4700,6 +5293,7 @@ func (o OperationStatusResult) MarshalJSON() ([]byte, error) { populate(objectMap, "name", o.Name) populate(objectMap, "operations", o.Operations) populate(objectMap, "percentComplete", o.PercentComplete) + populate(objectMap, "properties", o.Properties) populate(objectMap, "resourceId", o.ResourceID) populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) populate(objectMap, "status", o.Status) @@ -4733,6 +5327,9 @@ func (o *OperationStatusResult) UnmarshalJSON(data []byte) error { case "percentComplete": err = unpopulate(val, "PercentComplete", &o.PercentComplete) delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) case "resourceId": err = unpopulate(val, "ResourceID", &o.ResourceID) delete(rawMsg, key) @@ -4750,6 +5347,45 @@ func (o *OperationStatusResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type OperationStatusResultProperties. +func (o OperationStatusResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exitCode", o.ExitCode) + populate(objectMap, "outputHead", o.OutputHead) + populate(objectMap, "resultRef", o.ResultRef) + populate(objectMap, "resultUrl", o.ResultURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResultProperties. +func (o *OperationStatusResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exitCode": + err = unpopulate(val, "ExitCode", &o.ExitCode) + delete(rawMsg, key) + case "outputHead": + err = unpopulate(val, "OutputHead", &o.OutputHead) + delete(rawMsg, key) + case "resultRef": + err = unpopulate(val, "ResultRef", &o.ResultRef) + delete(rawMsg, key) + case "resultUrl": + err = unpopulate(val, "ResultURL", &o.ResultURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type OsDisk. func (o OsDisk) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5168,6 +5804,76 @@ func (r *RacksPatchProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type RuntimeProtectionConfiguration. +func (r RuntimeProtectionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enforcementLevel", r.EnforcementLevel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuntimeProtectionConfiguration. +func (r *RuntimeProtectionConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enforcementLevel": + err = unpopulate(val, "EnforcementLevel", &r.EnforcementLevel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RuntimeProtectionStatus. +func (r RuntimeProtectionStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "definitionsLastUpdated", r.DefinitionsLastUpdated) + populate(objectMap, "definitionsVersion", r.DefinitionsVersion) + populateDateTimeRFC3339(objectMap, "scanCompletedTime", r.ScanCompletedTime) + populateDateTimeRFC3339(objectMap, "scanScheduledTime", r.ScanScheduledTime) + populateDateTimeRFC3339(objectMap, "scanStartedTime", r.ScanStartedTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuntimeProtectionStatus. +func (r *RuntimeProtectionStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "definitionsLastUpdated": + err = unpopulateDateTimeRFC3339(val, "DefinitionsLastUpdated", &r.DefinitionsLastUpdated) + delete(rawMsg, key) + case "definitionsVersion": + err = unpopulate(val, "DefinitionsVersion", &r.DefinitionsVersion) + delete(rawMsg, key) + case "scanCompletedTime": + err = unpopulateDateTimeRFC3339(val, "ScanCompletedTime", &r.ScanCompletedTime) + delete(rawMsg, key) + case "scanScheduledTime": + err = unpopulateDateTimeRFC3339(val, "ScanScheduledTime", &r.ScanScheduledTime) + delete(rawMsg, key) + case "scanStartedTime": + err = unpopulateDateTimeRFC3339(val, "ScanStartedTime", &r.ScanStartedTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SSHPublicKey. func (s SSHPublicKey) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5195,6 +5901,84 @@ func (s *SSHPublicKey) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SecretArchiveReference. +func (s SecretArchiveReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyVaultId", s.KeyVaultID) + populate(objectMap, "secretName", s.SecretName) + populate(objectMap, "secretVersion", s.SecretVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretArchiveReference. +func (s *SecretArchiveReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &s.KeyVaultID) + delete(rawMsg, key) + case "secretName": + err = unpopulate(val, "SecretName", &s.SecretName) + delete(rawMsg, key) + case "secretVersion": + err = unpopulate(val, "SecretVersion", &s.SecretVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretRotationStatus. +func (s SecretRotationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expirePeriodDays", s.ExpirePeriodDays) + populateDateTimeRFC3339(objectMap, "lastRotationTime", s.LastRotationTime) + populate(objectMap, "rotationPeriodDays", s.RotationPeriodDays) + populate(objectMap, "secretArchiveReference", s.SecretArchiveReference) + populate(objectMap, "secretType", s.SecretType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretRotationStatus. +func (s *SecretRotationStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirePeriodDays": + err = unpopulate(val, "ExpirePeriodDays", &s.ExpirePeriodDays) + delete(rawMsg, key) + case "lastRotationTime": + err = unpopulateDateTimeRFC3339(val, "LastRotationTime", &s.LastRotationTime) + delete(rawMsg, key) + case "rotationPeriodDays": + err = unpopulate(val, "RotationPeriodDays", &s.RotationPeriodDays) + delete(rawMsg, key) + case "secretArchiveReference": + err = unpopulate(val, "SecretArchiveReference", &s.SecretArchiveReference) + delete(rawMsg, key) + case "secretType": + err = unpopulate(val, "SecretType", &s.SecretType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ServiceLoadBalancerBgpPeer. func (s ServiceLoadBalancerBgpPeer) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5517,13 +6301,17 @@ func (s StorageApplianceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "detailedStatus", s.DetailedStatus) populate(objectMap, "detailedStatusMessage", s.DetailedStatusMessage) populate(objectMap, "managementIpv4Address", s.ManagementIPv4Address) + populate(objectMap, "manufacturer", s.Manufacturer) + populate(objectMap, "model", s.Model) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "rackId", s.RackID) populate(objectMap, "rackSlot", s.RackSlot) populate(objectMap, "remoteVendorManagementFeature", s.RemoteVendorManagementFeature) populate(objectMap, "remoteVendorManagementStatus", s.RemoteVendorManagementStatus) + populate(objectMap, "secretRotationStatus", s.SecretRotationStatus) populate(objectMap, "serialNumber", s.SerialNumber) populate(objectMap, "storageApplianceSkuId", s.StorageApplianceSKUID) + populate(objectMap, "version", s.Version) return json.Marshal(objectMap) } @@ -5557,6 +6345,12 @@ func (s *StorageApplianceProperties) UnmarshalJSON(data []byte) error { case "managementIpv4Address": err = unpopulate(val, "ManagementIPv4Address", &s.ManagementIPv4Address) delete(rawMsg, key) + case "manufacturer": + err = unpopulate(val, "Manufacturer", &s.Manufacturer) + delete(rawMsg, key) + case "model": + err = unpopulate(val, "Model", &s.Model) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) delete(rawMsg, key) @@ -5572,12 +6366,18 @@ func (s *StorageApplianceProperties) UnmarshalJSON(data []byte) error { case "remoteVendorManagementStatus": err = unpopulate(val, "RemoteVendorManagementStatus", &s.RemoteVendorManagementStatus) delete(rawMsg, key) + case "secretRotationStatus": + err = unpopulate(val, "SecretRotationStatus", &s.SecretRotationStatus) + delete(rawMsg, key) case "serialNumber": err = unpopulate(val, "SerialNumber", &s.SerialNumber) delete(rawMsg, key) case "storageApplianceSkuId": err = unpopulate(val, "StorageApplianceSKUID", &s.StorageApplianceSKUID) delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -5679,6 +6479,37 @@ func (s *StorageProfile) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type StringKeyValuePair. +func (s StringKeyValuePair) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "key", s.Key) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StringKeyValuePair. +func (s *StringKeyValuePair) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &s.Key) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5937,6 +6768,37 @@ func (t *TrunkedNetworkProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ValidationThreshold. func (v ValidationThreshold) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6482,7 +7344,7 @@ func populateAny(m map[string]any, k string, v any) { } func unpopulate(data json.RawMessage, fn string, v any) error { - if data == nil { + if data == nil || string(data) == "null" { return nil } if err := json.Unmarshal(data, v); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/operations_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/operations_client.go index 44d09f3dca2d..9ba46edf9975 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/operations_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Get a list of all available resource provider operations. It contains a URL link to get the next set of // results. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -73,7 +73,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/operations_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/operations_client_example_test.go index a6308439873e..fbfe3ae1fa5d 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/operations_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Operations_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Operations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/options.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/options.go index 2d7984a319e2..f23ce14f8d6e 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/options.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/options.go @@ -288,6 +288,13 @@ type ClusterManagersClientUpdateOptions struct { // placeholder for future optional parameters } +// ClustersClientBeginContinueUpdateVersionOptions contains the optional parameters for the ClustersClient.BeginContinueUpdateVersion +// method. +type ClustersClientBeginContinueUpdateVersionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method. type ClustersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. @@ -309,6 +316,15 @@ type ClustersClientBeginDeployOptions struct { ResumeToken string } +// ClustersClientBeginScanRuntimeOptions contains the optional parameters for the ClustersClient.BeginScanRuntime method. +type ClustersClientBeginScanRuntimeOptions struct { + // The request body. + ClusterScanRuntimeParameters *ClusterScanRuntimeParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + // ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. type ClustersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. @@ -367,6 +383,39 @@ type ConsolesClientListByVirtualMachineOptions struct { // placeholder for future optional parameters } +// KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginCreateOrUpdate +// method. +type KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KubernetesClusterFeaturesClientBeginDeleteOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginDelete +// method. +type KubernetesClusterFeaturesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KubernetesClusterFeaturesClientBeginUpdateOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginUpdate +// method. +type KubernetesClusterFeaturesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KubernetesClusterFeaturesClientGetOptions contains the optional parameters for the KubernetesClusterFeaturesClient.Get +// method. +type KubernetesClusterFeaturesClientGetOptions struct { + // placeholder for future optional parameters +} + +// KubernetesClusterFeaturesClientListByKubernetesClusterOptions contains the optional parameters for the KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager +// method. +type KubernetesClusterFeaturesClientListByKubernetesClusterOptions struct { + // placeholder for future optional parameters +} + // KubernetesClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the KubernetesClustersClient.BeginCreateOrUpdate // method. type KubernetesClustersClientBeginCreateOrUpdateOptions struct { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/racks_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/racks_client.go index 766dc5d939ee..e19a5e3fe182 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/racks_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/racks_client.go @@ -47,7 +47,7 @@ func NewRacksClient(subscriptionID string, credential azcore.TokenCredential, op // be rejected as the life cycle of this resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - rackName - The name of the rack. // - rackParameters - The request body. @@ -75,7 +75,7 @@ func (client *RacksClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou // as the life cycle of this resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *RacksClient) createOrUpdate(ctx context.Context, resourceGroupName string, rackName string, rackParameters Rack, options *RacksClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RacksClient.BeginCreateOrUpdate" @@ -117,7 +117,7 @@ func (client *RacksClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, rackParameters); err != nil { @@ -130,7 +130,7 @@ func (client *RacksClient) createOrUpdateCreateRequest(ctx context.Context, reso // is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - rackName - The name of the rack. // - options - RacksClientBeginDeleteOptions contains the optional parameters for the RacksClient.BeginDelete method. @@ -156,7 +156,7 @@ func (client *RacksClient) BeginDelete(ctx context.Context, resourceGroupName st // is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *RacksClient) deleteOperation(ctx context.Context, resourceGroupName string, rackName string, options *RacksClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RacksClient.BeginDelete" @@ -198,7 +198,7 @@ func (client *RacksClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,7 +207,7 @@ func (client *RacksClient) deleteCreateRequest(ctx context.Context, resourceGrou // Get - Get properties of the provided rack. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - rackName - The name of the rack. // - options - RacksClientGetOptions contains the optional parameters for the RacksClient.Get method. @@ -253,7 +253,7 @@ func (client *RacksClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -270,7 +270,7 @@ func (client *RacksClient) getHandleResponse(resp *http.Response) (RacksClientGe // NewListByResourceGroupPager - Get a list of racks in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - RacksClientListByResourceGroupOptions contains the optional parameters for the RacksClient.NewListByResourceGroupPager // method. @@ -313,7 +313,7 @@ func (client *RacksClient) listByResourceGroupCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,7 +330,7 @@ func (client *RacksClient) listByResourceGroupHandleResponse(resp *http.Response // NewListBySubscriptionPager - Get a list of racks in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - RacksClientListBySubscriptionOptions contains the optional parameters for the RacksClient.NewListBySubscriptionPager // method. func (client *RacksClient) NewListBySubscriptionPager(options *RacksClientListBySubscriptionOptions) *runtime.Pager[RacksClientListBySubscriptionResponse] { @@ -368,7 +368,7 @@ func (client *RacksClient) listBySubscriptionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -387,7 +387,7 @@ func (client *RacksClient) listBySubscriptionHandleResponse(resp *http.Response) // can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - rackName - The name of the rack. // - rackUpdateParameters - The request body. @@ -414,7 +414,7 @@ func (client *RacksClient) BeginUpdate(ctx context.Context, resourceGroupName st // can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *RacksClient) update(ctx context.Context, resourceGroupName string, rackName string, rackUpdateParameters RackPatchParameters, options *RacksClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "RacksClient.BeginUpdate" @@ -456,7 +456,7 @@ func (client *RacksClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, rackUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/racks_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/racks_client_example_test.go index 742fba454513..7942fab805f8 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/racks_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/racks_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListBySubscription.json func ExampleRacksClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -71,14 +71,14 @@ func ExampleRacksClient_NewListBySubscriptionPager() { // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), - // RackSKUID: to.Ptr("RACK-TYPE-1"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListByResourceGroup.json func ExampleRacksClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -131,14 +131,14 @@ func ExampleRacksClient_NewListByResourceGroupPager() { // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), - // RackSKUID: to.Ptr("RACK-TYPE-1"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json func ExampleRacksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -185,12 +185,12 @@ func ExampleRacksClient_Get() { // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), - // RackSKUID: to.Ptr("RACK-TYPE-1"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Create.json func ExampleRacksClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -215,7 +215,7 @@ func ExampleRacksClient_BeginCreateOrUpdate() { AvailabilityZone: to.Ptr("1"), RackLocation: to.Ptr("Rack 28"), RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), - RackSKUID: to.Ptr("RACK-TYPE-1"), + RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), }, }, nil) if err != nil { @@ -257,12 +257,12 @@ func ExampleRacksClient_BeginCreateOrUpdate() { // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), - // RackSKUID: to.Ptr("RACK-TYPE-1"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Delete.json func ExampleRacksClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -283,7 +283,7 @@ func ExampleRacksClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Patch.json func ExampleRacksClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -343,7 +343,7 @@ func ExampleRacksClient_BeginUpdate() { // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), - // RackSKUID: to.Ptr("RACK-TYPE-1"), + // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // } } diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/rackskus_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/rackskus_client.go index 274e0f877aca..c396b8282b92 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/rackskus_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/rackskus_client.go @@ -46,7 +46,7 @@ func NewRackSKUsClient(subscriptionID string, credential azcore.TokenCredential, // Get - Get the properties of the provided rack SKU. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - rackSKUName - The name of the rack SKU. // - options - RackSKUsClientGetOptions contains the optional parameters for the RackSKUsClient.Get method. func (client *RackSKUsClient) Get(ctx context.Context, rackSKUName string, options *RackSKUsClientGetOptions) (RackSKUsClientGetResponse, error) { @@ -87,7 +87,7 @@ func (client *RackSKUsClient) getCreateRequest(ctx context.Context, rackSKUName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -104,7 +104,7 @@ func (client *RackSKUsClient) getHandleResponse(resp *http.Response) (RackSKUsCl // NewListBySubscriptionPager - Get a list of rack SKUs in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - RackSKUsClientListBySubscriptionOptions contains the optional parameters for the RackSKUsClient.NewListBySubscriptionPager // method. func (client *RackSKUsClient) NewListBySubscriptionPager(options *RackSKUsClientListBySubscriptionOptions) *runtime.Pager[RackSKUsClientListBySubscriptionResponse] { @@ -142,7 +142,7 @@ func (client *RackSKUsClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/rackskus_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/rackskus_client_example_test.go index fbf7d32ef2ca..ac81a1ac1cf1 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/rackskus_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/rackskus_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/RackSkus_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_ListBySubscription.json func ExampleRackSKUsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -134,7 +134,7 @@ func ExampleRackSKUsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/RackSkus_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json func ExampleRackSKUsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/response_types.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/responses.go similarity index 90% rename from sdk/resourcemanager/networkcloud/armnetworkcloud/response_types.go rename to sdk/resourcemanager/networkcloud/armnetworkcloud/responses.go index 9e69971b188e..eea5ad9bf50b 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/response_types.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/responses.go @@ -16,7 +16,8 @@ type AgentPoolsClientCreateOrUpdateResponse struct { // AgentPoolsClientDeleteResponse contains the response from method AgentPoolsClient.BeginDelete. type AgentPoolsClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // AgentPoolsClientGetResponse contains the response from method AgentPoolsClient.Get. @@ -45,7 +46,8 @@ type BareMetalMachineKeySetsClientCreateOrUpdateResponse struct { // BareMetalMachineKeySetsClientDeleteResponse contains the response from method BareMetalMachineKeySetsClient.BeginDelete. type BareMetalMachineKeySetsClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // BareMetalMachineKeySetsClientGetResponse contains the response from method BareMetalMachineKeySetsClient.Get. @@ -80,7 +82,8 @@ type BareMetalMachinesClientCreateOrUpdateResponse struct { // BareMetalMachinesClientDeleteResponse contains the response from method BareMetalMachinesClient.BeginDelete. type BareMetalMachinesClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // BareMetalMachinesClientGetResponse contains the response from method BareMetalMachinesClient.Get. @@ -169,7 +172,8 @@ type BmcKeySetsClientCreateOrUpdateResponse struct { // BmcKeySetsClientDeleteResponse contains the response from method BmcKeySetsClient.BeginDelete. type BmcKeySetsClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // BmcKeySetsClientGetResponse contains the response from method BmcKeySetsClient.Get. @@ -201,7 +205,8 @@ type CloudServicesNetworksClientCreateOrUpdateResponse struct { // CloudServicesNetworksClientDeleteResponse contains the response from method CloudServicesNetworksClient.BeginDelete. type CloudServicesNetworksClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // CloudServicesNetworksClientGetResponse contains the response from method CloudServicesNetworksClient.Get. @@ -242,7 +247,8 @@ type ClusterManagersClientCreateOrUpdateResponse struct { // ClusterManagersClientDeleteResponse contains the response from method ClusterManagersClient.BeginDelete. type ClusterManagersClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // ClusterManagersClientGetResponse contains the response from method ClusterManagersClient.Get. @@ -269,6 +275,12 @@ type ClusterManagersClientUpdateResponse struct { ClusterManager } +// ClustersClientContinueUpdateVersionResponse contains the response from method ClustersClient.BeginContinueUpdateVersion. +type ClustersClientContinueUpdateVersionResponse struct { + // The current status of an async operation. + OperationStatusResult +} + // ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate. type ClustersClientCreateOrUpdateResponse struct { // Cluster represents the on-premises Network Cloud cluster. @@ -277,7 +289,8 @@ type ClustersClientCreateOrUpdateResponse struct { // ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete. type ClustersClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // ClustersClientDeployResponse contains the response from method ClustersClient.BeginDeploy. @@ -304,6 +317,12 @@ type ClustersClientListBySubscriptionResponse struct { ClusterList } +// ClustersClientScanRuntimeResponse contains the response from method ClustersClient.BeginScanRuntime. +type ClustersClientScanRuntimeResponse struct { + // The current status of an async operation. + OperationStatusResult +} + // ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate. type ClustersClientUpdateResponse struct { // Cluster represents the on-premises Network Cloud cluster. @@ -324,7 +343,8 @@ type ConsolesClientCreateOrUpdateResponse struct { // ConsolesClientDeleteResponse contains the response from method ConsolesClient.BeginDelete. type ConsolesClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // ConsolesClientGetResponse contains the response from method ConsolesClient.Get. @@ -345,6 +365,36 @@ type ConsolesClientUpdateResponse struct { Console } +// KubernetesClusterFeaturesClientCreateOrUpdateResponse contains the response from method KubernetesClusterFeaturesClient.BeginCreateOrUpdate. +type KubernetesClusterFeaturesClientCreateOrUpdateResponse struct { + // KubernetesClusterFeature represents the feature of a Kubernetes cluster. + KubernetesClusterFeature +} + +// KubernetesClusterFeaturesClientDeleteResponse contains the response from method KubernetesClusterFeaturesClient.BeginDelete. +type KubernetesClusterFeaturesClientDeleteResponse struct { + // The current status of an async operation. + OperationStatusResult +} + +// KubernetesClusterFeaturesClientGetResponse contains the response from method KubernetesClusterFeaturesClient.Get. +type KubernetesClusterFeaturesClientGetResponse struct { + // KubernetesClusterFeature represents the feature of a Kubernetes cluster. + KubernetesClusterFeature +} + +// KubernetesClusterFeaturesClientListByKubernetesClusterResponse contains the response from method KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager. +type KubernetesClusterFeaturesClientListByKubernetesClusterResponse struct { + // KubernetesClusterFeatureList represents the list of Kubernetes cluster feature resources. + KubernetesClusterFeatureList +} + +// KubernetesClusterFeaturesClientUpdateResponse contains the response from method KubernetesClusterFeaturesClient.BeginUpdate. +type KubernetesClusterFeaturesClientUpdateResponse struct { + // KubernetesClusterFeature represents the feature of a Kubernetes cluster. + KubernetesClusterFeature +} + // KubernetesClustersClientCreateOrUpdateResponse contains the response from method KubernetesClustersClient.BeginCreateOrUpdate. type KubernetesClustersClientCreateOrUpdateResponse struct { // KubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. @@ -353,7 +403,8 @@ type KubernetesClustersClientCreateOrUpdateResponse struct { // KubernetesClustersClientDeleteResponse contains the response from method KubernetesClustersClient.BeginDelete. type KubernetesClustersClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // KubernetesClustersClientGetResponse contains the response from method KubernetesClustersClient.Get. @@ -394,7 +445,8 @@ type L2NetworksClientCreateOrUpdateResponse struct { // L2NetworksClientDeleteResponse contains the response from method L2NetworksClient.BeginDelete. type L2NetworksClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // L2NetworksClientGetResponse contains the response from method L2NetworksClient.Get. @@ -429,7 +481,8 @@ type L3NetworksClientCreateOrUpdateResponse struct { // L3NetworksClientDeleteResponse contains the response from method L3NetworksClient.BeginDelete. type L3NetworksClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // L3NetworksClientGetResponse contains the response from method L3NetworksClient.Get. @@ -464,7 +517,8 @@ type MetricsConfigurationsClientCreateOrUpdateResponse struct { // MetricsConfigurationsClientDeleteResponse contains the response from method MetricsConfigurationsClient.BeginDelete. type MetricsConfigurationsClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // MetricsConfigurationsClientGetResponse contains the response from method MetricsConfigurationsClient.Get. @@ -511,7 +565,8 @@ type RacksClientCreateOrUpdateResponse struct { // RacksClientDeleteResponse contains the response from method RacksClient.BeginDelete. type RacksClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // RacksClientGetResponse contains the response from method RacksClient.Get. @@ -546,7 +601,8 @@ type StorageAppliancesClientCreateOrUpdateResponse struct { // StorageAppliancesClientDeleteResponse contains the response from method StorageAppliancesClient.BeginDelete. type StorageAppliancesClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // StorageAppliancesClientDisableRemoteVendorManagementResponse contains the response from method StorageAppliancesClient.BeginDisableRemoteVendorManagement. @@ -593,7 +649,8 @@ type TrunkedNetworksClientCreateOrUpdateResponse struct { // TrunkedNetworksClientDeleteResponse contains the response from method TrunkedNetworksClient.BeginDelete. type TrunkedNetworksClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // TrunkedNetworksClientGetResponse contains the response from method TrunkedNetworksClient.Get. @@ -628,7 +685,8 @@ type VirtualMachinesClientCreateOrUpdateResponse struct { // VirtualMachinesClientDeleteResponse contains the response from method VirtualMachinesClient.BeginDelete. type VirtualMachinesClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get. @@ -687,7 +745,8 @@ type VolumesClientCreateOrUpdateResponse struct { // VolumesClientDeleteResponse contains the response from method VolumesClient.BeginDelete. type VolumesClientDeleteResponse struct { - // placeholder for future response values + // The current status of an async operation. + OperationStatusResult } // VolumesClientGetResponse contains the response from method VolumesClient.Get. diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/storageappliances_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/storageappliances_client.go index c31172790d7f..aa6af8c801fb 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/storageappliances_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/storageappliances_client.go @@ -47,7 +47,7 @@ func NewStorageAppliancesClient(subscriptionID string, credential azcore.TokenCr // requests will be rejected as the life cycle of this resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageApplianceName - The name of the storage appliance. // - storageApplianceParameters - The request body. @@ -75,7 +75,7 @@ func (client *StorageAppliancesClient) BeginCreateOrUpdate(ctx context.Context, // will be rejected as the life cycle of this resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *StorageAppliancesClient) createOrUpdate(ctx context.Context, resourceGroupName string, storageApplianceName string, storageApplianceParameters StorageAppliance, options *StorageAppliancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "StorageAppliancesClient.BeginCreateOrUpdate" @@ -117,7 +117,7 @@ func (client *StorageAppliancesClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, storageApplianceParameters); err != nil { @@ -130,7 +130,7 @@ func (client *StorageAppliancesClient) createOrUpdateCreateRequest(ctx context.C // of this resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageApplianceName - The name of the storage appliance. // - options - StorageAppliancesClientBeginDeleteOptions contains the optional parameters for the StorageAppliancesClient.BeginDelete @@ -157,7 +157,7 @@ func (client *StorageAppliancesClient) BeginDelete(ctx context.Context, resource // resource is managed by the system. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *StorageAppliancesClient) deleteOperation(ctx context.Context, resourceGroupName string, storageApplianceName string, options *StorageAppliancesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "StorageAppliancesClient.BeginDelete" @@ -199,7 +199,7 @@ func (client *StorageAppliancesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -208,7 +208,7 @@ func (client *StorageAppliancesClient) deleteCreateRequest(ctx context.Context, // BeginDisableRemoteVendorManagement - Disable remote vendor management of the provided storage appliance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageApplianceName - The name of the storage appliance. // - options - StorageAppliancesClientBeginDisableRemoteVendorManagementOptions contains the optional parameters for the StorageAppliancesClient.BeginDisableRemoteVendorManagement @@ -234,7 +234,7 @@ func (client *StorageAppliancesClient) BeginDisableRemoteVendorManagement(ctx co // DisableRemoteVendorManagement - Disable remote vendor management of the provided storage appliance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *StorageAppliancesClient) disableRemoteVendorManagement(ctx context.Context, resourceGroupName string, storageApplianceName string, options *StorageAppliancesClientBeginDisableRemoteVendorManagementOptions) (*http.Response, error) { var err error const operationName = "StorageAppliancesClient.BeginDisableRemoteVendorManagement" @@ -249,7 +249,7 @@ func (client *StorageAppliancesClient) disableRemoteVendorManagement(ctx context if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -276,7 +276,7 @@ func (client *StorageAppliancesClient) disableRemoteVendorManagementCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -285,7 +285,7 @@ func (client *StorageAppliancesClient) disableRemoteVendorManagementCreateReques // BeginEnableRemoteVendorManagement - Enable remote vendor management of the provided storage appliance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageApplianceName - The name of the storage appliance. // - options - StorageAppliancesClientBeginEnableRemoteVendorManagementOptions contains the optional parameters for the StorageAppliancesClient.BeginEnableRemoteVendorManagement @@ -311,7 +311,7 @@ func (client *StorageAppliancesClient) BeginEnableRemoteVendorManagement(ctx con // EnableRemoteVendorManagement - Enable remote vendor management of the provided storage appliance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *StorageAppliancesClient) enableRemoteVendorManagement(ctx context.Context, resourceGroupName string, storageApplianceName string, options *StorageAppliancesClientBeginEnableRemoteVendorManagementOptions) (*http.Response, error) { var err error const operationName = "StorageAppliancesClient.BeginEnableRemoteVendorManagement" @@ -326,7 +326,7 @@ func (client *StorageAppliancesClient) enableRemoteVendorManagement(ctx context. if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -353,7 +353,7 @@ func (client *StorageAppliancesClient) enableRemoteVendorManagementCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.StorageApplianceEnableRemoteVendorManagementParameters != nil { @@ -368,7 +368,7 @@ func (client *StorageAppliancesClient) enableRemoteVendorManagementCreateRequest // Get - Get properties of the provided storage appliance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageApplianceName - The name of the storage appliance. // - options - StorageAppliancesClientGetOptions contains the optional parameters for the StorageAppliancesClient.Get method. @@ -414,7 +414,7 @@ func (client *StorageAppliancesClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -431,7 +431,7 @@ func (client *StorageAppliancesClient) getHandleResponse(resp *http.Response) (S // NewListByResourceGroupPager - Get a list of storage appliances in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - StorageAppliancesClientListByResourceGroupOptions contains the optional parameters for the StorageAppliancesClient.NewListByResourceGroupPager // method. @@ -474,7 +474,7 @@ func (client *StorageAppliancesClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -491,7 +491,7 @@ func (client *StorageAppliancesClient) listByResourceGroupHandleResponse(resp *h // NewListBySubscriptionPager - Get a list of storage appliances in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - StorageAppliancesClientListBySubscriptionOptions contains the optional parameters for the StorageAppliancesClient.NewListBySubscriptionPager // method. func (client *StorageAppliancesClient) NewListBySubscriptionPager(options *StorageAppliancesClientListBySubscriptionOptions) *runtime.Pager[StorageAppliancesClientListBySubscriptionResponse] { @@ -529,7 +529,7 @@ func (client *StorageAppliancesClient) listBySubscriptionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -548,7 +548,7 @@ func (client *StorageAppliancesClient) listBySubscriptionHandleResponse(resp *ht // Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageApplianceName - The name of the storage appliance. // - storageApplianceUpdateParameters - The request body. @@ -576,7 +576,7 @@ func (client *StorageAppliancesClient) BeginUpdate(ctx context.Context, resource // and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *StorageAppliancesClient) update(ctx context.Context, resourceGroupName string, storageApplianceName string, storageApplianceUpdateParameters StorageAppliancePatchParameters, options *StorageAppliancesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "StorageAppliancesClient.BeginUpdate" @@ -618,7 +618,7 @@ func (client *StorageAppliancesClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, storageApplianceUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/storageappliances_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/storageappliances_client_example_test.go index 86e9f2136712..cc28ef751851 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/storageappliances_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/storageappliances_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListBySubscription.json func ExampleStorageAppliancesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -73,20 +73,35 @@ func ExampleStorageAppliancesClient_NewListBySubscriptionPager() { // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), + // Manufacturer: to.Ptr("Contoso Storage"), + // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Storage Appliance User"), + // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), + // Version: to.Ptr("9.9.9"), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListByResourceGroup.json func ExampleStorageAppliancesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -141,20 +156,35 @@ func ExampleStorageAppliancesClient_NewListByResourceGroupPager() { // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), + // Manufacturer: to.Ptr("Contoso Storage"), + // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Storage Appliance User"), + // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), + // Version: to.Ptr("9.9.9"), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json func ExampleStorageAppliancesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -203,18 +233,33 @@ func ExampleStorageAppliancesClient_Get() { // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), + // Manufacturer: to.Ptr("Contoso Storage"), + // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Storage Appliance User"), + // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), + // Version: to.Ptr("9.9.9"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Create.json func ExampleStorageAppliancesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -287,18 +332,33 @@ func ExampleStorageAppliancesClient_BeginCreateOrUpdate() { // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), + // Manufacturer: to.Ptr("Contoso Storage"), + // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Storage Appliance User"), + // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), + // Version: to.Ptr("9.9.9"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Delete.json func ExampleStorageAppliancesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -319,7 +379,7 @@ func ExampleStorageAppliancesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Patch.json func ExampleStorageAppliancesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -380,18 +440,33 @@ func ExampleStorageAppliancesClient_BeginUpdate() { // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), + // Manufacturer: to.Ptr("Contoso Storage"), + // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), + // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ + // { + // ExpirePeriodDays: to.Ptr[int64](90), + // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), + // RotationPeriodDays: to.Ptr[int64](60), + // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ + // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), + // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), + // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), + // }, + // SecretType: to.Ptr("Storage Appliance User"), + // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), + // Version: to.Ptr("9.9.9"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_DisableRemoteVendorManagement.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_DisableRemoteVendorManagement.json func ExampleStorageAppliancesClient_BeginDisableRemoteVendorManagement() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -412,7 +487,7 @@ func ExampleStorageAppliancesClient_BeginDisableRemoteVendorManagement() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_EnableRemoteVendorManagement.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_EnableRemoteVendorManagement.json func ExampleStorageAppliancesClient_BeginEnableRemoteVendorManagement() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/time_rfc3339.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/time_rfc3339.go index 1bbf18f2b148..5f4752fb9a01 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/time_rfc3339.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/time_rfc3339.go @@ -19,12 +19,16 @@ import ( ) // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) const ( - utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` - utcDateTime = "2006-01-02T15:04:05.999999999" - dateTimeJSON = `"` + time.RFC3339Nano + `"` + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` ) type dateTimeRFC3339 time.Time @@ -40,17 +44,33 @@ func (t dateTimeRFC3339) MarshalText() ([]byte, error) { } func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcDateTimeJSON - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT } return t.Parse(layout, string(data)) } func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { - layout := utcDateTime - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT } return t.Parse(layout, string(data)) } @@ -61,6 +81,10 @@ func (t *dateTimeRFC3339) Parse(layout, value string) error { return err } +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return @@ -74,7 +98,7 @@ func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { } func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { + if data == nil || string(data) == "null" { return nil } var aux dateTimeRFC3339 diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/trunkednetworks_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/trunkednetworks_client.go index ef93818b5b57..4b79ef05e2a5 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/trunkednetworks_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/trunkednetworks_client.go @@ -46,7 +46,7 @@ func NewTrunkedNetworksClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Create a new trunked network or update the properties of the existing trunked network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trunkedNetworkName - The name of the trunked network. // - trunkedNetworkParameters - The request body. @@ -73,7 +73,7 @@ func (client *TrunkedNetworksClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Create a new trunked network or update the properties of the existing trunked network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *TrunkedNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, trunkedNetworkName string, trunkedNetworkParameters TrunkedNetwork, options *TrunkedNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "TrunkedNetworksClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *TrunkedNetworksClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, trunkedNetworkParameters); err != nil { @@ -127,7 +127,7 @@ func (client *TrunkedNetworksClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Delete the provided trunked network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trunkedNetworkName - The name of the trunked network. // - options - TrunkedNetworksClientBeginDeleteOptions contains the optional parameters for the TrunkedNetworksClient.BeginDelete @@ -153,7 +153,7 @@ func (client *TrunkedNetworksClient) BeginDelete(ctx context.Context, resourceGr // Delete - Delete the provided trunked network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *TrunkedNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, trunkedNetworkName string, options *TrunkedNetworksClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "TrunkedNetworksClient.BeginDelete" @@ -195,7 +195,7 @@ func (client *TrunkedNetworksClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +204,7 @@ func (client *TrunkedNetworksClient) deleteCreateRequest(ctx context.Context, re // Get - Get properties of the provided trunked network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trunkedNetworkName - The name of the trunked network. // - options - TrunkedNetworksClientGetOptions contains the optional parameters for the TrunkedNetworksClient.Get method. @@ -250,7 +250,7 @@ func (client *TrunkedNetworksClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,7 +267,7 @@ func (client *TrunkedNetworksClient) getHandleResponse(resp *http.Response) (Tru // NewListByResourceGroupPager - Get a list of trunked networks in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - TrunkedNetworksClientListByResourceGroupOptions contains the optional parameters for the TrunkedNetworksClient.NewListByResourceGroupPager // method. @@ -310,7 +310,7 @@ func (client *TrunkedNetworksClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,7 +327,7 @@ func (client *TrunkedNetworksClient) listByResourceGroupHandleResponse(resp *htt // NewListBySubscriptionPager - Get a list of trunked networks in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - TrunkedNetworksClientListBySubscriptionOptions contains the optional parameters for the TrunkedNetworksClient.NewListBySubscriptionPager // method. func (client *TrunkedNetworksClient) NewListBySubscriptionPager(options *TrunkedNetworksClientListBySubscriptionOptions) *runtime.Pager[TrunkedNetworksClientListBySubscriptionResponse] { @@ -365,7 +365,7 @@ func (client *TrunkedNetworksClient) listBySubscriptionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -383,7 +383,7 @@ func (client *TrunkedNetworksClient) listBySubscriptionHandleResponse(resp *http // Update - Update tags associated with the provided trunked network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trunkedNetworkName - The name of the trunked network. // - trunkedNetworkUpdateParameters - The request body. @@ -430,7 +430,7 @@ func (client *TrunkedNetworksClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, trunkedNetworkUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/trunkednetworks_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/trunkednetworks_client_example_test.go index 797b4b9ea026..3ec64501fc22 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/trunkednetworks_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/trunkednetworks_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListBySubscription.json func ExampleTrunkedNetworksClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -83,7 +83,7 @@ func ExampleTrunkedNetworksClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListByResourceGroup.json func ExampleTrunkedNetworksClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -148,7 +148,7 @@ func ExampleTrunkedNetworksClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json func ExampleTrunkedNetworksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -205,7 +205,7 @@ func ExampleTrunkedNetworksClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Create.json func ExampleTrunkedNetworksClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -285,7 +285,7 @@ func ExampleTrunkedNetworksClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Delete.json func ExampleTrunkedNetworksClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -306,7 +306,7 @@ func ExampleTrunkedNetworksClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Patch.json func ExampleTrunkedNetworksClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/virtualmachines_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/virtualmachines_client.go index 195b3013d1ac..93b1f8d007a2 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/virtualmachines_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/virtualmachines_client.go @@ -46,7 +46,7 @@ func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Create a new virtual machine or update the properties of the existing virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - virtualMachineParameters - The request body. @@ -73,7 +73,7 @@ func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Create a new virtual machine or update the properties of the existing virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *VirtualMachinesClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, virtualMachineParameters VirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "VirtualMachinesClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *VirtualMachinesClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, virtualMachineParameters); err != nil { @@ -127,7 +127,7 @@ func (client *VirtualMachinesClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Delete the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - options - VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete @@ -153,7 +153,7 @@ func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGr // Delete - Delete the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *VirtualMachinesClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "VirtualMachinesClient.BeginDelete" @@ -195,7 +195,7 @@ func (client *VirtualMachinesClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +204,7 @@ func (client *VirtualMachinesClient) deleteCreateRequest(ctx context.Context, re // Get - Get properties of the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method. @@ -250,7 +250,7 @@ func (client *VirtualMachinesClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,7 +267,7 @@ func (client *VirtualMachinesClient) getHandleResponse(resp *http.Response) (Vir // NewListByResourceGroupPager - Get a list of virtual machines in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - VirtualMachinesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachinesClient.NewListByResourceGroupPager // method. @@ -310,7 +310,7 @@ func (client *VirtualMachinesClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,7 +327,7 @@ func (client *VirtualMachinesClient) listByResourceGroupHandleResponse(resp *htt // NewListBySubscriptionPager - Get a list of virtual machines in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - VirtualMachinesClientListBySubscriptionOptions contains the optional parameters for the VirtualMachinesClient.NewListBySubscriptionPager // method. func (client *VirtualMachinesClient) NewListBySubscriptionPager(options *VirtualMachinesClientListBySubscriptionOptions) *runtime.Pager[VirtualMachinesClientListBySubscriptionResponse] { @@ -365,7 +365,7 @@ func (client *VirtualMachinesClient) listBySubscriptionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -383,7 +383,7 @@ func (client *VirtualMachinesClient) listBySubscriptionHandleResponse(resp *http // BeginPowerOff - Power off the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - options - VirtualMachinesClientBeginPowerOffOptions contains the optional parameters for the VirtualMachinesClient.BeginPowerOff @@ -409,7 +409,7 @@ func (client *VirtualMachinesClient) BeginPowerOff(ctx context.Context, resource // PowerOff - Power off the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *VirtualMachinesClient) powerOff(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginPowerOffOptions) (*http.Response, error) { var err error const operationName = "VirtualMachinesClient.BeginPowerOff" @@ -424,7 +424,7 @@ func (client *VirtualMachinesClient) powerOff(ctx context.Context, resourceGroup if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -451,7 +451,7 @@ func (client *VirtualMachinesClient) powerOffCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.VirtualMachinePowerOffParameters != nil { @@ -466,7 +466,7 @@ func (client *VirtualMachinesClient) powerOffCreateRequest(ctx context.Context, // BeginReimage - Reimage the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - options - VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage @@ -492,7 +492,7 @@ func (client *VirtualMachinesClient) BeginReimage(ctx context.Context, resourceG // Reimage - Reimage the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *VirtualMachinesClient) reimage(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginReimageOptions) (*http.Response, error) { var err error const operationName = "VirtualMachinesClient.BeginReimage" @@ -507,7 +507,7 @@ func (client *VirtualMachinesClient) reimage(ctx context.Context, resourceGroupN if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -534,7 +534,7 @@ func (client *VirtualMachinesClient) reimageCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -543,7 +543,7 @@ func (client *VirtualMachinesClient) reimageCreateRequest(ctx context.Context, r // BeginRestart - Restart the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - options - VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart @@ -569,7 +569,7 @@ func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceG // Restart - Restart the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *VirtualMachinesClient) restart(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginRestartOptions) (*http.Response, error) { var err error const operationName = "VirtualMachinesClient.BeginRestart" @@ -584,7 +584,7 @@ func (client *VirtualMachinesClient) restart(ctx context.Context, resourceGroupN if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -611,7 +611,7 @@ func (client *VirtualMachinesClient) restartCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -620,7 +620,7 @@ func (client *VirtualMachinesClient) restartCreateRequest(ctx context.Context, r // BeginStart - Start the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart @@ -646,7 +646,7 @@ func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGro // Start - Start the provided virtual machine. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *VirtualMachinesClient) start(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "VirtualMachinesClient.BeginStart" @@ -661,7 +661,7 @@ func (client *VirtualMachinesClient) start(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } @@ -688,7 +688,7 @@ func (client *VirtualMachinesClient) startCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -698,7 +698,7 @@ func (client *VirtualMachinesClient) startCreateRequest(ctx context.Context, res // Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualMachineName - The name of the virtual machine. // - virtualMachineUpdateParameters - The request body. @@ -726,7 +726,7 @@ func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGr // Properties and tag updates can be done independently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *VirtualMachinesClient) update(ctx context.Context, resourceGroupName string, virtualMachineName string, virtualMachineUpdateParameters VirtualMachinePatchParameters, options *VirtualMachinesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "VirtualMachinesClient.BeginUpdate" @@ -768,7 +768,7 @@ func (client *VirtualMachinesClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, virtualMachineUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/virtualmachines_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/virtualmachines_client_example_test.go index 8e754680e20d..9967c46be309 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/virtualmachines_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/virtualmachines_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListBySubscription.json func ExampleVirtualMachinesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -125,7 +125,7 @@ func ExampleVirtualMachinesClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListByResourceGroup.json func ExampleVirtualMachinesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -232,7 +232,7 @@ func ExampleVirtualMachinesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json func ExampleVirtualMachinesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -331,7 +331,7 @@ func ExampleVirtualMachinesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Create.json func ExampleVirtualMachinesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -492,7 +492,7 @@ func ExampleVirtualMachinesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Delete.json func ExampleVirtualMachinesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -513,7 +513,7 @@ func ExampleVirtualMachinesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Patch.json func ExampleVirtualMachinesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -628,7 +628,7 @@ func ExampleVirtualMachinesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_PowerOff.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_PowerOff.json func ExampleVirtualMachinesClient_BeginPowerOff() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -652,7 +652,7 @@ func ExampleVirtualMachinesClient_BeginPowerOff() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Reimage.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Reimage.json func ExampleVirtualMachinesClient_BeginReimage() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -673,7 +673,7 @@ func ExampleVirtualMachinesClient_BeginReimage() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Restart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Restart.json func ExampleVirtualMachinesClient_BeginRestart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -694,7 +694,7 @@ func ExampleVirtualMachinesClient_BeginRestart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Start.json func ExampleVirtualMachinesClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/volumes_client.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/volumes_client.go index 8cff3f75e77b..21b733d06524 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/volumes_client.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/volumes_client.go @@ -46,7 +46,7 @@ func NewVolumesClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create a new volume or update the properties of the existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - volumeName - The name of the volume. // - volumeParameters - The request body. @@ -73,7 +73,7 @@ func (client *VolumesClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // CreateOrUpdate - Create a new volume or update the properties of the existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *VolumesClient) createOrUpdate(ctx context.Context, resourceGroupName string, volumeName string, volumeParameters Volume, options *VolumesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *VolumesClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, volumeParameters); err != nil { @@ -127,7 +127,7 @@ func (client *VolumesClient) createOrUpdateCreateRequest(ctx context.Context, re // BeginDelete - Delete the provided volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - volumeName - The name of the volume. // - options - VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method. @@ -152,7 +152,7 @@ func (client *VolumesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete the provided volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview func (client *VolumesClient) deleteOperation(ctx context.Context, resourceGroupName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "VolumesClient.BeginDelete" @@ -194,7 +194,7 @@ func (client *VolumesClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -203,7 +203,7 @@ func (client *VolumesClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Get properties of the provided volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - volumeName - The name of the volume. // - options - VolumesClientGetOptions contains the optional parameters for the VolumesClient.Get method. @@ -249,7 +249,7 @@ func (client *VolumesClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -266,7 +266,7 @@ func (client *VolumesClient) getHandleResponse(resp *http.Response) (VolumesClie // NewListByResourceGroupPager - Get a list of volumes in the provided resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - VolumesClientListByResourceGroupOptions contains the optional parameters for the VolumesClient.NewListByResourceGroupPager // method. @@ -309,7 +309,7 @@ func (client *VolumesClient) listByResourceGroupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -326,7 +326,7 @@ func (client *VolumesClient) listByResourceGroupHandleResponse(resp *http.Respon // NewListBySubscriptionPager - Get a list of volumes in the provided subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - options - VolumesClientListBySubscriptionOptions contains the optional parameters for the VolumesClient.NewListBySubscriptionPager // method. func (client *VolumesClient) NewListBySubscriptionPager(options *VolumesClientListBySubscriptionOptions) *runtime.Pager[VolumesClientListBySubscriptionResponse] { @@ -364,7 +364,7 @@ func (client *VolumesClient) listBySubscriptionCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -382,7 +382,7 @@ func (client *VolumesClient) listBySubscriptionHandleResponse(resp *http.Respons // Update - Update tags associated with the provided volume. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2024-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - volumeName - The name of the volume. // - volumeUpdateParameters - The request body. @@ -429,7 +429,7 @@ func (client *VolumesClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2024-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, volumeUpdateParameters); err != nil { diff --git a/sdk/resourcemanager/networkcloud/armnetworkcloud/volumes_client_example_test.go b/sdk/resourcemanager/networkcloud/armnetworkcloud/volumes_client_example_test.go index 3d27ea411acc..b6683ff8d8ea 100644 --- a/sdk/resourcemanager/networkcloud/armnetworkcloud/volumes_client_example_test.go +++ b/sdk/resourcemanager/networkcloud/armnetworkcloud/volumes_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListBySubscription.json func ExampleVolumesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -77,7 +77,7 @@ func ExampleVolumesClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListByResourceGroup.json func ExampleVolumesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -136,7 +136,7 @@ func ExampleVolumesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json func ExampleVolumesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -187,7 +187,7 @@ func ExampleVolumesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Create.json func ExampleVolumesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -255,7 +255,7 @@ func ExampleVolumesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Delete.json func ExampleVolumesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -276,7 +276,7 @@ func ExampleVolumesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/98d74b2db60e46ceb7e3b75755e51519cd500485/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Patch.json func ExampleVolumesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {