From e5b043dc332a39e43036421e7a4576f53de32932 Mon Sep 17 00:00:00 2001 From: Alancere <804873052@qq.com> Date: Tue, 18 Jun 2024 14:23:39 +0800 Subject: [PATCH 1/3] [Release] sdk/resourcemanager/cosmos/armcosmos/3.0.0-beta.5 generation from spec commit: 51cbd0e070cbbe29abbef09b29066f0bace78527 --- .../cosmos/armcosmos/CHANGELOG.md | 91 ++ .../cosmos/armcosmos/autorest.md | 8 +- .../armcosmos/cassandraclusters_client.go | 76 +- .../cassandraclusters_client_example_test.go | 30 +- .../armcosmos/cassandradatacenters_client.go | 28 +- ...assandradatacenters_client_example_test.go | 10 +- .../armcosmos/cassandraresources_client.go | 128 +- .../cassandraresources_client_example_test.go | 48 +- .../cosmos/armcosmos/client_factory.go | 14 +- .../cosmos/armcosmos/collection_client.go | 14 +- .../collection_client_example_test.go | 6 +- .../armcosmos/collectionpartition_client.go | 10 +- ...collectionpartition_client_example_test.go | 4 +- .../collectionpartitionregion_client.go | 6 +- ...tionpartitionregion_client_example_test.go | 2 +- .../armcosmos/collectionregion_client.go | 6 +- .../collectionregion_client_example_test.go | 2 +- .../cosmos/armcosmos/constants.go | 231 +++- .../cosmos/armcosmos/database_client.go | 14 +- .../armcosmos/database_client_example_test.go | 6 +- .../armcosmos/databaseaccountregion_client.go | 6 +- ...tabaseaccountregion_client_example_test.go | 2 +- .../armcosmos/databaseaccounts_client.go | 88 +- .../databaseaccounts_client_example_test.go | 81 +- .../armcosmos/datatransferjobs_client.go | 30 +- .../datatransferjobs_client_example_test.go | 14 +- .../armcosmos/fake/mongoclusters_server.go | 639 --------- ...ksecurityperimeterconfigurations_server.go | 212 +++ .../cosmos/armcosmos/fake/server_factory.go | 190 +-- .../cosmos/armcosmos/graphresources_client.go | 22 +- .../graphresources_client_example_test.go | 8 +- .../armcosmos/gremlinresources_client.go | 92 +- .../gremlinresources_client_example_test.go | 34 +- .../cosmos/armcosmos/interfaces.go | 10 + .../cosmos/armcosmos/locations_client.go | 10 +- .../locations_client_example_test.go | 4 +- .../cosmos/armcosmos/models.go | 513 ++++--- .../cosmos/armcosmos/models_serde.go | 1180 +++++++++-------- .../cosmos/armcosmos/mongoclusters_client.go | 898 ------------- .../mongoclusters_client_example_test.go | 784 ----------- .../armcosmos/mongodbresources_client.go | 168 +-- .../mongodbresources_client_example_test.go | 66 +- ...ksecurityperimeterconfigurations_client.go | 261 ++++ ...meterconfigurations_client_example_test.go | 158 +++ .../armcosmos/notebookworkspaces_client.go | 38 +- .../notebookworkspaces_client_example_test.go | 14 +- .../cosmos/armcosmos/operations_client.go | 4 +- .../operations_client_example_test.go | 2 +- .../cosmos/armcosmos/options.go | 92 +- .../armcosmos/partitionkeyrangeid_client.go | 6 +- ...partitionkeyrangeid_client_example_test.go | 2 +- .../partitionkeyrangeidregion_client.go | 6 +- ...ionkeyrangeidregion_client_example_test.go | 2 +- .../cosmos/armcosmos/percentile_client.go | 6 +- .../percentile_client_example_test.go | 2 +- .../percentilesourcetarget_client.go | 6 +- ...centilesourcetarget_client_example_test.go | 2 +- .../armcosmos/percentiletarget_client.go | 6 +- .../percentiletarget_client_example_test.go | 2 +- .../cosmos/armcosmos/polymorphic_helpers.go | 27 + .../privateendpointconnections_client.go | 22 +- ...endpointconnections_client_example_test.go | 8 +- .../armcosmos/privatelinkresources_client.go | 10 +- ...rivatelinkresources_client_example_test.go | 4 +- .../cosmos/armcosmos/responses.go | 87 +- .../restorabledatabaseaccounts_client.go | 14 +- ...bledatabaseaccounts_client_example_test.go | 6 +- .../restorablegremlindatabases_client.go | 6 +- ...blegremlindatabases_client_example_test.go | 2 +- .../restorablegremlingraphs_client.go | 6 +- ...orablegremlingraphs_client_example_test.go | 2 +- .../restorablegremlinresources_client.go | 6 +- ...blegremlinresources_client_example_test.go | 2 +- .../restorablemongodbcollections_client.go | 6 +- ...emongodbcollections_client_example_test.go | 2 +- .../restorablemongodbdatabases_client.go | 6 +- ...blemongodbdatabases_client_example_test.go | 2 +- .../restorablemongodbresources_client.go | 6 +- ...blemongodbresources_client_example_test.go | 2 +- .../restorablesqlcontainers_client.go | 6 +- ...orablesqlcontainers_client_example_test.go | 2 +- .../restorablesqldatabases_client.go | 6 +- ...torablesqldatabases_client_example_test.go | 2 +- .../restorablesqlresources_client.go | 6 +- ...torablesqlresources_client_example_test.go | 2 +- .../restorabletableresources_client.go | 6 +- ...rabletableresources_client_example_test.go | 2 +- .../armcosmos/restorabletables_client.go | 6 +- .../restorabletables_client_example_test.go | 2 +- .../cosmos/armcosmos/service_client.go | 22 +- .../armcosmos/service_client_example_test.go | 43 +- .../cosmos/armcosmos/sqlresources_client.go | 242 ++-- .../sqlresources_client_example_test.go | 98 +- .../cosmos/armcosmos/tableresources_client.go | 50 +- .../tableresources_client_example_test.go | 18 +- .../cosmos/armcosmos/throughputpool_client.go | 24 +- .../throughputpool_client_example_test.go | 8 +- .../armcosmos/throughputpoolaccount_client.go | 18 +- ...roughputpoolaccount_client_example_test.go | 6 +- .../throughputpoolaccounts_client.go | 6 +- ...oughputpoolaccounts_client_example_test.go | 2 +- .../armcosmos/throughputpools_client.go | 10 +- .../throughputpools_client_example_test.go | 2 +- 103 files changed, 2892 insertions(+), 4317 deletions(-) delete mode 100644 sdk/resourcemanager/cosmos/armcosmos/fake/mongoclusters_server.go create mode 100644 sdk/resourcemanager/cosmos/armcosmos/fake/networksecurityperimeterconfigurations_server.go delete mode 100644 sdk/resourcemanager/cosmos/armcosmos/mongoclusters_client.go delete mode 100644 sdk/resourcemanager/cosmos/armcosmos/mongoclusters_client_example_test.go create mode 100644 sdk/resourcemanager/cosmos/armcosmos/networksecurityperimeterconfigurations_client.go create mode 100644 sdk/resourcemanager/cosmos/armcosmos/networksecurityperimeterconfigurations_client_example_test.go diff --git a/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md b/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md index e0e790be095c..0328f88abe45 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md +++ b/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md @@ -1,5 +1,96 @@ # Release History +## 3.0.0-beta.5 (2024-06-21) +### Breaking Changes + +- Type of `DataTransferJobProperties.Error` has been changed from `*ErrorResponse` to `*ErrorResponseAutoGenerated` +- Type of `ServiceResourceCreateUpdateParameters.Properties` has been changed from `*ServiceResourceCreateUpdateProperties` to `ServiceResourceCreateUpdatePropertiesClassification` +- `CreateModePointInTimeRestore` from enum `CreateMode` has been removed +- Enum `CheckNameAvailabilityReason` has been removed +- Enum `MongoClusterStatus` has been removed +- Enum `NodeKind` has been removed +- Enum `ProvisioningState` has been removed +- Function `*ClientFactory.NewMongoClustersClient` has been removed +- Function `NewMongoClustersClient` has been removed +- Function `*MongoClustersClient.CheckNameAvailability` has been removed +- Function `*MongoClustersClient.BeginCreateOrUpdate` has been removed +- Function `*MongoClustersClient.BeginCreateOrUpdateFirewallRule` has been removed +- Function `*MongoClustersClient.BeginDelete` has been removed +- Function `*MongoClustersClient.BeginDeleteFirewallRule` has been removed +- Function `*MongoClustersClient.Get` has been removed +- Function `*MongoClustersClient.GetFirewallRule` has been removed +- Function `*MongoClustersClient.NewListByResourceGroupPager` has been removed +- Function `*MongoClustersClient.ListConnectionStrings` has been removed +- Function `*MongoClustersClient.NewListFirewallRulesPager` has been removed +- Function `*MongoClustersClient.NewListPager` has been removed +- Function `*MongoClustersClient.BeginUpdate` has been removed +- Struct `CheckNameAvailabilityRequest` has been removed +- Struct `CheckNameAvailabilityResponse` has been removed +- Struct `ConnectionString` has been removed +- Struct `FirewallRule` has been removed +- Struct `FirewallRuleListResult` has been removed +- Struct `FirewallRuleProperties` has been removed +- Struct `ListConnectionStringsResult` has been removed +- Struct `MongoCluster` has been removed +- Struct `MongoClusterListResult` has been removed +- Struct `MongoClusterProperties` has been removed +- Struct `MongoClusterRestoreParameters` has been removed +- Struct `MongoClusterUpdate` has been removed +- Struct `NodeGroupProperties` has been removed +- Struct `NodeGroupSpec` has been removed +- Struct `ProxyResourceAutoGenerated` has been removed +- Struct `ResourceAutoGenerated` has been removed +- Field `Code`, `Message` of struct `ErrorResponse` has been removed +- Field `Error` of struct `ErrorResponseAutoGenerated` has been removed + +### Features Added + +- New value `ServerVersionFive0`, `ServerVersionSix0` added to enum type `ServerVersion` +- New enum type `AccessRuleDirection` with values `AccessRuleDirectionInbound`, `AccessRuleDirectionOutbound` +- New enum type `CapacityMode` with values `CapacityModeNone`, `CapacityModeProvisioned`, `CapacityModeServerless` +- New enum type `CapacityModeTransitionStatus` with values `CapacityModeTransitionStatusCompleted`, `CapacityModeTransitionStatusFailed`, `CapacityModeTransitionStatusInProgress`, `CapacityModeTransitionStatusInitialized`, `CapacityModeTransitionStatusInvalid` +- New enum type `DedicatedGatewayType` with values `DedicatedGatewayTypeDistributedQuery`, `DedicatedGatewayTypeIntegratedCache` +- New enum type `IssueType` with values `IssueTypeConfigurationPropagationFailure`, `IssueTypeMissingIdentityConfiguration`, `IssueTypeMissingPerimeterConfiguration`, `IssueTypeUnknown` +- New enum type `NetworkSecurityPerimeterConfigurationProvisioningState` with values `NetworkSecurityPerimeterConfigurationProvisioningStateAccepted`, `NetworkSecurityPerimeterConfigurationProvisioningStateCanceled`, `NetworkSecurityPerimeterConfigurationProvisioningStateCreating`, `NetworkSecurityPerimeterConfigurationProvisioningStateDeleting`, `NetworkSecurityPerimeterConfigurationProvisioningStateFailed`, `NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded`, `NetworkSecurityPerimeterConfigurationProvisioningStateUpdating` +- New enum type `ResourceAssociationAccessMode` with values `ResourceAssociationAccessModeAudit`, `ResourceAssociationAccessModeEnforced`, `ResourceAssociationAccessModeLearning` +- New enum type `Severity` with values `SeverityError`, `SeverityWarning` +- New function `*ClientFactory.NewNetworkSecurityPerimeterConfigurationsClient() *NetworkSecurityPerimeterConfigurationsClient` +- New function `*DataTransferServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` +- New function `*GraphAPIComputeServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` +- New function `*MaterializedViewsBuilderServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` +- New function `*SQLDedicatedGatewayServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` +- New function `*ServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` +- New function `NewNetworkSecurityPerimeterConfigurationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationsClient, error)` +- New function `*NetworkSecurityPerimeterConfigurationsClient.Get(context.Context, string, string, string, *NetworkSecurityPerimeterConfigurationsClientGetOptions) (NetworkSecurityPerimeterConfigurationsClientGetResponse, error)` +- New function `*NetworkSecurityPerimeterConfigurationsClient.NewListPager(string, string, *NetworkSecurityPerimeterConfigurationsClientListOptions) *runtime.Pager[NetworkSecurityPerimeterConfigurationsClientListResponse]` +- New function `*NetworkSecurityPerimeterConfigurationsClient.BeginReconcile(context.Context, string, string, string, *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*runtime.Poller[NetworkSecurityPerimeterConfigurationsClientReconcileResponse], error)` +- New struct `AccessRule` +- New struct `AccessRuleProperties` +- New struct `AccessRulePropertiesSubscriptionsItem` +- New struct `CapacityModeChangeTransitionState` +- New struct `DataTransferServiceResourceCreateUpdateProperties` +- New struct `GraphAPIComputeServiceResourceCreateUpdateProperties` +- New struct `MaterializedViewsBuilderServiceResourceCreateUpdateProperties` +- New struct `NetworkSecurityPerimeter` +- New struct `NetworkSecurityPerimeterConfiguration` +- New struct `NetworkSecurityPerimeterConfigurationListResult` +- New struct `NetworkSecurityPerimeterConfigurationProperties` +- New struct `NetworkSecurityProfile` +- New struct `ProvisioningIssue` +- New struct `ProvisioningIssueProperties` +- New struct `ResourceAssociation` +- New struct `SQLDedicatedGatewayServiceResourceCreateUpdateProperties` +- New field `CapacityMode` in struct `DatabaseAccountCreateUpdateProperties` +- New field `CapacityMode`, `CapacityModeChangeTransitionState` in struct `DatabaseAccountGetProperties` +- New field `CapacityMode` in struct `DatabaseAccountUpdateProperties` +- New field `Error` in struct `ErrorResponse` +- New field `Code`, `Message` in struct `ErrorResponseAutoGenerated` +- New field `SystemData` in struct `PrivateEndpointConnection` +- New field `SystemData` in struct `ProxyResource` +- New field `SystemData` in struct `Resource` +- New field `DedicatedGatewayType` in struct `SQLDedicatedGatewayServiceResourceProperties` + + ## 3.0.0-beta.4 (2024-03-22) ### Breaking Changes diff --git a/sdk/resourcemanager/cosmos/armcosmos/autorest.md b/sdk/resourcemanager/cosmos/armcosmos/autorest.md index 1a3e25668b0f..2bd4c47cfe84 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/autorest.md +++ b/sdk/resourcemanager/cosmos/armcosmos/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 3.0.0-beta.4 -tag: package-preview-2024-02 +module-version: 3.0.0-beta.5 +tag: package-preview-2024-05 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client.go b/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client.go index da453e603691..dcaa2fae3f85 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client.go @@ -28,7 +28,7 @@ type CassandraClustersClient struct { } // NewCassandraClustersClient creates a new instance of CassandraClustersClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewCassandraClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CassandraClustersClient, error) { @@ -47,7 +47,7 @@ func NewCassandraClustersClient(subscriptionID string, credential azcore.TokenCr // To update only some properties, use PATCH. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - body - The properties specifying the desired state of the managed Cassandra cluster. @@ -74,7 +74,7 @@ func (client *CassandraClustersClient) BeginCreateUpdate(ctx context.Context, re // update only some properties, use PATCH. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraClustersClient) createUpdate(ctx context.Context, resourceGroupName string, clusterName string, body ClusterResource, options *CassandraClustersClientBeginCreateUpdateOptions) (*http.Response, error) { var err error const operationName = "CassandraClustersClient.BeginCreateUpdate" @@ -116,7 +116,7 @@ func (client *CassandraClustersClient) createUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -130,7 +130,7 @@ func (client *CassandraClustersClient) createUpdateCreateRequest(ctx context.Con // already deallocated cluster. Use Start to restart the cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientBeginDeallocateOptions contains the optional parameters for the CassandraClustersClient.BeginDeallocate @@ -157,7 +157,7 @@ func (client *CassandraClustersClient) BeginDeallocate(ctx context.Context, reso // already deallocated cluster. Use Start to restart the cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraClustersClient) deallocate(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientBeginDeallocateOptions) (*http.Response, error) { var err error const operationName = "CassandraClustersClient.BeginDeallocate" @@ -199,7 +199,7 @@ func (client *CassandraClustersClient) deallocateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.XMSForceDeallocate != nil { @@ -211,7 +211,7 @@ func (client *CassandraClustersClient) deallocateCreateRequest(ctx context.Conte // BeginDelete - Deletes a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientBeginDeleteOptions contains the optional parameters for the CassandraClustersClient.BeginDelete @@ -236,7 +236,7 @@ func (client *CassandraClustersClient) BeginDelete(ctx context.Context, resource // Delete - Deletes a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "CassandraClustersClient.BeginDelete" @@ -278,7 +278,7 @@ func (client *CassandraClustersClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -287,7 +287,7 @@ func (client *CassandraClustersClient) deleteCreateRequest(ctx context.Context, // Get - Get the properties of a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientGetOptions contains the optional parameters for the CassandraClustersClient.Get method. @@ -333,7 +333,7 @@ func (client *CassandraClustersClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -351,7 +351,7 @@ func (client *CassandraClustersClient) getHandleResponse(resp *http.Response) (C // GetBackup - Get the properties of an individual backup of this cluster that is available to restore. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - backupID - Id of a restorable backup of a Cassandra cluster. @@ -403,7 +403,7 @@ func (client *CassandraClustersClient) getBackupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -421,7 +421,7 @@ func (client *CassandraClustersClient) getBackupHandleResponse(resp *http.Respon // GetCommandAsync - Get details about a specified command that was run asynchronously. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - commandID - Managed Cassandra cluster command id. @@ -473,7 +473,7 @@ func (client *CassandraClustersClient) getCommandAsyncCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -491,7 +491,7 @@ func (client *CassandraClustersClient) getCommandAsyncHandleResponse(resp *http. // BeginInvokeCommand - Invoke a command like nodetool for cassandra maintenance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - body - Specification which command to run where @@ -517,7 +517,7 @@ func (client *CassandraClustersClient) BeginInvokeCommand(ctx context.Context, r // InvokeCommand - Invoke a command like nodetool for cassandra maintenance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraClustersClient) invokeCommand(ctx context.Context, resourceGroupName string, clusterName string, body CommandPostBody, options *CassandraClustersClientBeginInvokeCommandOptions) (*http.Response, error) { var err error const operationName = "CassandraClustersClient.BeginInvokeCommand" @@ -559,7 +559,7 @@ func (client *CassandraClustersClient) invokeCommandCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -571,7 +571,7 @@ func (client *CassandraClustersClient) invokeCommandCreateRequest(ctx context.Co // BeginInvokeCommandAsync - Invoke a command like nodetool for cassandra maintenance asynchronously // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - body - Specification which command to run where @@ -597,7 +597,7 @@ func (client *CassandraClustersClient) BeginInvokeCommandAsync(ctx context.Conte // InvokeCommandAsync - Invoke a command like nodetool for cassandra maintenance asynchronously // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraClustersClient) invokeCommandAsync(ctx context.Context, resourceGroupName string, clusterName string, body CommandPostBody, options *CassandraClustersClientBeginInvokeCommandAsyncOptions) (*http.Response, error) { var err error const operationName = "CassandraClustersClient.BeginInvokeCommandAsync" @@ -639,7 +639,7 @@ func (client *CassandraClustersClient) invokeCommandAsyncCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -650,7 +650,7 @@ func (client *CassandraClustersClient) invokeCommandAsyncCreateRequest(ctx conte // NewListBackupsPager - List the backups of this cluster that are available to restore. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientListBackupsOptions contains the optional parameters for the CassandraClustersClient.NewListBackupsPager @@ -699,7 +699,7 @@ func (client *CassandraClustersClient) listBackupsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -716,7 +716,7 @@ func (client *CassandraClustersClient) listBackupsHandleResponse(resp *http.Resp // NewListByResourceGroupPager - List all managed Cassandra clusters in this resource group. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - CassandraClustersClientListByResourceGroupOptions contains the optional parameters for the CassandraClustersClient.NewListByResourceGroupPager // method. @@ -760,7 +760,7 @@ func (client *CassandraClustersClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -777,7 +777,7 @@ func (client *CassandraClustersClient) listByResourceGroupHandleResponse(resp *h // NewListBySubscriptionPager - List all managed Cassandra clusters in this subscription. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - options - CassandraClustersClientListBySubscriptionOptions contains the optional parameters for the CassandraClustersClient.NewListBySubscriptionPager // method. func (client *CassandraClustersClient) NewListBySubscriptionPager(options *CassandraClustersClientListBySubscriptionOptions) *runtime.Pager[CassandraClustersClientListBySubscriptionResponse] { @@ -816,7 +816,7 @@ func (client *CassandraClustersClient) listBySubscriptionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -833,7 +833,7 @@ func (client *CassandraClustersClient) listBySubscriptionHandleResponse(resp *ht // NewListCommandPager - List all commands currently running on ring info // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientListCommandOptions contains the optional parameters for the CassandraClustersClient.NewListCommandPager @@ -882,7 +882,7 @@ func (client *CassandraClustersClient) listCommandCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -902,7 +902,7 @@ func (client *CassandraClustersClient) listCommandHandleResponse(resp *http.Resp // cluster. Use Deallocate to deallocate the cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientBeginStartOptions contains the optional parameters for the CassandraClustersClient.BeginStart @@ -929,7 +929,7 @@ func (client *CassandraClustersClient) BeginStart(ctx context.Context, resourceG // cluster. Use Deallocate to deallocate the cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraClustersClient) start(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "CassandraClustersClient.BeginStart" @@ -971,7 +971,7 @@ func (client *CassandraClustersClient) startCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -980,7 +980,7 @@ func (client *CassandraClustersClient) startCreateRequest(ctx context.Context, r // Status - Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraClustersClientStatusOptions contains the optional parameters for the CassandraClustersClient.Status @@ -1027,7 +1027,7 @@ func (client *CassandraClustersClient) statusCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1045,7 +1045,7 @@ func (client *CassandraClustersClient) statusHandleResponse(resp *http.Response) // BeginUpdate - Updates some of the properties of a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - body - Parameters to provide for specifying the managed Cassandra cluster. @@ -1071,7 +1071,7 @@ func (client *CassandraClustersClient) BeginUpdate(ctx context.Context, resource // Update - Updates some of the properties of a managed Cassandra cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraClustersClient) update(ctx context.Context, resourceGroupName string, clusterName string, body ClusterResource, options *CassandraClustersClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "CassandraClustersClient.BeginUpdate" @@ -1113,7 +1113,7 @@ func (client *CassandraClustersClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client_example_test.go index d4c2895d5614..d2475d9ed088 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandraclusters_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraClusterListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraClusterListBySubscription.json func ExampleCassandraClustersClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -103,7 +103,7 @@ func ExampleCassandraClustersClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json func ExampleCassandraClustersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -188,7 +188,7 @@ func ExampleCassandraClustersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraClusterGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraClusterGet.json func ExampleCassandraClustersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -265,7 +265,7 @@ func ExampleCassandraClustersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraClusterDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraClusterDelete.json func ExampleCassandraClustersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -286,7 +286,7 @@ func ExampleCassandraClustersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraClusterCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraClusterCreate.json func ExampleCassandraClustersClient_BeginCreateUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -396,7 +396,7 @@ func ExampleCassandraClustersClient_BeginCreateUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraClusterPatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraClusterPatch.json func ExampleCassandraClustersClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -499,7 +499,7 @@ func ExampleCassandraClustersClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraCommand.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraCommand.json func ExampleCassandraClustersClient_BeginInvokeCommand() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -526,7 +526,7 @@ func ExampleCassandraClustersClient_BeginInvokeCommand() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraCommandAsync.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraCommandAsync.json func ExampleCassandraClustersClient_BeginInvokeCommandAsync() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -567,7 +567,7 @@ func ExampleCassandraClustersClient_BeginInvokeCommandAsync() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraListCommand.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraListCommand.json func ExampleCassandraClustersClient_NewListCommandPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -606,7 +606,7 @@ func ExampleCassandraClustersClient_NewListCommandPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraCommandResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraCommandResult.json func ExampleCassandraClustersClient_GetCommandAsync() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -641,7 +641,7 @@ func ExampleCassandraClustersClient_GetCommandAsync() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraBackupsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraBackupsList.json func ExampleCassandraClustersClient_NewListBackupsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -695,7 +695,7 @@ func ExampleCassandraClustersClient_NewListBackupsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraBackup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraBackup.json func ExampleCassandraClustersClient_GetBackup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -722,7 +722,7 @@ func ExampleCassandraClustersClient_GetBackup() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraClusterDeallocate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraClusterDeallocate.json func ExampleCassandraClustersClient_BeginDeallocate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -743,7 +743,7 @@ func ExampleCassandraClustersClient_BeginDeallocate() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraClusterStart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraClusterStart.json func ExampleCassandraClustersClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -764,7 +764,7 @@ func ExampleCassandraClustersClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraStatus.json func ExampleCassandraClustersClient_Status() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client.go b/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client.go index efc6648a25a4..df1b7ff3583d 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client.go @@ -28,7 +28,7 @@ type CassandraDataCentersClient struct { } // NewCassandraDataCentersClient creates a new instance of CassandraDataCentersClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewCassandraDataCentersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CassandraDataCentersClient, error) { @@ -47,7 +47,7 @@ func NewCassandraDataCentersClient(subscriptionID string, credential azcore.Toke // only some properties, use PATCH. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - dataCenterName - Data center name in a managed Cassandra cluster. @@ -75,7 +75,7 @@ func (client *CassandraDataCentersClient) BeginCreateUpdate(ctx context.Context, // some properties, use PATCH. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraDataCentersClient) createUpdate(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, body DataCenterResource, options *CassandraDataCentersClientBeginCreateUpdateOptions) (*http.Response, error) { var err error const operationName = "CassandraDataCentersClient.BeginCreateUpdate" @@ -121,7 +121,7 @@ func (client *CassandraDataCentersClient) createUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -133,7 +133,7 @@ func (client *CassandraDataCentersClient) createUpdateCreateRequest(ctx context. // BeginDelete - Delete a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - dataCenterName - Data center name in a managed Cassandra cluster. @@ -159,7 +159,7 @@ func (client *CassandraDataCentersClient) BeginDelete(ctx context.Context, resou // Delete - Delete a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraDataCentersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, options *CassandraDataCentersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "CassandraDataCentersClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *CassandraDataCentersClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *CassandraDataCentersClient) deleteCreateRequest(ctx context.Contex // Get - Get the properties of a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - dataCenterName - Data center name in a managed Cassandra cluster. @@ -266,7 +266,7 @@ func (client *CassandraDataCentersClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *CassandraDataCentersClient) getHandleResponse(resp *http.Response) // NewListPager - List all data centers in a particular managed Cassandra cluster. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - options - CassandraDataCentersClientListOptions contains the optional parameters for the CassandraDataCentersClient.NewListPager @@ -332,7 +332,7 @@ func (client *CassandraDataCentersClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -350,7 +350,7 @@ func (client *CassandraDataCentersClient) listHandleResponse(resp *http.Response // BeginUpdate - Update some of the properties of a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - Managed Cassandra cluster name. // - dataCenterName - Data center name in a managed Cassandra cluster. @@ -377,7 +377,7 @@ func (client *CassandraDataCentersClient) BeginUpdate(ctx context.Context, resou // Update - Update some of the properties of a managed Cassandra data center. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraDataCentersClient) update(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, body DataCenterResource, options *CassandraDataCentersClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "CassandraDataCentersClient.BeginUpdate" @@ -423,7 +423,7 @@ func (client *CassandraDataCentersClient) updateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client_example_test.go index 809ddb2e8cba..b8c34e6ff338 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandradatacenters_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraDataCenterList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraDataCenterList.json func ExampleCassandraDataCentersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -68,7 +68,7 @@ func ExampleCassandraDataCentersClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraDataCenterGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraDataCenterGet.json func ExampleCassandraDataCentersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -110,7 +110,7 @@ func ExampleCassandraDataCentersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraDataCenterDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraDataCenterDelete.json func ExampleCassandraDataCentersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -131,7 +131,7 @@ func ExampleCassandraDataCentersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraDataCenterCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraDataCenterCreate.json func ExampleCassandraDataCentersClient_BeginCreateUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -183,7 +183,7 @@ func ExampleCassandraDataCentersClient_BeginCreateUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBManagedCassandraDataCenterPatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBManagedCassandraDataCenterPatch.json func ExampleCassandraDataCentersClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client.go index 3c31a020fd76..13f977774c12 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client.go @@ -28,7 +28,7 @@ type CassandraResourcesClient struct { } // NewCassandraResourcesClient creates a new instance of CassandraResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewCassandraResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CassandraResourcesClient, error) { @@ -46,7 +46,7 @@ func NewCassandraResourcesClient(subscriptionID string, credential azcore.TokenC // BeginCreateUpdateCassandraKeyspace - Create or update an Azure Cosmos DB Cassandra keyspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -73,7 +73,7 @@ func (client *CassandraResourcesClient) BeginCreateUpdateCassandraKeyspace(ctx c // CreateUpdateCassandraKeyspace - Create or update an Azure Cosmos DB Cassandra keyspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) createUpdateCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, createUpdateCassandraKeyspaceParameters CassandraKeyspaceCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginCreateUpdateCassandraKeyspace" @@ -119,7 +119,7 @@ func (client *CassandraResourcesClient) createUpdateCassandraKeyspaceCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateCassandraKeyspaceParameters); err != nil { @@ -131,7 +131,7 @@ func (client *CassandraResourcesClient) createUpdateCassandraKeyspaceCreateReque // BeginCreateUpdateCassandraTable - Create or update an Azure Cosmos DB Cassandra Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -159,7 +159,7 @@ func (client *CassandraResourcesClient) BeginCreateUpdateCassandraTable(ctx cont // CreateUpdateCassandraTable - Create or update an Azure Cosmos DB Cassandra Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) createUpdateCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, createUpdateCassandraTableParameters CassandraTableCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraTableOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginCreateUpdateCassandraTable" @@ -209,7 +209,7 @@ func (client *CassandraResourcesClient) createUpdateCassandraTableCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateCassandraTableParameters); err != nil { @@ -221,7 +221,7 @@ func (client *CassandraResourcesClient) createUpdateCassandraTableCreateRequest( // BeginCreateUpdateCassandraView - Create or update an Azure Cosmos DB Cassandra View // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -249,7 +249,7 @@ func (client *CassandraResourcesClient) BeginCreateUpdateCassandraView(ctx conte // CreateUpdateCassandraView - Create or update an Azure Cosmos DB Cassandra View // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) createUpdateCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, createUpdateCassandraViewParameters CassandraViewCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraViewOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginCreateUpdateCassandraView" @@ -299,7 +299,7 @@ func (client *CassandraResourcesClient) createUpdateCassandraViewCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateCassandraViewParameters); err != nil { @@ -311,7 +311,7 @@ func (client *CassandraResourcesClient) createUpdateCassandraViewCreateRequest(c // BeginDeleteCassandraKeyspace - Deletes an existing Azure Cosmos DB Cassandra keyspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -337,7 +337,7 @@ func (client *CassandraResourcesClient) BeginDeleteCassandraKeyspace(ctx context // DeleteCassandraKeyspace - Deletes an existing Azure Cosmos DB Cassandra keyspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) deleteCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginDeleteCassandraKeyspace" @@ -383,7 +383,7 @@ func (client *CassandraResourcesClient) deleteCassandraKeyspaceCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -391,7 +391,7 @@ func (client *CassandraResourcesClient) deleteCassandraKeyspaceCreateRequest(ctx // BeginDeleteCassandraTable - Deletes an existing Azure Cosmos DB Cassandra table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -418,7 +418,7 @@ func (client *CassandraResourcesClient) BeginDeleteCassandraTable(ctx context.Co // DeleteCassandraTable - Deletes an existing Azure Cosmos DB Cassandra table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) deleteCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientBeginDeleteCassandraTableOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginDeleteCassandraTable" @@ -468,7 +468,7 @@ func (client *CassandraResourcesClient) deleteCassandraTableCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -476,7 +476,7 @@ func (client *CassandraResourcesClient) deleteCassandraTableCreateRequest(ctx co // BeginDeleteCassandraView - Deletes an existing Azure Cosmos DB Cassandra view. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -503,7 +503,7 @@ func (client *CassandraResourcesClient) BeginDeleteCassandraView(ctx context.Con // DeleteCassandraView - Deletes an existing Azure Cosmos DB Cassandra view. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) deleteCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginDeleteCassandraViewOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginDeleteCassandraView" @@ -553,7 +553,7 @@ func (client *CassandraResourcesClient) deleteCassandraViewCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -562,7 +562,7 @@ func (client *CassandraResourcesClient) deleteCassandraViewCreateRequest(ctx con // name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -614,7 +614,7 @@ func (client *CassandraResourcesClient) getCassandraKeyspaceCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -633,7 +633,7 @@ func (client *CassandraResourcesClient) getCassandraKeyspaceHandleResponse(resp // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -685,7 +685,7 @@ func (client *CassandraResourcesClient) getCassandraKeyspaceThroughputCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -703,7 +703,7 @@ func (client *CassandraResourcesClient) getCassandraKeyspaceThroughputHandleResp // GetCassandraTable - Gets the Cassandra table under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -760,7 +760,7 @@ func (client *CassandraResourcesClient) getCassandraTableCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -779,7 +779,7 @@ func (client *CassandraResourcesClient) getCassandraTableHandleResponse(resp *ht // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -836,7 +836,7 @@ func (client *CassandraResourcesClient) getCassandraTableThroughputCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -854,7 +854,7 @@ func (client *CassandraResourcesClient) getCassandraTableThroughputHandleRespons // GetCassandraView - Gets the Cassandra view under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -911,7 +911,7 @@ func (client *CassandraResourcesClient) getCassandraViewCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -930,7 +930,7 @@ func (client *CassandraResourcesClient) getCassandraViewHandleResponse(resp *htt // with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -987,7 +987,7 @@ func (client *CassandraResourcesClient) getCassandraViewThroughputCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1004,7 +1004,7 @@ func (client *CassandraResourcesClient) getCassandraViewThroughputHandleResponse // NewListCassandraKeyspacesPager - Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - CassandraResourcesClientListCassandraKeyspacesOptions contains the optional parameters for the CassandraResourcesClient.NewListCassandraKeyspacesPager @@ -1053,7 +1053,7 @@ func (client *CassandraResourcesClient) listCassandraKeyspacesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1070,7 +1070,7 @@ func (client *CassandraResourcesClient) listCassandraKeyspacesHandleResponse(res // NewListCassandraTablesPager - Lists the Cassandra table under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1124,7 +1124,7 @@ func (client *CassandraResourcesClient) listCassandraTablesCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1141,7 +1141,7 @@ func (client *CassandraResourcesClient) listCassandraTablesHandleResponse(resp * // NewListCassandraViewsPager - Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1195,7 +1195,7 @@ func (client *CassandraResourcesClient) listCassandraViewsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1213,7 +1213,7 @@ func (client *CassandraResourcesClient) listCassandraViewsHandleResponse(resp *h // BeginMigrateCassandraKeyspaceToAutoscale - Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1239,7 +1239,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraKeyspaceToAutoscale // MigrateCassandraKeyspaceToAutoscale - Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) migrateCassandraKeyspaceToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginMigrateCassandraKeyspaceToAutoscale" @@ -1285,7 +1285,7 @@ func (client *CassandraResourcesClient) migrateCassandraKeyspaceToAutoscaleCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1295,7 +1295,7 @@ func (client *CassandraResourcesClient) migrateCassandraKeyspaceToAutoscaleCreat // throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1321,7 +1321,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraKeyspaceToManualThr // MigrateCassandraKeyspaceToManualThroughput - Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) migrateCassandraKeyspaceToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginMigrateCassandraKeyspaceToManualThroughput" @@ -1367,7 +1367,7 @@ func (client *CassandraResourcesClient) migrateCassandraKeyspaceToManualThroughp return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1376,7 +1376,7 @@ func (client *CassandraResourcesClient) migrateCassandraKeyspaceToManualThroughp // BeginMigrateCassandraTableToAutoscale - Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1403,7 +1403,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraTableToAutoscale(ct // MigrateCassandraTableToAutoscale - Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) migrateCassandraTableToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginMigrateCassandraTableToAutoscale" @@ -1453,7 +1453,7 @@ func (client *CassandraResourcesClient) migrateCassandraTableToAutoscaleCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1462,7 +1462,7 @@ func (client *CassandraResourcesClient) migrateCassandraTableToAutoscaleCreateRe // BeginMigrateCassandraTableToManualThroughput - Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1489,7 +1489,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraTableToManualThroug // MigrateCassandraTableToManualThroughput - Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) migrateCassandraTableToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginMigrateCassandraTableToManualThroughput" @@ -1539,7 +1539,7 @@ func (client *CassandraResourcesClient) migrateCassandraTableToManualThroughputC return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1548,7 +1548,7 @@ func (client *CassandraResourcesClient) migrateCassandraTableToManualThroughputC // BeginMigrateCassandraViewToAutoscale - Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1575,7 +1575,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraViewToAutoscale(ctx // MigrateCassandraViewToAutoscale - Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) migrateCassandraViewToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginMigrateCassandraViewToAutoscale" @@ -1625,7 +1625,7 @@ func (client *CassandraResourcesClient) migrateCassandraViewToAutoscaleCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1634,7 +1634,7 @@ func (client *CassandraResourcesClient) migrateCassandraViewToAutoscaleCreateReq // BeginMigrateCassandraViewToManualThroughput - Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1661,7 +1661,7 @@ func (client *CassandraResourcesClient) BeginMigrateCassandraViewToManualThrough // MigrateCassandraViewToManualThroughput - Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) migrateCassandraViewToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginMigrateCassandraViewToManualThroughput" @@ -1711,7 +1711,7 @@ func (client *CassandraResourcesClient) migrateCassandraViewToManualThroughputCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1720,7 +1720,7 @@ func (client *CassandraResourcesClient) migrateCassandraViewToManualThroughputCr // BeginUpdateCassandraKeyspaceThroughput - Update RUs per second of an Azure Cosmos DB Cassandra Keyspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1747,7 +1747,7 @@ func (client *CassandraResourcesClient) BeginUpdateCassandraKeyspaceThroughput(c // UpdateCassandraKeyspaceThroughput - Update RUs per second of an Azure Cosmos DB Cassandra Keyspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) updateCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginUpdateCassandraKeyspaceThroughput" @@ -1793,7 +1793,7 @@ func (client *CassandraResourcesClient) updateCassandraKeyspaceThroughputCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { @@ -1805,7 +1805,7 @@ func (client *CassandraResourcesClient) updateCassandraKeyspaceThroughputCreateR // BeginUpdateCassandraTableThroughput - Update RUs per second of an Azure Cosmos DB Cassandra table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1833,7 +1833,7 @@ func (client *CassandraResourcesClient) BeginUpdateCassandraTableThroughput(ctx // UpdateCassandraTableThroughput - Update RUs per second of an Azure Cosmos DB Cassandra table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) updateCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginUpdateCassandraTableThroughput" @@ -1883,7 +1883,7 @@ func (client *CassandraResourcesClient) updateCassandraTableThroughputCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { @@ -1895,7 +1895,7 @@ func (client *CassandraResourcesClient) updateCassandraTableThroughputCreateRequ // BeginUpdateCassandraViewThroughput - Update RUs per second of an Azure Cosmos DB Cassandra view // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyspaceName - Cosmos DB keyspace name. @@ -1923,7 +1923,7 @@ func (client *CassandraResourcesClient) BeginUpdateCassandraViewThroughput(ctx c // UpdateCassandraViewThroughput - Update RUs per second of an Azure Cosmos DB Cassandra view // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *CassandraResourcesClient) updateCassandraViewThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions) (*http.Response, error) { var err error const operationName = "CassandraResourcesClient.BeginUpdateCassandraViewThroughput" @@ -1973,7 +1973,7 @@ func (client *CassandraResourcesClient) updateCassandraViewThroughputCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client_example_test.go index dd8e90d5ce2f..62222caa69fe 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/cassandraresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraKeyspaceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraKeyspaceList.json func ExampleCassandraResourcesClient_NewListCassandraKeyspacesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,7 +59,7 @@ func ExampleCassandraResourcesClient_NewListCassandraKeyspacesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraKeyspaceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraKeyspaceGet.json func ExampleCassandraResourcesClient_GetCassandraKeyspace() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -95,7 +95,7 @@ func ExampleCassandraResourcesClient_GetCassandraKeyspace() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraKeyspaceCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraKeyspaceCreateUpdate.json func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraKeyspace() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -141,7 +141,7 @@ func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraKeyspace() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraKeyspaceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraKeyspaceDelete.json func ExampleCassandraResourcesClient_BeginDeleteCassandraKeyspace() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -162,7 +162,7 @@ func ExampleCassandraResourcesClient_BeginDeleteCassandraKeyspace() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraKeyspaceThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraKeyspaceThroughputGet.json func ExampleCassandraResourcesClient_GetCassandraKeyspaceThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -202,7 +202,7 @@ func ExampleCassandraResourcesClient_GetCassandraKeyspaceThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json func ExampleCassandraResourcesClient_BeginUpdateCassandraKeyspaceThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -252,7 +252,7 @@ func ExampleCassandraResourcesClient_BeginUpdateCassandraKeyspaceThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json func ExampleCassandraResourcesClient_BeginMigrateCassandraKeyspaceToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -291,7 +291,7 @@ func ExampleCassandraResourcesClient_BeginMigrateCassandraKeyspaceToAutoscale() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json func ExampleCassandraResourcesClient_BeginMigrateCassandraKeyspaceToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -327,7 +327,7 @@ func ExampleCassandraResourcesClient_BeginMigrateCassandraKeyspaceToManualThroug // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraTableList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraTableList.json func ExampleCassandraResourcesClient_NewListCassandraTablesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -386,7 +386,7 @@ func ExampleCassandraResourcesClient_NewListCassandraTablesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraTableGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraTableGet.json func ExampleCassandraResourcesClient_GetCassandraTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -440,7 +440,7 @@ func ExampleCassandraResourcesClient_GetCassandraTable() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraTableCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraTableCreateUpdate.json func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -522,7 +522,7 @@ func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraTable() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraTableDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraTableDelete.json func ExampleCassandraResourcesClient_BeginDeleteCassandraTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -543,7 +543,7 @@ func ExampleCassandraResourcesClient_BeginDeleteCassandraTable() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraTableThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraTableThroughputGet.json func ExampleCassandraResourcesClient_GetCassandraTableThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -583,7 +583,7 @@ func ExampleCassandraResourcesClient_GetCassandraTableThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraTableThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraTableThroughputUpdate.json func ExampleCassandraResourcesClient_BeginUpdateCassandraTableThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -630,7 +630,7 @@ func ExampleCassandraResourcesClient_BeginUpdateCassandraTableThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraTableMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraTableMigrateToAutoscale.json func ExampleCassandraResourcesClient_BeginMigrateCassandraTableToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -669,7 +669,7 @@ func ExampleCassandraResourcesClient_BeginMigrateCassandraTableToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraTableMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraTableMigrateToManualThroughput.json func ExampleCassandraResourcesClient_BeginMigrateCassandraTableToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -705,7 +705,7 @@ func ExampleCassandraResourcesClient_BeginMigrateCassandraTableToManualThroughpu // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraViewList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraViewList.json func ExampleCassandraResourcesClient_NewListCassandraViewsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -746,7 +746,7 @@ func ExampleCassandraResourcesClient_NewListCassandraViewsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraViewGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraViewGet.json func ExampleCassandraResourcesClient_GetCassandraView() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -779,7 +779,7 @@ func ExampleCassandraResourcesClient_GetCassandraView() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraViewCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraViewCreateUpdate.json func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraView() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -825,7 +825,7 @@ func ExampleCassandraResourcesClient_BeginCreateUpdateCassandraView() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraViewDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraViewDelete.json func ExampleCassandraResourcesClient_BeginDeleteCassandraView() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -846,7 +846,7 @@ func ExampleCassandraResourcesClient_BeginDeleteCassandraView() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraViewThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraViewThroughputGet.json func ExampleCassandraResourcesClient_GetCassandraViewThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -880,7 +880,7 @@ func ExampleCassandraResourcesClient_GetCassandraViewThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraViewThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraViewThroughputUpdate.json func ExampleCassandraResourcesClient_BeginUpdateCassandraViewThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -923,7 +923,7 @@ func ExampleCassandraResourcesClient_BeginUpdateCassandraViewThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.json func ExampleCassandraResourcesClient_BeginMigrateCassandraViewToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -959,7 +959,7 @@ func ExampleCassandraResourcesClient_BeginMigrateCassandraViewToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.json func ExampleCassandraResourcesClient_BeginMigrateCassandraViewToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/client_factory.go b/sdk/resourcemanager/cosmos/armcosmos/client_factory.go index c3a729661d59..596d08b789cb 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/client_factory.go +++ b/sdk/resourcemanager/cosmos/armcosmos/client_factory.go @@ -22,7 +22,7 @@ type ClientFactory struct { // NewClientFactory creates a new instance of ClientFactory with the specified values. // The parameter values will be propagated to any client created from this factory. -// - subscriptionID - The ID of the target subscription. +// - 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 NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { @@ -148,17 +148,17 @@ func (c *ClientFactory) NewLocationsClient() *LocationsClient { } } -// NewMongoClustersClient creates a new instance of MongoClustersClient. -func (c *ClientFactory) NewMongoClustersClient() *MongoClustersClient { - return &MongoClustersClient{ +// NewMongoDBResourcesClient creates a new instance of MongoDBResourcesClient. +func (c *ClientFactory) NewMongoDBResourcesClient() *MongoDBResourcesClient { + return &MongoDBResourcesClient{ subscriptionID: c.subscriptionID, internal: c.internal, } } -// NewMongoDBResourcesClient creates a new instance of MongoDBResourcesClient. -func (c *ClientFactory) NewMongoDBResourcesClient() *MongoDBResourcesClient { - return &MongoDBResourcesClient{ +// NewNetworkSecurityPerimeterConfigurationsClient creates a new instance of NetworkSecurityPerimeterConfigurationsClient. +func (c *ClientFactory) NewNetworkSecurityPerimeterConfigurationsClient() *NetworkSecurityPerimeterConfigurationsClient { + return &NetworkSecurityPerimeterConfigurationsClient{ subscriptionID: c.subscriptionID, internal: c.internal, } diff --git a/sdk/resourcemanager/cosmos/armcosmos/collection_client.go b/sdk/resourcemanager/cosmos/armcosmos/collection_client.go index e7a007d6730f..63e017e08fba 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collection_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collection_client.go @@ -28,7 +28,7 @@ type CollectionClient struct { } // NewCollectionClient creates a new instance of CollectionClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewCollectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CollectionClient, error) { @@ -45,7 +45,7 @@ func NewCollectionClient(subscriptionID string, credential azcore.TokenCredentia // NewListMetricDefinitionsPager - Retrieves metric definitions for the given collection. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -104,7 +104,7 @@ func (client *CollectionClient) listMetricDefinitionsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -121,7 +121,7 @@ func (client *CollectionClient) listMetricDefinitionsHandleResponse(resp *http.R // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account and collection. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -184,7 +184,7 @@ func (client *CollectionClient) listMetricsCreateRequest(ctx context.Context, re } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,7 +201,7 @@ func (client *CollectionClient) listMetricsHandleResponse(resp *http.Response) ( // NewListUsagesPager - Retrieves the usages (most recent storage data) for the given collection. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -263,7 +263,7 @@ func (client *CollectionClient) listUsagesCreateRequest(ctx context.Context, res if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/collection_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/collection_client_example_test.go index 1d8e2ebedbaf..a3ce16faa049 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collection_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collection_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCollectionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCollectionGetMetrics.json func ExampleCollectionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleCollectionClient_NewListMetricsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCollectionGetUsages.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCollectionGetUsages.json func ExampleCollectionClient_NewListUsagesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -119,7 +119,7 @@ func ExampleCollectionClient_NewListUsagesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCollectionGetMetricDefinitions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCollectionGetMetricDefinitions.json func ExampleCollectionClient_NewListMetricDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client.go b/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client.go index 13aeab1b1d2a..1ff3fac3bf6d 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client.go @@ -28,7 +28,7 @@ type CollectionPartitionClient struct { } // NewCollectionPartitionClient creates a new instance of CollectionPartitionClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewCollectionPartitionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CollectionPartitionClient, error) { @@ -45,7 +45,7 @@ func NewCollectionPartitionClient(subscriptionID string, credential azcore.Token // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given collection, split by partition. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -108,7 +108,7 @@ func (client *CollectionPartitionClient) listMetricsCreateRequest(ctx context.Co } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -125,7 +125,7 @@ func (client *CollectionPartitionClient) listMetricsHandleResponse(resp *http.Re // NewListUsagesPager - Retrieves the usages (most recent storage data) for the given collection, split by partition. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -187,7 +187,7 @@ func (client *CollectionPartitionClient) listUsagesCreateRequest(ctx context.Con if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client_example_test.go index 695d5845eea9..59c1041678bd 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionpartition_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCollectionPartitionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCollectionPartitionGetMetrics.json func ExampleCollectionPartitionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -83,7 +83,7 @@ func ExampleCollectionPartitionClient_NewListMetricsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCollectionPartitionGetUsages.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCollectionPartitionGetUsages.json func ExampleCollectionPartitionClient_NewListUsagesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client.go b/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client.go index 636fc6d44e79..6b27215c76e1 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client.go @@ -28,7 +28,7 @@ type CollectionPartitionRegionClient struct { } // NewCollectionPartitionRegionClient creates a new instance of CollectionPartitionRegionClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewCollectionPartitionRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CollectionPartitionRegionClient, error) { @@ -46,7 +46,7 @@ func NewCollectionPartitionRegionClient(subscriptionID string, credential azcore // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given collection and region, split by // partition. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - region - Cosmos DB region, with spaces between words and each word capitalized. @@ -114,7 +114,7 @@ func (client *CollectionPartitionRegionClient) listMetricsCreateRequest(ctx cont } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client_example_test.go index 3e797e9cd828..f4705444a0df 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionpartitionregion_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBCollectionPartitionRegionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBCollectionPartitionRegionGetMetrics.json func ExampleCollectionPartitionRegionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client.go b/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client.go index 2705c5d09bf8..76df952e9dda 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client.go @@ -28,7 +28,7 @@ type CollectionRegionClient struct { } // NewCollectionRegionClient creates a new instance of CollectionRegionClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewCollectionRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CollectionRegionClient, error) { @@ -46,7 +46,7 @@ func NewCollectionRegionClient(subscriptionID string, credential azcore.TokenCre // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account, collection and // region. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - region - Cosmos DB region, with spaces between words and each word capitalized. @@ -114,7 +114,7 @@ func (client *CollectionRegionClient) listMetricsCreateRequest(ctx context.Conte } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client_example_test.go index f6a62a6df40b..e1e411864cb9 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/collectionregion_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRegionCollectionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRegionCollectionGetMetrics.json func ExampleCollectionRegionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/constants.go b/sdk/resourcemanager/cosmos/armcosmos/constants.go index 6694dfcebe47..dac677ae00a5 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/constants.go +++ b/sdk/resourcemanager/cosmos/armcosmos/constants.go @@ -10,7 +10,7 @@ package armcosmos const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" - moduleVersion = "v3.0.0-beta.4" + moduleVersion = "v3.0.0-beta.5" ) // APIType - Enum to indicate the API type of the restorable database account. @@ -37,6 +37,24 @@ func PossibleAPITypeValues() []APIType { } } +// AccessRuleDirection - Direction of Access Rule +type AccessRuleDirection string + +const ( + // AccessRuleDirectionInbound - Applies to inbound network traffic to the secured resources. + AccessRuleDirectionInbound AccessRuleDirection = "Inbound" + // AccessRuleDirectionOutbound - Applies to outbound network traffic from the secured resources + AccessRuleDirectionOutbound AccessRuleDirection = "Outbound" +) + +// PossibleAccessRuleDirectionValues returns the possible values for the AccessRuleDirection const type. +func PossibleAccessRuleDirectionValues() []AccessRuleDirection { + return []AccessRuleDirection{ + AccessRuleDirectionInbound, + AccessRuleDirectionOutbound, + } +} + // AnalyticalStorageSchemaType - Describes the types of schema for analytical storage. type AnalyticalStorageSchemaType string @@ -181,19 +199,43 @@ func PossibleBackupStorageRedundancyValues() []BackupStorageRedundancy { } } -// CheckNameAvailabilityReason - The reason why the given name is not available. -type CheckNameAvailabilityReason string +// CapacityMode - Indicates the capacity mode of the account. +type CapacityMode string + +const ( + CapacityModeNone CapacityMode = "None" + CapacityModeProvisioned CapacityMode = "Provisioned" + CapacityModeServerless CapacityMode = "Serverless" +) + +// PossibleCapacityModeValues returns the possible values for the CapacityMode const type. +func PossibleCapacityModeValues() []CapacityMode { + return []CapacityMode{ + CapacityModeNone, + CapacityModeProvisioned, + CapacityModeServerless, + } +} + +// CapacityModeTransitionStatus - The transition status of capacity mode. +type CapacityModeTransitionStatus string const ( - CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" - CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" + CapacityModeTransitionStatusCompleted CapacityModeTransitionStatus = "Completed" + CapacityModeTransitionStatusFailed CapacityModeTransitionStatus = "Failed" + CapacityModeTransitionStatusInProgress CapacityModeTransitionStatus = "InProgress" + CapacityModeTransitionStatusInitialized CapacityModeTransitionStatus = "Initialized" + CapacityModeTransitionStatusInvalid CapacityModeTransitionStatus = "Invalid" ) -// PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type. -func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason { - return []CheckNameAvailabilityReason{ - CheckNameAvailabilityReasonAlreadyExists, - CheckNameAvailabilityReasonInvalid, +// PossibleCapacityModeTransitionStatusValues returns the possible values for the CapacityModeTransitionStatus const type. +func PossibleCapacityModeTransitionStatusValues() []CapacityModeTransitionStatus { + return []CapacityModeTransitionStatus{ + CapacityModeTransitionStatusCompleted, + CapacityModeTransitionStatusFailed, + CapacityModeTransitionStatusInProgress, + CapacityModeTransitionStatusInitialized, + CapacityModeTransitionStatusInvalid, } } @@ -327,16 +369,14 @@ func PossibleContinuousTierValues() []ContinuousTier { type CreateMode string const ( - CreateModeDefault CreateMode = "Default" - CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" - CreateModeRestore CreateMode = "Restore" + CreateModeDefault CreateMode = "Default" + CreateModeRestore CreateMode = "Restore" ) // PossibleCreateModeValues returns the possible values for the CreateMode const type. func PossibleCreateModeValues() []CreateMode { return []CreateMode{ CreateModeDefault, - CreateModePointInTimeRestore, CreateModeRestore, } } @@ -438,6 +478,22 @@ func PossibleDatabaseAccountKindValues() []DatabaseAccountKind { } } +// DedicatedGatewayType - DedicatedGatewayType for the service. +type DedicatedGatewayType string + +const ( + DedicatedGatewayTypeDistributedQuery DedicatedGatewayType = "DistributedQuery" + DedicatedGatewayTypeIntegratedCache DedicatedGatewayType = "IntegratedCache" +) + +// PossibleDedicatedGatewayTypeValues returns the possible values for the DedicatedGatewayType const type. +func PossibleDedicatedGatewayTypeValues() []DedicatedGatewayType { + return []DedicatedGatewayType{ + DedicatedGatewayTypeDistributedQuery, + DedicatedGatewayTypeIntegratedCache, + } +} + // DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account. type DefaultConsistencyLevel string @@ -530,6 +586,33 @@ func PossibleIndexingModeValues() []IndexingMode { } } +// IssueType - Type of issue +type IssueType string + +const ( + // IssueTypeConfigurationPropagationFailure - An error occurred while applying the network security perimeter (NSP) configuration. + IssueTypeConfigurationPropagationFailure IssueType = "ConfigurationPropagationFailure" + // IssueTypeMissingIdentityConfiguration - An managed identity hasn't been associated with the resource. The resource will + // still be able to validate inbound traffic from the network security perimeter (NSP) or matching inbound access rules, but + // it won't be able to perform outbound access as a member of the NSP. + IssueTypeMissingIdentityConfiguration IssueType = "MissingIdentityConfiguration" + // IssueTypeMissingPerimeterConfiguration - A network connectivity issue is happening on the resource which could be addressed + // either by adding new resources to the network security perimeter (NSP) or by modifying access rules. + IssueTypeMissingPerimeterConfiguration IssueType = "MissingPerimeterConfiguration" + // IssueTypeUnknown - Unknown issue type + IssueTypeUnknown IssueType = "Unknown" +) + +// PossibleIssueTypeValues returns the possible values for the IssueType const type. +func PossibleIssueTypeValues() []IssueType { + return []IssueType{ + IssueTypeConfigurationPropagationFailure, + IssueTypeMissingIdentityConfiguration, + IssueTypeMissingPerimeterConfiguration, + IssueTypeUnknown, + } +} + // KeyKind - The access key to regenerate. type KeyKind string @@ -629,32 +712,6 @@ func PossibleMinimalTLSVersionValues() []MinimalTLSVersion { } } -// MongoClusterStatus - The status of the resource at the time the operation was called. -type MongoClusterStatus string - -const ( - MongoClusterStatusDropping MongoClusterStatus = "Dropping" - MongoClusterStatusProvisioning MongoClusterStatus = "Provisioning" - MongoClusterStatusReady MongoClusterStatus = "Ready" - MongoClusterStatusStarting MongoClusterStatus = "Starting" - MongoClusterStatusStopped MongoClusterStatus = "Stopped" - MongoClusterStatusStopping MongoClusterStatus = "Stopping" - MongoClusterStatusUpdating MongoClusterStatus = "Updating" -) - -// PossibleMongoClusterStatusValues returns the possible values for the MongoClusterStatus const type. -func PossibleMongoClusterStatusValues() []MongoClusterStatus { - return []MongoClusterStatus{ - MongoClusterStatusDropping, - MongoClusterStatusProvisioning, - MongoClusterStatusReady, - MongoClusterStatusStarting, - MongoClusterStatusStopped, - MongoClusterStatusStopping, - MongoClusterStatusUpdating, - } -} - // MongoRoleDefinitionType - Indicates whether the Role Definition was built-in or user created. type MongoRoleDefinitionType string @@ -687,17 +744,30 @@ func PossibleNetworkACLBypassValues() []NetworkACLBypass { } } -// NodeKind - The kind of a node in the mongo cluster. -type NodeKind string +// NetworkSecurityPerimeterConfigurationProvisioningState - Provisioning state of a network security perimeter configuration +// that is being created or updated. +type NetworkSecurityPerimeterConfigurationProvisioningState string const ( - NodeKindShard NodeKind = "Shard" + NetworkSecurityPerimeterConfigurationProvisioningStateAccepted NetworkSecurityPerimeterConfigurationProvisioningState = "Accepted" + NetworkSecurityPerimeterConfigurationProvisioningStateCanceled NetworkSecurityPerimeterConfigurationProvisioningState = "Canceled" + NetworkSecurityPerimeterConfigurationProvisioningStateCreating NetworkSecurityPerimeterConfigurationProvisioningState = "Creating" + NetworkSecurityPerimeterConfigurationProvisioningStateDeleting NetworkSecurityPerimeterConfigurationProvisioningState = "Deleting" + NetworkSecurityPerimeterConfigurationProvisioningStateFailed NetworkSecurityPerimeterConfigurationProvisioningState = "Failed" + NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded NetworkSecurityPerimeterConfigurationProvisioningState = "Succeeded" + NetworkSecurityPerimeterConfigurationProvisioningStateUpdating NetworkSecurityPerimeterConfigurationProvisioningState = "Updating" ) -// PossibleNodeKindValues returns the possible values for the NodeKind const type. -func PossibleNodeKindValues() []NodeKind { - return []NodeKind{ - NodeKindShard, +// PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues returns the possible values for the NetworkSecurityPerimeterConfigurationProvisioningState const type. +func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues() []NetworkSecurityPerimeterConfigurationProvisioningState { + return []NetworkSecurityPerimeterConfigurationProvisioningState{ + NetworkSecurityPerimeterConfigurationProvisioningStateAccepted, + NetworkSecurityPerimeterConfigurationProvisioningStateCanceled, + NetworkSecurityPerimeterConfigurationProvisioningStateCreating, + NetworkSecurityPerimeterConfigurationProvisioningStateDeleting, + NetworkSecurityPerimeterConfigurationProvisioningStateFailed, + NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded, + NetworkSecurityPerimeterConfigurationProvisioningStateUpdating, } } @@ -817,30 +887,6 @@ func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { } } -// ProvisioningState - The provisioning state of the resource. -type ProvisioningState string - -const ( - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateDropping ProvisioningState = "Dropping" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateInProgress ProvisioningState = "InProgress" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateCanceled, - ProvisioningStateDropping, - ProvisioningStateFailed, - ProvisioningStateInProgress, - ProvisioningStateSucceeded, - ProvisioningStateUpdating, - } -} - // PublicNetworkAccess - Whether requests from Public Network are allowed type PublicNetworkAccess string @@ -859,6 +905,29 @@ func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { } } +// ResourceAssociationAccessMode - Access mode of the resource association +type ResourceAssociationAccessMode string + +const ( + // ResourceAssociationAccessModeAudit - Audit access mode - traffic to the resource that fails access checks is logged but + // not blocked + ResourceAssociationAccessModeAudit ResourceAssociationAccessMode = "Audit" + // ResourceAssociationAccessModeEnforced - Enforced access mode - traffic to the resource that failed access checks is blocked + ResourceAssociationAccessModeEnforced ResourceAssociationAccessMode = "Enforced" + // ResourceAssociationAccessModeLearning - Learning access mode - traffic to the resource is enabled for analysis but not + // blocked + ResourceAssociationAccessModeLearning ResourceAssociationAccessMode = "Learning" +) + +// PossibleResourceAssociationAccessModeValues returns the possible values for the ResourceAssociationAccessMode const type. +func PossibleResourceAssociationAccessModeValues() []ResourceAssociationAccessMode { + return []ResourceAssociationAccessMode{ + ResourceAssociationAccessModeAudit, + ResourceAssociationAccessModeEnforced, + ResourceAssociationAccessModeLearning, + } +} + // ResourceIdentityType - The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both // an implicitly created identity and a set of user assigned identities. The type 'None' will remove any // identities from the service. @@ -933,8 +1002,10 @@ func PossibleScheduledEventStrategyValues() []ScheduledEventStrategy { type ServerVersion string const ( + ServerVersionFive0 ServerVersion = "5.0" ServerVersionFour0 ServerVersion = "4.0" ServerVersionFour2 ServerVersion = "4.2" + ServerVersionSix0 ServerVersion = "6.0" ServerVersionThree2 ServerVersion = "3.2" ServerVersionThree6 ServerVersion = "3.6" ) @@ -942,8 +1013,10 @@ const ( // PossibleServerVersionValues returns the possible values for the ServerVersion const type. func PossibleServerVersionValues() []ServerVersion { return []ServerVersion{ + ServerVersionFive0, ServerVersionFour0, ServerVersionFour2, + ServerVersionSix0, ServerVersionThree2, ServerVersionThree6, } @@ -1011,6 +1084,22 @@ func PossibleServiceTypeValues() []ServiceType { } } +// Severity - Severity of the issue. +type Severity string + +const ( + SeverityError Severity = "Error" + SeverityWarning Severity = "Warning" +) + +// PossibleSeverityValues returns the possible values for the Severity const type. +func PossibleSeverityValues() []Severity { + return []Severity{ + SeverityError, + SeverityWarning, + } +} + // SpatialType - Indicates the spatial type of index. type SpatialType string diff --git a/sdk/resourcemanager/cosmos/armcosmos/database_client.go b/sdk/resourcemanager/cosmos/armcosmos/database_client.go index 5b5dbe76c567..fa80580be7ab 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/database_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/database_client.go @@ -28,7 +28,7 @@ type DatabaseClient struct { } // NewDatabaseClient creates a new instance of DatabaseClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewDatabaseClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseClient, error) { @@ -45,7 +45,7 @@ func NewDatabaseClient(subscriptionID string, credential azcore.TokenCredential, // NewListMetricDefinitionsPager - Retrieves metric definitions for the given database. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -99,7 +99,7 @@ func (client *DatabaseClient) listMetricDefinitionsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -116,7 +116,7 @@ func (client *DatabaseClient) listMetricDefinitionsHandleResponse(resp *http.Res // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account and database. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -174,7 +174,7 @@ func (client *DatabaseClient) listMetricsCreateRequest(ctx context.Context, reso } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -191,7 +191,7 @@ func (client *DatabaseClient) listMetricsHandleResponse(resp *http.Response) (Da // NewListUsagesPager - Retrieves the usages (most recent data) for the given database. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -247,7 +247,7 @@ func (client *DatabaseClient) listUsagesCreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/database_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/database_client_example_test.go index 305c52812319..2e8d53117418 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/database_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/database_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseGetMetrics.json func ExampleDatabaseClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleDatabaseClient_NewListMetricsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseGetUsages.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseGetUsages.json func ExampleDatabaseClient_NewListUsagesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -119,7 +119,7 @@ func ExampleDatabaseClient_NewListUsagesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseGetMetricDefinitions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseGetMetricDefinitions.json func ExampleDatabaseClient_NewListMetricDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client.go b/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client.go index 7e5319848e15..c63a523d8b17 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client.go @@ -28,7 +28,7 @@ type DatabaseAccountRegionClient struct { } // NewDatabaseAccountRegionClient creates a new instance of DatabaseAccountRegionClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewDatabaseAccountRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAccountRegionClient, error) { @@ -45,7 +45,7 @@ func NewDatabaseAccountRegionClient(subscriptionID string, credential azcore.Tok // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account and region. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - region - Cosmos DB region, with spaces between words and each word capitalized. @@ -103,7 +103,7 @@ func (client *DatabaseAccountRegionClient) listMetricsCreateRequest(ctx context. } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client_example_test.go index 6e8beecd99df..6c7b0ff03d72 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/databaseaccountregion_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountRegionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountRegionGetMetrics.json func ExampleDatabaseAccountRegionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client.go b/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client.go index 4d2df3d612f1..f604cd4c2f43 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client.go @@ -28,7 +28,7 @@ type DatabaseAccountsClient struct { } // NewDatabaseAccountsClient creates a new instance of DatabaseAccountsClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewDatabaseAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAccountsClient, error) { @@ -46,7 +46,7 @@ func NewDatabaseAccountsClient(subscriptionID string, credential azcore.TokenCre // CheckNameExists - Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase // letters, numbers, and the '-' character, and must be between 3 and 50 characters. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientCheckNameExistsOptions contains the optional parameters for the DatabaseAccountsClient.CheckNameExists // method. @@ -83,7 +83,7 @@ func (client *DatabaseAccountsClient) checkNameExistsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -92,7 +92,7 @@ func (client *DatabaseAccountsClient) checkNameExistsCreateRequest(ctx context.C // updates on an account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - createUpdateParameters - The parameters to provide for the current database account. @@ -119,7 +119,7 @@ func (client *DatabaseAccountsClient) BeginCreateOrUpdate(ctx context.Context, r // updates on an account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *DatabaseAccountsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters, options *DatabaseAccountsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "DatabaseAccountsClient.BeginCreateOrUpdate" @@ -161,7 +161,7 @@ func (client *DatabaseAccountsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateParameters); err != nil { @@ -173,7 +173,7 @@ func (client *DatabaseAccountsClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Deletes an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientBeginDeleteOptions contains the optional parameters for the DatabaseAccountsClient.BeginDelete @@ -198,7 +198,7 @@ func (client *DatabaseAccountsClient) BeginDelete(ctx context.Context, resourceG // Delete - Deletes an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *DatabaseAccountsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, options *DatabaseAccountsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "DatabaseAccountsClient.BeginDelete" @@ -240,7 +240,7 @@ func (client *DatabaseAccountsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -250,7 +250,7 @@ func (client *DatabaseAccountsClient) deleteCreateRequest(ctx context.Context, r // Failover priority values must be unique for each of the regions in which the database account exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - failoverParameters - The new failover policies for the database account. @@ -278,7 +278,7 @@ func (client *DatabaseAccountsClient) BeginFailoverPriorityChange(ctx context.Co // Failover priority values must be unique for each of the regions in which the database account exists. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *DatabaseAccountsClient) failoverPriorityChange(ctx context.Context, resourceGroupName string, accountName string, failoverParameters FailoverPolicies, options *DatabaseAccountsClientBeginFailoverPriorityChangeOptions) (*http.Response, error) { var err error const operationName = "DatabaseAccountsClient.BeginFailoverPriorityChange" @@ -320,7 +320,7 @@ func (client *DatabaseAccountsClient) failoverPriorityChangeCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() if err := runtime.MarshalAsJSON(req, failoverParameters); err != nil { return nil, err @@ -331,7 +331,7 @@ func (client *DatabaseAccountsClient) failoverPriorityChangeCreateRequest(ctx co // Get - Retrieves the properties of an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientGetOptions contains the optional parameters for the DatabaseAccountsClient.Get method. @@ -377,7 +377,7 @@ func (client *DatabaseAccountsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -395,7 +395,7 @@ func (client *DatabaseAccountsClient) getHandleResponse(resp *http.Response) (Da // GetReadOnlyKeys - Lists the read-only access keys for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientGetReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.GetReadOnlyKeys @@ -442,7 +442,7 @@ func (client *DatabaseAccountsClient) getReadOnlyKeysCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -459,7 +459,7 @@ func (client *DatabaseAccountsClient) getReadOnlyKeysHandleResponse(resp *http.R // NewListPager - Lists all the Azure Cosmos DB database accounts available under the subscription. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - options - DatabaseAccountsClientListOptions contains the optional parameters for the DatabaseAccountsClient.NewListPager // method. func (client *DatabaseAccountsClient) NewListPager(options *DatabaseAccountsClientListOptions) *runtime.Pager[DatabaseAccountsClientListResponse] { @@ -498,7 +498,7 @@ func (client *DatabaseAccountsClient) listCreateRequest(ctx context.Context, opt return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -515,7 +515,7 @@ func (client *DatabaseAccountsClient) listHandleResponse(resp *http.Response) (D // NewListByResourceGroupPager - Lists all the Azure Cosmos DB database accounts available under the given resource group. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - DatabaseAccountsClientListByResourceGroupOptions contains the optional parameters for the DatabaseAccountsClient.NewListByResourceGroupPager // method. @@ -559,7 +559,7 @@ func (client *DatabaseAccountsClient) listByResourceGroupCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -577,7 +577,7 @@ func (client *DatabaseAccountsClient) listByResourceGroupHandleResponse(resp *ht // ListConnectionStrings - Lists the connection strings for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListConnectionStringsOptions contains the optional parameters for the DatabaseAccountsClient.ListConnectionStrings @@ -624,7 +624,7 @@ func (client *DatabaseAccountsClient) listConnectionStringsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -642,7 +642,7 @@ func (client *DatabaseAccountsClient) listConnectionStringsHandleResponse(resp * // ListKeys - Lists the access keys for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListKeys @@ -689,7 +689,7 @@ func (client *DatabaseAccountsClient) listKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -706,7 +706,7 @@ func (client *DatabaseAccountsClient) listKeysHandleResponse(resp *http.Response // NewListMetricDefinitionsPager - Retrieves metric definitions for the given database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListMetricDefinitionsOptions contains the optional parameters for the DatabaseAccountsClient.NewListMetricDefinitionsPager @@ -755,7 +755,7 @@ func (client *DatabaseAccountsClient) listMetricDefinitionsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -772,7 +772,7 @@ func (client *DatabaseAccountsClient) listMetricDefinitionsHandleResponse(resp * // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are @@ -825,7 +825,7 @@ func (client *DatabaseAccountsClient) listMetricsCreateRequest(ctx context.Conte } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -843,7 +843,7 @@ func (client *DatabaseAccountsClient) listMetricsHandleResponse(resp *http.Respo // ListReadOnlyKeys - Lists the read-only access keys for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListReadOnlyKeys @@ -890,7 +890,7 @@ func (client *DatabaseAccountsClient) listReadOnlyKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -907,7 +907,7 @@ func (client *DatabaseAccountsClient) listReadOnlyKeysHandleResponse(resp *http. // NewListUsagesPager - Retrieves the usages (most recent data) for the given database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DatabaseAccountsClientListUsagesOptions contains the optional parameters for the DatabaseAccountsClient.NewListUsagesPager @@ -959,7 +959,7 @@ func (client *DatabaseAccountsClient) listUsagesCreateRequest(ctx context.Contex if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -977,7 +977,7 @@ func (client *DatabaseAccountsClient) listUsagesHandleResponse(resp *http.Respon // BeginOfflineRegion - Offline the specified region for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - regionParameterForOffline - Cosmos DB region to offline for the database account. @@ -1003,7 +1003,7 @@ func (client *DatabaseAccountsClient) BeginOfflineRegion(ctx context.Context, re // OfflineRegion - Offline the specified region for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *DatabaseAccountsClient) offlineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOffline RegionForOnlineOffline, options *DatabaseAccountsClientBeginOfflineRegionOptions) (*http.Response, error) { var err error const operationName = "DatabaseAccountsClient.BeginOfflineRegion" @@ -1045,7 +1045,7 @@ func (client *DatabaseAccountsClient) offlineRegionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, regionParameterForOffline); err != nil { @@ -1057,7 +1057,7 @@ func (client *DatabaseAccountsClient) offlineRegionCreateRequest(ctx context.Con // BeginOnlineRegion - Online the specified region for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - regionParameterForOnline - Cosmos DB region to online for the database account. @@ -1083,7 +1083,7 @@ func (client *DatabaseAccountsClient) BeginOnlineRegion(ctx context.Context, res // OnlineRegion - Online the specified region for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *DatabaseAccountsClient) onlineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOnline RegionForOnlineOffline, options *DatabaseAccountsClientBeginOnlineRegionOptions) (*http.Response, error) { var err error const operationName = "DatabaseAccountsClient.BeginOnlineRegion" @@ -1125,7 +1125,7 @@ func (client *DatabaseAccountsClient) onlineRegionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, regionParameterForOnline); err != nil { @@ -1137,7 +1137,7 @@ func (client *DatabaseAccountsClient) onlineRegionCreateRequest(ctx context.Cont // BeginRegenerateKey - Regenerates an access key for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - keyToRegenerate - The name of the key to regenerate. @@ -1163,7 +1163,7 @@ func (client *DatabaseAccountsClient) BeginRegenerateKey(ctx context.Context, re // RegenerateKey - Regenerates an access key for the specified Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *DatabaseAccountsClient) regenerateKey(ctx context.Context, resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters, options *DatabaseAccountsClientBeginRegenerateKeyOptions) (*http.Response, error) { var err error const operationName = "DatabaseAccountsClient.BeginRegenerateKey" @@ -1205,7 +1205,7 @@ func (client *DatabaseAccountsClient) regenerateKeyCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() if err := runtime.MarshalAsJSON(req, keyToRegenerate); err != nil { return nil, err @@ -1216,7 +1216,7 @@ func (client *DatabaseAccountsClient) regenerateKeyCreateRequest(ctx context.Con // BeginUpdate - Updates the properties of an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - updateParameters - The parameters to provide for the current database account. @@ -1242,7 +1242,7 @@ func (client *DatabaseAccountsClient) BeginUpdate(ctx context.Context, resourceG // Update - Updates the properties of an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *DatabaseAccountsClient) update(ctx context.Context, resourceGroupName string, accountName string, updateParameters DatabaseAccountUpdateParameters, options *DatabaseAccountsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "DatabaseAccountsClient.BeginUpdate" @@ -1284,7 +1284,7 @@ func (client *DatabaseAccountsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateParameters); err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client_example_test.go index 06d73a49f701..d97fef862e9b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/databaseaccounts_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountGet.json func ExampleDatabaseAccountsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -76,6 +76,15 @@ func ExampleDatabaseAccountsClient_Get() { // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), // }, // }, + // CapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), + // CapacityModeChangeTransitionState: &armcosmos.CapacityModeChangeTransitionState{ + // CapacityModeLastSuccessfulTransitionEndTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:18.875Z"); return t}()), + // CapacityModeTransitionBeginTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:16.274Z"); return t}()), + // CapacityModeTransitionEndTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:18.875Z"); return t}()), + // CapacityModeTransitionStatus: to.Ptr(armcosmos.CapacityModeTransitionStatusCompleted), + // CurrentCapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), + // PreviousCapacityMode: to.Ptr(armcosmos.CapacityModeServerless), + // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), @@ -171,7 +180,7 @@ func ExampleDatabaseAccountsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountPatch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountPatch.json func ExampleDatabaseAccountsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -205,6 +214,7 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { Capacity: &armcosmos.Capacity{ TotalThroughputLimit: to.Ptr[int32](2000), }, + CapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), MaxIntervalInSeconds: to.Ptr[int32](10), @@ -290,6 +300,15 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { // Capacity: &armcosmos.Capacity{ // TotalThroughputLimit: to.Ptr[int32](2000), // }, + // CapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), + // CapacityModeChangeTransitionState: &armcosmos.CapacityModeChangeTransitionState{ + // CapacityModeLastSuccessfulTransitionEndTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:18.875Z"); return t}()), + // CapacityModeTransitionBeginTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:16.274Z"); return t}()), + // CapacityModeTransitionEndTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:18.875Z"); return t}()), + // CapacityModeTransitionStatus: to.Ptr(armcosmos.CapacityModeTransitionStatusCompleted), + // CurrentCapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), + // PreviousCapacityMode: to.Ptr(armcosmos.CapacityModeServerless), + // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), // MaxIntervalInSeconds: to.Ptr[int32](10), @@ -395,7 +414,7 @@ func ExampleDatabaseAccountsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountCreateMax.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountCreateMax.json func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCreateMax() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -434,6 +453,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr Capacity: &armcosmos.Capacity{ TotalThroughputLimit: to.Ptr[int32](2000), }, + CapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), MaxIntervalInSeconds: to.Ptr[int32](10), @@ -532,6 +552,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // Capacity: &armcosmos.Capacity{ // TotalThroughputLimit: to.Ptr[int32](2000), // }, + // CapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), // MaxIntervalInSeconds: to.Ptr[int32](10), @@ -642,7 +663,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountCreateMin.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountCreateMin.json func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCreateMin() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -695,6 +716,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), // }, // }, + // CapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), @@ -767,7 +789,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbDatabaseAccountCr // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAccountCreateUpdateJson() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -859,6 +881,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc // Tier: to.Ptr(armcosmos.ContinuousTierContinuous30Days), // }, // }, + // CapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), @@ -929,7 +952,7 @@ func ExampleDatabaseAccountsClient_BeginCreateOrUpdate_cosmosDbRestoreDatabaseAc // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountDelete.json func ExampleDatabaseAccountsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -950,7 +973,7 @@ func ExampleDatabaseAccountsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json func ExampleDatabaseAccountsClient_BeginFailoverPriorityChange() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -981,7 +1004,7 @@ func ExampleDatabaseAccountsClient_BeginFailoverPriorityChange() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountList.json func ExampleDatabaseAccountsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1038,6 +1061,15 @@ func ExampleDatabaseAccountsClient_NewListPager() { // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), // }, // }, + // CapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), + // CapacityModeChangeTransitionState: &armcosmos.CapacityModeChangeTransitionState{ + // CapacityModeLastSuccessfulTransitionEndTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:18.875Z"); return t}()), + // CapacityModeTransitionBeginTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:16.274Z"); return t}()), + // CapacityModeTransitionEndTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:18.875Z"); return t}()), + // CapacityModeTransitionStatus: to.Ptr(armcosmos.CapacityModeTransitionStatusCompleted), + // CurrentCapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), + // PreviousCapacityMode: to.Ptr(armcosmos.CapacityModeServerless), + // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), @@ -1132,7 +1164,7 @@ func ExampleDatabaseAccountsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountListByResourceGroup.json func ExampleDatabaseAccountsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1184,6 +1216,15 @@ func ExampleDatabaseAccountsClient_NewListByResourceGroupPager() { // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), // }, // }, + // CapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), + // CapacityModeChangeTransitionState: &armcosmos.CapacityModeChangeTransitionState{ + // CapacityModeLastSuccessfulTransitionEndTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:18.875Z"); return t}()), + // CapacityModeTransitionBeginTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:16.274Z"); return t}()), + // CapacityModeTransitionEndTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-24T03:02:18.875Z"); return t}()), + // CapacityModeTransitionStatus: to.Ptr(armcosmos.CapacityModeTransitionStatusCompleted), + // CurrentCapacityMode: to.Ptr(armcosmos.CapacityModeProvisioned), + // PreviousCapacityMode: to.Ptr(armcosmos.CapacityModeServerless), + // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), @@ -1259,7 +1300,7 @@ func ExampleDatabaseAccountsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountListKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountListKeys.json func ExampleDatabaseAccountsClient_ListKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1285,7 +1326,7 @@ func ExampleDatabaseAccountsClient_ListKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountListConnectionStrings.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountListConnectionStrings.json func ExampleDatabaseAccountsClient_ListConnectionStrings_cosmosDbDatabaseAccountListConnectionStrings() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1314,7 +1355,7 @@ func ExampleDatabaseAccountsClient_ListConnectionStrings_cosmosDbDatabaseAccount // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json func ExampleDatabaseAccountsClient_ListConnectionStrings_cosmosDbDatabaseAccountListConnectionStringsMongo() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1341,7 +1382,7 @@ func ExampleDatabaseAccountsClient_ListConnectionStrings_cosmosDbDatabaseAccount // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountOfflineRegion.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountOfflineRegion.json func ExampleDatabaseAccountsClient_BeginOfflineRegion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1364,7 +1405,7 @@ func ExampleDatabaseAccountsClient_BeginOfflineRegion() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountOnlineRegion.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountOnlineRegion.json func ExampleDatabaseAccountsClient_BeginOnlineRegion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1387,7 +1428,7 @@ func ExampleDatabaseAccountsClient_BeginOnlineRegion() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json func ExampleDatabaseAccountsClient_GetReadOnlyKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1411,7 +1452,7 @@ func ExampleDatabaseAccountsClient_GetReadOnlyKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountRegenerateKey.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountRegenerateKey.json func ExampleDatabaseAccountsClient_BeginRegenerateKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1434,7 +1475,7 @@ func ExampleDatabaseAccountsClient_BeginRegenerateKey() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountCheckNameExists.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountCheckNameExists.json func ExampleDatabaseAccountsClient_CheckNameExists() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1451,7 +1492,7 @@ func ExampleDatabaseAccountsClient_CheckNameExists() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountGetMetrics.json func ExampleDatabaseAccountsClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1514,7 +1555,7 @@ func ExampleDatabaseAccountsClient_NewListMetricsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountGetUsages.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountGetUsages.json func ExampleDatabaseAccountsClient_NewListUsagesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1552,7 +1593,7 @@ func ExampleDatabaseAccountsClient_NewListUsagesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json func ExampleDatabaseAccountsClient_NewListMetricDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client.go b/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client.go index 421831c7a324..18abb1a497bf 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client.go @@ -28,7 +28,7 @@ type DataTransferJobsClient struct { } // NewDataTransferJobsClient creates a new instance of DataTransferJobsClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewDataTransferJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataTransferJobsClient, error) { @@ -46,7 +46,7 @@ func NewDataTransferJobsClient(subscriptionID string, credential azcore.TokenCre // Cancel - Cancels a Data Transfer Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - jobName - Name of the Data Transfer Job @@ -97,7 +97,7 @@ func (client *DataTransferJobsClient) cancelCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,7 +115,7 @@ func (client *DataTransferJobsClient) cancelHandleResponse(resp *http.Response) // Complete - Completes a Data Transfer Online Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - jobName - Name of the Data Transfer Job @@ -167,7 +167,7 @@ func (client *DataTransferJobsClient) completeCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -185,7 +185,7 @@ func (client *DataTransferJobsClient) completeHandleResponse(resp *http.Response // Create - Creates a Data Transfer Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - jobName - Name of the Data Transfer Job @@ -236,7 +236,7 @@ func (client *DataTransferJobsClient) createCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, jobCreateParameters); err != nil { @@ -257,7 +257,7 @@ func (client *DataTransferJobsClient) createHandleResponse(resp *http.Response) // Get - Get a Data Transfer Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - jobName - Name of the Data Transfer Job @@ -308,7 +308,7 @@ func (client *DataTransferJobsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -325,7 +325,7 @@ func (client *DataTransferJobsClient) getHandleResponse(resp *http.Response) (Da // NewListByDatabaseAccountPager - Get a list of Data Transfer jobs. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - DataTransferJobsClientListByDatabaseAccountOptions contains the optional parameters for the DataTransferJobsClient.NewListByDatabaseAccountPager @@ -373,7 +373,7 @@ func (client *DataTransferJobsClient) listByDatabaseAccountCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -391,7 +391,7 @@ func (client *DataTransferJobsClient) listByDatabaseAccountHandleResponse(resp * // Pause - Pause a Data Transfer Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - jobName - Name of the Data Transfer Job @@ -442,7 +442,7 @@ func (client *DataTransferJobsClient) pauseCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -460,7 +460,7 @@ func (client *DataTransferJobsClient) pauseHandleResponse(resp *http.Response) ( // Resume - Resumes a Data Transfer Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - jobName - Name of the Data Transfer Job @@ -511,7 +511,7 @@ func (client *DataTransferJobsClient) resumeCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client_example_test.go index 087474dde5d1..ae03dcb0a93b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/datatransferjobs_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobCreate.json func ExampleDataTransferJobsClient_Create() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -73,7 +73,7 @@ func ExampleDataTransferJobsClient_Create() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobGet.json func ExampleDataTransferJobsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -115,7 +115,7 @@ func ExampleDataTransferJobsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobPause.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobPause.json func ExampleDataTransferJobsClient_Pause() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -157,7 +157,7 @@ func ExampleDataTransferJobsClient_Pause() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobResume.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobResume.json func ExampleDataTransferJobsClient_Resume() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -199,7 +199,7 @@ func ExampleDataTransferJobsClient_Resume() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobCancel.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobCancel.json func ExampleDataTransferJobsClient_Cancel() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -241,7 +241,7 @@ func ExampleDataTransferJobsClient_Cancel() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobComplete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobComplete.json func ExampleDataTransferJobsClient_Complete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -283,7 +283,7 @@ func ExampleDataTransferJobsClient_Complete() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobFeed.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobFeed.json func ExampleDataTransferJobsClient_NewListByDatabaseAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/fake/mongoclusters_server.go b/sdk/resourcemanager/cosmos/armcosmos/fake/mongoclusters_server.go deleted file mode 100644 index a7b94eed4cc8..000000000000 --- a/sdk/resourcemanager/cosmos/armcosmos/fake/mongoclusters_server.go +++ /dev/null @@ -1,639 +0,0 @@ -//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/cosmos/armcosmos/v3" - "net/http" - "net/url" - "regexp" -) - -// MongoClustersServer is a fake server for instances of the armcosmos.MongoClustersClient type. -type MongoClustersServer struct { - // CheckNameAvailability is the fake for method MongoClustersClient.CheckNameAvailability - // HTTP status codes to indicate success: http.StatusOK - CheckNameAvailability func(ctx context.Context, location string, parameters armcosmos.CheckNameAvailabilityRequest, options *armcosmos.MongoClustersClientCheckNameAvailabilityOptions) (resp azfake.Responder[armcosmos.MongoClustersClientCheckNameAvailabilityResponse], errResp azfake.ErrorResponder) - - // BeginCreateOrUpdate is the fake for method MongoClustersClient.BeginCreateOrUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, mongoClusterName string, parameters armcosmos.MongoCluster, options *armcosmos.MongoClustersClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armcosmos.MongoClustersClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) - - // BeginCreateOrUpdateFirewallRule is the fake for method MongoClustersClient.BeginCreateOrUpdateFirewallRule - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - BeginCreateOrUpdateFirewallRule func(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, parameters armcosmos.FirewallRule, options *armcosmos.MongoClustersClientBeginCreateOrUpdateFirewallRuleOptions) (resp azfake.PollerResponder[armcosmos.MongoClustersClientCreateOrUpdateFirewallRuleResponse], errResp azfake.ErrorResponder) - - // BeginDelete is the fake for method MongoClustersClient.BeginDelete - // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent - BeginDelete func(ctx context.Context, resourceGroupName string, mongoClusterName string, options *armcosmos.MongoClustersClientBeginDeleteOptions) (resp azfake.PollerResponder[armcosmos.MongoClustersClientDeleteResponse], errResp azfake.ErrorResponder) - - // BeginDeleteFirewallRule is the fake for method MongoClustersClient.BeginDeleteFirewallRule - // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent - BeginDeleteFirewallRule func(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, options *armcosmos.MongoClustersClientBeginDeleteFirewallRuleOptions) (resp azfake.PollerResponder[armcosmos.MongoClustersClientDeleteFirewallRuleResponse], errResp azfake.ErrorResponder) - - // Get is the fake for method MongoClustersClient.Get - // HTTP status codes to indicate success: http.StatusOK - Get func(ctx context.Context, resourceGroupName string, mongoClusterName string, options *armcosmos.MongoClustersClientGetOptions) (resp azfake.Responder[armcosmos.MongoClustersClientGetResponse], errResp azfake.ErrorResponder) - - // GetFirewallRule is the fake for method MongoClustersClient.GetFirewallRule - // HTTP status codes to indicate success: http.StatusOK - GetFirewallRule func(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, options *armcosmos.MongoClustersClientGetFirewallRuleOptions) (resp azfake.Responder[armcosmos.MongoClustersClientGetFirewallRuleResponse], errResp azfake.ErrorResponder) - - // NewListPager is the fake for method MongoClustersClient.NewListPager - // HTTP status codes to indicate success: http.StatusOK - NewListPager func(options *armcosmos.MongoClustersClientListOptions) (resp azfake.PagerResponder[armcosmos.MongoClustersClientListResponse]) - - // NewListByResourceGroupPager is the fake for method MongoClustersClient.NewListByResourceGroupPager - // HTTP status codes to indicate success: http.StatusOK - NewListByResourceGroupPager func(resourceGroupName string, options *armcosmos.MongoClustersClientListByResourceGroupOptions) (resp azfake.PagerResponder[armcosmos.MongoClustersClientListByResourceGroupResponse]) - - // ListConnectionStrings is the fake for method MongoClustersClient.ListConnectionStrings - // HTTP status codes to indicate success: http.StatusOK - ListConnectionStrings func(ctx context.Context, resourceGroupName string, mongoClusterName string, options *armcosmos.MongoClustersClientListConnectionStringsOptions) (resp azfake.Responder[armcosmos.MongoClustersClientListConnectionStringsResponse], errResp azfake.ErrorResponder) - - // NewListFirewallRulesPager is the fake for method MongoClustersClient.NewListFirewallRulesPager - // HTTP status codes to indicate success: http.StatusOK - NewListFirewallRulesPager func(resourceGroupName string, mongoClusterName string, options *armcosmos.MongoClustersClientListFirewallRulesOptions) (resp azfake.PagerResponder[armcosmos.MongoClustersClientListFirewallRulesResponse]) - - // BeginUpdate is the fake for method MongoClustersClient.BeginUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted - BeginUpdate func(ctx context.Context, resourceGroupName string, mongoClusterName string, parameters armcosmos.MongoClusterUpdate, options *armcosmos.MongoClustersClientBeginUpdateOptions) (resp azfake.PollerResponder[armcosmos.MongoClustersClientUpdateResponse], errResp azfake.ErrorResponder) -} - -// NewMongoClustersServerTransport creates a new instance of MongoClustersServerTransport with the provided implementation. -// The returned MongoClustersServerTransport instance is connected to an instance of armcosmos.MongoClustersClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewMongoClustersServerTransport(srv *MongoClustersServer) *MongoClustersServerTransport { - return &MongoClustersServerTransport{ - srv: srv, - beginCreateOrUpdate: newTracker[azfake.PollerResponder[armcosmos.MongoClustersClientCreateOrUpdateResponse]](), - beginCreateOrUpdateFirewallRule: newTracker[azfake.PollerResponder[armcosmos.MongoClustersClientCreateOrUpdateFirewallRuleResponse]](), - beginDelete: newTracker[azfake.PollerResponder[armcosmos.MongoClustersClientDeleteResponse]](), - beginDeleteFirewallRule: newTracker[azfake.PollerResponder[armcosmos.MongoClustersClientDeleteFirewallRuleResponse]](), - newListPager: newTracker[azfake.PagerResponder[armcosmos.MongoClustersClientListResponse]](), - newListByResourceGroupPager: newTracker[azfake.PagerResponder[armcosmos.MongoClustersClientListByResourceGroupResponse]](), - newListFirewallRulesPager: newTracker[azfake.PagerResponder[armcosmos.MongoClustersClientListFirewallRulesResponse]](), - beginUpdate: newTracker[azfake.PollerResponder[armcosmos.MongoClustersClientUpdateResponse]](), - } -} - -// MongoClustersServerTransport connects instances of armcosmos.MongoClustersClient to instances of MongoClustersServer. -// Don't use this type directly, use NewMongoClustersServerTransport instead. -type MongoClustersServerTransport struct { - srv *MongoClustersServer - beginCreateOrUpdate *tracker[azfake.PollerResponder[armcosmos.MongoClustersClientCreateOrUpdateResponse]] - beginCreateOrUpdateFirewallRule *tracker[azfake.PollerResponder[armcosmos.MongoClustersClientCreateOrUpdateFirewallRuleResponse]] - beginDelete *tracker[azfake.PollerResponder[armcosmos.MongoClustersClientDeleteResponse]] - beginDeleteFirewallRule *tracker[azfake.PollerResponder[armcosmos.MongoClustersClientDeleteFirewallRuleResponse]] - newListPager *tracker[azfake.PagerResponder[armcosmos.MongoClustersClientListResponse]] - newListByResourceGroupPager *tracker[azfake.PagerResponder[armcosmos.MongoClustersClientListByResourceGroupResponse]] - newListFirewallRulesPager *tracker[azfake.PagerResponder[armcosmos.MongoClustersClientListFirewallRulesResponse]] - beginUpdate *tracker[azfake.PollerResponder[armcosmos.MongoClustersClientUpdateResponse]] -} - -// Do implements the policy.Transporter interface for MongoClustersServerTransport. -func (m *MongoClustersServerTransport) 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 "MongoClustersClient.CheckNameAvailability": - resp, err = m.dispatchCheckNameAvailability(req) - case "MongoClustersClient.BeginCreateOrUpdate": - resp, err = m.dispatchBeginCreateOrUpdate(req) - case "MongoClustersClient.BeginCreateOrUpdateFirewallRule": - resp, err = m.dispatchBeginCreateOrUpdateFirewallRule(req) - case "MongoClustersClient.BeginDelete": - resp, err = m.dispatchBeginDelete(req) - case "MongoClustersClient.BeginDeleteFirewallRule": - resp, err = m.dispatchBeginDeleteFirewallRule(req) - case "MongoClustersClient.Get": - resp, err = m.dispatchGet(req) - case "MongoClustersClient.GetFirewallRule": - resp, err = m.dispatchGetFirewallRule(req) - case "MongoClustersClient.NewListPager": - resp, err = m.dispatchNewListPager(req) - case "MongoClustersClient.NewListByResourceGroupPager": - resp, err = m.dispatchNewListByResourceGroupPager(req) - case "MongoClustersClient.ListConnectionStrings": - resp, err = m.dispatchListConnectionStrings(req) - case "MongoClustersClient.NewListFirewallRulesPager": - resp, err = m.dispatchNewListFirewallRulesPager(req) - case "MongoClustersClient.BeginUpdate": - resp, err = m.dispatchBeginUpdate(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } - - if err != nil { - return nil, err - } - - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchCheckNameAvailability(req *http.Request) (*http.Response, error) { - if m.srv.CheckNameAvailability == nil { - return nil, &nonRetriableError{errors.New("fake for method CheckNameAvailability not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkMongoClusterNameAvailability` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcosmos.CheckNameAvailabilityRequest](req) - if err != nil { - return nil, err - } - locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.CheckNameAvailability(req.Context(), locationParam, body, 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).CheckNameAvailabilityResponse, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { - if m.srv.BeginCreateOrUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} - } - beginCreateOrUpdate := m.beginCreateOrUpdate.get(req) - if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - 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[armcosmos.MongoCluster](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - mongoClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("mongoClusterName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, mongoClusterNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginCreateOrUpdate = &respr - m.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) { - m.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) { - m.beginCreateOrUpdate.remove(req) - } - - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchBeginCreateOrUpdateFirewallRule(req *http.Request) (*http.Response, error) { - if m.srv.BeginCreateOrUpdateFirewallRule == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateFirewallRule not implemented")} - } - beginCreateOrUpdateFirewallRule := m.beginCreateOrUpdateFirewallRule.get(req) - if beginCreateOrUpdateFirewallRule == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/firewallRules/(?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[armcosmos.FirewallRule](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - mongoClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("mongoClusterName")]) - if err != nil { - return nil, err - } - firewallRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallRuleName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.BeginCreateOrUpdateFirewallRule(req.Context(), resourceGroupNameParam, mongoClusterNameParam, firewallRuleNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginCreateOrUpdateFirewallRule = &respr - m.beginCreateOrUpdateFirewallRule.add(req, beginCreateOrUpdateFirewallRule) - } - - resp, err := server.PollerResponderNext(beginCreateOrUpdateFirewallRule, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { - m.beginCreateOrUpdateFirewallRule.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} - } - if !server.PollerResponderMore(beginCreateOrUpdateFirewallRule) { - m.beginCreateOrUpdateFirewallRule.remove(req) - } - - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { - if m.srv.BeginDelete == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} - } - beginDelete := m.beginDelete.get(req) - if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - 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 - } - mongoClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("mongoClusterName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.BeginDelete(req.Context(), resourceGroupNameParam, mongoClusterNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginDelete = &respr - m.beginDelete.add(req, beginDelete) - } - - resp, err := server.PollerResponderNext(beginDelete, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { - m.beginDelete.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} - } - if !server.PollerResponderMore(beginDelete) { - m.beginDelete.remove(req) - } - - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchBeginDeleteFirewallRule(req *http.Request) (*http.Response, error) { - if m.srv.BeginDeleteFirewallRule == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginDeleteFirewallRule not implemented")} - } - beginDeleteFirewallRule := m.beginDeleteFirewallRule.get(req) - if beginDeleteFirewallRule == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/firewallRules/(?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 - } - mongoClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("mongoClusterName")]) - if err != nil { - return nil, err - } - firewallRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallRuleName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.BeginDeleteFirewallRule(req.Context(), resourceGroupNameParam, mongoClusterNameParam, firewallRuleNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginDeleteFirewallRule = &respr - m.beginDeleteFirewallRule.add(req, beginDeleteFirewallRule) - } - - resp, err := server.PollerResponderNext(beginDeleteFirewallRule, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { - m.beginDeleteFirewallRule.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} - } - if !server.PollerResponderMore(beginDeleteFirewallRule) { - m.beginDeleteFirewallRule.remove(req) - } - - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { - if m.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\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - 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 - } - mongoClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("mongoClusterName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.Get(req.Context(), resourceGroupNameParam, mongoClusterNameParam, 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).MongoCluster, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchGetFirewallRule(req *http.Request) (*http.Response, error) { - if m.srv.GetFirewallRule == nil { - return nil, &nonRetriableError{errors.New("fake for method GetFirewallRule not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/firewallRules/(?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 - } - mongoClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("mongoClusterName")]) - if err != nil { - return nil, err - } - firewallRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallRuleName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.GetFirewallRule(req.Context(), resourceGroupNameParam, mongoClusterNameParam, firewallRuleNameParam, 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).FirewallRule, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { - if m.srv.NewListPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} - } - newListPager := m.newListPager.get(req) - if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resp := m.srv.NewListPager(nil) - newListPager = &resp - m.newListPager.add(req, newListPager) - server.PagerResponderInjectNextLinks(newListPager, req, func(page *armcosmos.MongoClustersClientListResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - m.newListPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListPager) { - m.newListPager.remove(req) - } - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { - if m.srv.NewListByResourceGroupPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} - } - newListByResourceGroupPager := m.newListByResourceGroupPager.get(req) - if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { - 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 - } - resp := m.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) - newListByResourceGroupPager = &resp - m.newListByResourceGroupPager.add(req, newListByResourceGroupPager) - server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armcosmos.MongoClustersClientListByResourceGroupResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - m.newListByResourceGroupPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListByResourceGroupPager) { - m.newListByResourceGroupPager.remove(req) - } - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchListConnectionStrings(req *http.Request) (*http.Response, error) { - if m.srv.ListConnectionStrings == nil { - return nil, &nonRetriableError{errors.New("fake for method ListConnectionStrings not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listConnectionStrings` - 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 - } - mongoClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("mongoClusterName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.ListConnectionStrings(req.Context(), resourceGroupNameParam, mongoClusterNameParam, 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).ListConnectionStringsResult, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchNewListFirewallRulesPager(req *http.Request) (*http.Response, error) { - if m.srv.NewListFirewallRulesPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListFirewallRulesPager not implemented")} - } - newListFirewallRulesPager := m.newListFirewallRulesPager.get(req) - if newListFirewallRulesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/firewallRules` - 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 - } - mongoClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("mongoClusterName")]) - if err != nil { - return nil, err - } - resp := m.srv.NewListFirewallRulesPager(resourceGroupNameParam, mongoClusterNameParam, nil) - newListFirewallRulesPager = &resp - m.newListFirewallRulesPager.add(req, newListFirewallRulesPager) - server.PagerResponderInjectNextLinks(newListFirewallRulesPager, req, func(page *armcosmos.MongoClustersClientListFirewallRulesResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListFirewallRulesPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - m.newListFirewallRulesPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListFirewallRulesPager) { - m.newListFirewallRulesPager.remove(req) - } - return resp, nil -} - -func (m *MongoClustersServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response, error) { - if m.srv.BeginUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginUpdate not implemented")} - } - beginUpdate := m.beginUpdate.get(req) - if beginUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/mongoClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - 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[armcosmos.MongoClusterUpdate](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - mongoClusterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("mongoClusterName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.BeginUpdate(req.Context(), resourceGroupNameParam, mongoClusterNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginUpdate = &respr - m.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) { - m.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) { - m.beginUpdate.remove(req) - } - - return resp, nil -} diff --git a/sdk/resourcemanager/cosmos/armcosmos/fake/networksecurityperimeterconfigurations_server.go b/sdk/resourcemanager/cosmos/armcosmos/fake/networksecurityperimeterconfigurations_server.go new file mode 100644 index 000000000000..8fbbaf026e30 --- /dev/null +++ b/sdk/resourcemanager/cosmos/armcosmos/fake/networksecurityperimeterconfigurations_server.go @@ -0,0 +1,212 @@ +//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/cosmos/armcosmos/v3" + "net/http" + "net/url" + "regexp" +) + +// NetworkSecurityPerimeterConfigurationsServer is a fake server for instances of the armcosmos.NetworkSecurityPerimeterConfigurationsClient type. +type NetworkSecurityPerimeterConfigurationsServer struct { + // Get is the fake for method NetworkSecurityPerimeterConfigurationsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *armcosmos.NetworkSecurityPerimeterConfigurationsClientGetOptions) (resp azfake.Responder[armcosmos.NetworkSecurityPerimeterConfigurationsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method NetworkSecurityPerimeterConfigurationsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, accountName string, options *armcosmos.NetworkSecurityPerimeterConfigurationsClientListOptions) (resp azfake.PagerResponder[armcosmos.NetworkSecurityPerimeterConfigurationsClientListResponse]) + + // BeginReconcile is the fake for method NetworkSecurityPerimeterConfigurationsClient.BeginReconcile + // HTTP status codes to indicate success: http.StatusAccepted + BeginReconcile func(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *armcosmos.NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (resp azfake.PollerResponder[armcosmos.NetworkSecurityPerimeterConfigurationsClientReconcileResponse], errResp azfake.ErrorResponder) +} + +// NewNetworkSecurityPerimeterConfigurationsServerTransport creates a new instance of NetworkSecurityPerimeterConfigurationsServerTransport with the provided implementation. +// The returned NetworkSecurityPerimeterConfigurationsServerTransport instance is connected to an instance of armcosmos.NetworkSecurityPerimeterConfigurationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewNetworkSecurityPerimeterConfigurationsServerTransport(srv *NetworkSecurityPerimeterConfigurationsServer) *NetworkSecurityPerimeterConfigurationsServerTransport { + return &NetworkSecurityPerimeterConfigurationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armcosmos.NetworkSecurityPerimeterConfigurationsClientListResponse]](), + beginReconcile: newTracker[azfake.PollerResponder[armcosmos.NetworkSecurityPerimeterConfigurationsClientReconcileResponse]](), + } +} + +// NetworkSecurityPerimeterConfigurationsServerTransport connects instances of armcosmos.NetworkSecurityPerimeterConfigurationsClient to instances of NetworkSecurityPerimeterConfigurationsServer. +// Don't use this type directly, use NewNetworkSecurityPerimeterConfigurationsServerTransport instead. +type NetworkSecurityPerimeterConfigurationsServerTransport struct { + srv *NetworkSecurityPerimeterConfigurationsServer + newListPager *tracker[azfake.PagerResponder[armcosmos.NetworkSecurityPerimeterConfigurationsClientListResponse]] + beginReconcile *tracker[azfake.PollerResponder[armcosmos.NetworkSecurityPerimeterConfigurationsClientReconcileResponse]] +} + +// Do implements the policy.Transporter interface for NetworkSecurityPerimeterConfigurationsServerTransport. +func (n *NetworkSecurityPerimeterConfigurationsServerTransport) 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 "NetworkSecurityPerimeterConfigurationsClient.Get": + resp, err = n.dispatchGet(req) + case "NetworkSecurityPerimeterConfigurationsClient.NewListPager": + resp, err = n.dispatchNewListPager(req) + case "NetworkSecurityPerimeterConfigurationsClient.BeginReconcile": + resp, err = n.dispatchBeginReconcile(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (n *NetworkSecurityPerimeterConfigurationsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if n.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\.DocumentDB/databaseAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkSecurityPerimeterConfigurations/(?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 + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + networkSecurityPerimeterConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityPerimeterConfigurationName")]) + if err != nil { + return nil, err + } + respr, errRespr := n.srv.Get(req.Context(), resourceGroupNameParam, accountNameParam, networkSecurityPerimeterConfigurationNameParam, 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).NetworkSecurityPerimeterConfiguration, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (n *NetworkSecurityPerimeterConfigurationsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if n.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := n.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/databaseAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkSecurityPerimeterConfigurations` + 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 + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + resp := n.srv.NewListPager(resourceGroupNameParam, accountNameParam, nil) + newListPager = &resp + n.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armcosmos.NetworkSecurityPerimeterConfigurationsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + n.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + n.newListPager.remove(req) + } + return resp, nil +} + +func (n *NetworkSecurityPerimeterConfigurationsServerTransport) dispatchBeginReconcile(req *http.Request) (*http.Response, error) { + if n.srv.BeginReconcile == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginReconcile not implemented")} + } + beginReconcile := n.beginReconcile.get(req) + if beginReconcile == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DocumentDB/databaseAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkSecurityPerimeterConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reconcile` + 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 + } + accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")]) + if err != nil { + return nil, err + } + networkSecurityPerimeterConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityPerimeterConfigurationName")]) + if err != nil { + return nil, err + } + respr, errRespr := n.srv.BeginReconcile(req.Context(), resourceGroupNameParam, accountNameParam, networkSecurityPerimeterConfigurationNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginReconcile = &respr + n.beginReconcile.add(req, beginReconcile) + } + + resp, err := server.PollerResponderNext(beginReconcile, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + n.beginReconcile.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginReconcile) { + n.beginReconcile.remove(req) + } + + return resp, nil +} diff --git a/sdk/resourcemanager/cosmos/armcosmos/fake/server_factory.go b/sdk/resourcemanager/cosmos/armcosmos/fake/server_factory.go index baecad5fac34..c3733f015a3f 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/fake/server_factory.go +++ b/sdk/resourcemanager/cosmos/armcosmos/fake/server_factory.go @@ -19,50 +19,50 @@ import ( // ServerFactory is a fake server for instances of the armcosmos.ClientFactory type. type ServerFactory struct { - CassandraClustersServer CassandraClustersServer - CassandraDataCentersServer CassandraDataCentersServer - CassandraResourcesServer CassandraResourcesServer - CollectionServer CollectionServer - CollectionPartitionServer CollectionPartitionServer - CollectionPartitionRegionServer CollectionPartitionRegionServer - CollectionRegionServer CollectionRegionServer - DataTransferJobsServer DataTransferJobsServer - DatabaseAccountRegionServer DatabaseAccountRegionServer - DatabaseAccountsServer DatabaseAccountsServer - DatabaseServer DatabaseServer - GraphResourcesServer GraphResourcesServer - GremlinResourcesServer GremlinResourcesServer - LocationsServer LocationsServer - MongoClustersServer MongoClustersServer - MongoDBResourcesServer MongoDBResourcesServer - NotebookWorkspacesServer NotebookWorkspacesServer - OperationsServer OperationsServer - PartitionKeyRangeIDServer PartitionKeyRangeIDServer - PartitionKeyRangeIDRegionServer PartitionKeyRangeIDRegionServer - PercentileServer PercentileServer - PercentileSourceTargetServer PercentileSourceTargetServer - PercentileTargetServer PercentileTargetServer - PrivateEndpointConnectionsServer PrivateEndpointConnectionsServer - PrivateLinkResourcesServer PrivateLinkResourcesServer - RestorableDatabaseAccountsServer RestorableDatabaseAccountsServer - RestorableGremlinDatabasesServer RestorableGremlinDatabasesServer - RestorableGremlinGraphsServer RestorableGremlinGraphsServer - RestorableGremlinResourcesServer RestorableGremlinResourcesServer - RestorableMongodbCollectionsServer RestorableMongodbCollectionsServer - RestorableMongodbDatabasesServer RestorableMongodbDatabasesServer - RestorableMongodbResourcesServer RestorableMongodbResourcesServer - RestorableSQLContainersServer RestorableSQLContainersServer - RestorableSQLDatabasesServer RestorableSQLDatabasesServer - RestorableSQLResourcesServer RestorableSQLResourcesServer - RestorableTableResourcesServer RestorableTableResourcesServer - RestorableTablesServer RestorableTablesServer - SQLResourcesServer SQLResourcesServer - ServiceServer ServiceServer - TableResourcesServer TableResourcesServer - ThroughputPoolAccountServer ThroughputPoolAccountServer - ThroughputPoolAccountsServer ThroughputPoolAccountsServer - ThroughputPoolServer ThroughputPoolServer - ThroughputPoolsServer ThroughputPoolsServer + CassandraClustersServer CassandraClustersServer + CassandraDataCentersServer CassandraDataCentersServer + CassandraResourcesServer CassandraResourcesServer + CollectionServer CollectionServer + CollectionPartitionServer CollectionPartitionServer + CollectionPartitionRegionServer CollectionPartitionRegionServer + CollectionRegionServer CollectionRegionServer + DataTransferJobsServer DataTransferJobsServer + DatabaseAccountRegionServer DatabaseAccountRegionServer + DatabaseAccountsServer DatabaseAccountsServer + DatabaseServer DatabaseServer + GraphResourcesServer GraphResourcesServer + GremlinResourcesServer GremlinResourcesServer + LocationsServer LocationsServer + MongoDBResourcesServer MongoDBResourcesServer + NetworkSecurityPerimeterConfigurationsServer NetworkSecurityPerimeterConfigurationsServer + NotebookWorkspacesServer NotebookWorkspacesServer + OperationsServer OperationsServer + PartitionKeyRangeIDServer PartitionKeyRangeIDServer + PartitionKeyRangeIDRegionServer PartitionKeyRangeIDRegionServer + PercentileServer PercentileServer + PercentileSourceTargetServer PercentileSourceTargetServer + PercentileTargetServer PercentileTargetServer + PrivateEndpointConnectionsServer PrivateEndpointConnectionsServer + PrivateLinkResourcesServer PrivateLinkResourcesServer + RestorableDatabaseAccountsServer RestorableDatabaseAccountsServer + RestorableGremlinDatabasesServer RestorableGremlinDatabasesServer + RestorableGremlinGraphsServer RestorableGremlinGraphsServer + RestorableGremlinResourcesServer RestorableGremlinResourcesServer + RestorableMongodbCollectionsServer RestorableMongodbCollectionsServer + RestorableMongodbDatabasesServer RestorableMongodbDatabasesServer + RestorableMongodbResourcesServer RestorableMongodbResourcesServer + RestorableSQLContainersServer RestorableSQLContainersServer + RestorableSQLDatabasesServer RestorableSQLDatabasesServer + RestorableSQLResourcesServer RestorableSQLResourcesServer + RestorableTableResourcesServer RestorableTableResourcesServer + RestorableTablesServer RestorableTablesServer + SQLResourcesServer SQLResourcesServer + ServiceServer ServiceServer + TableResourcesServer TableResourcesServer + ThroughputPoolAccountServer ThroughputPoolAccountServer + ThroughputPoolAccountsServer ThroughputPoolAccountsServer + ThroughputPoolServer ThroughputPoolServer + ThroughputPoolsServer ThroughputPoolsServer } // NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. @@ -77,52 +77,52 @@ func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { // ServerFactoryTransport connects instances of armcosmos.ClientFactory to instances of ServerFactory. // Don't use this type directly, use NewServerFactoryTransport instead. type ServerFactoryTransport struct { - srv *ServerFactory - trMu sync.Mutex - trCassandraClustersServer *CassandraClustersServerTransport - trCassandraDataCentersServer *CassandraDataCentersServerTransport - trCassandraResourcesServer *CassandraResourcesServerTransport - trCollectionServer *CollectionServerTransport - trCollectionPartitionServer *CollectionPartitionServerTransport - trCollectionPartitionRegionServer *CollectionPartitionRegionServerTransport - trCollectionRegionServer *CollectionRegionServerTransport - trDataTransferJobsServer *DataTransferJobsServerTransport - trDatabaseAccountRegionServer *DatabaseAccountRegionServerTransport - trDatabaseAccountsServer *DatabaseAccountsServerTransport - trDatabaseServer *DatabaseServerTransport - trGraphResourcesServer *GraphResourcesServerTransport - trGremlinResourcesServer *GremlinResourcesServerTransport - trLocationsServer *LocationsServerTransport - trMongoClustersServer *MongoClustersServerTransport - trMongoDBResourcesServer *MongoDBResourcesServerTransport - trNotebookWorkspacesServer *NotebookWorkspacesServerTransport - trOperationsServer *OperationsServerTransport - trPartitionKeyRangeIDServer *PartitionKeyRangeIDServerTransport - trPartitionKeyRangeIDRegionServer *PartitionKeyRangeIDRegionServerTransport - trPercentileServer *PercentileServerTransport - trPercentileSourceTargetServer *PercentileSourceTargetServerTransport - trPercentileTargetServer *PercentileTargetServerTransport - trPrivateEndpointConnectionsServer *PrivateEndpointConnectionsServerTransport - trPrivateLinkResourcesServer *PrivateLinkResourcesServerTransport - trRestorableDatabaseAccountsServer *RestorableDatabaseAccountsServerTransport - trRestorableGremlinDatabasesServer *RestorableGremlinDatabasesServerTransport - trRestorableGremlinGraphsServer *RestorableGremlinGraphsServerTransport - trRestorableGremlinResourcesServer *RestorableGremlinResourcesServerTransport - trRestorableMongodbCollectionsServer *RestorableMongodbCollectionsServerTransport - trRestorableMongodbDatabasesServer *RestorableMongodbDatabasesServerTransport - trRestorableMongodbResourcesServer *RestorableMongodbResourcesServerTransport - trRestorableSQLContainersServer *RestorableSQLContainersServerTransport - trRestorableSQLDatabasesServer *RestorableSQLDatabasesServerTransport - trRestorableSQLResourcesServer *RestorableSQLResourcesServerTransport - trRestorableTableResourcesServer *RestorableTableResourcesServerTransport - trRestorableTablesServer *RestorableTablesServerTransport - trSQLResourcesServer *SQLResourcesServerTransport - trServiceServer *ServiceServerTransport - trTableResourcesServer *TableResourcesServerTransport - trThroughputPoolAccountServer *ThroughputPoolAccountServerTransport - trThroughputPoolAccountsServer *ThroughputPoolAccountsServerTransport - trThroughputPoolServer *ThroughputPoolServerTransport - trThroughputPoolsServer *ThroughputPoolsServerTransport + srv *ServerFactory + trMu sync.Mutex + trCassandraClustersServer *CassandraClustersServerTransport + trCassandraDataCentersServer *CassandraDataCentersServerTransport + trCassandraResourcesServer *CassandraResourcesServerTransport + trCollectionServer *CollectionServerTransport + trCollectionPartitionServer *CollectionPartitionServerTransport + trCollectionPartitionRegionServer *CollectionPartitionRegionServerTransport + trCollectionRegionServer *CollectionRegionServerTransport + trDataTransferJobsServer *DataTransferJobsServerTransport + trDatabaseAccountRegionServer *DatabaseAccountRegionServerTransport + trDatabaseAccountsServer *DatabaseAccountsServerTransport + trDatabaseServer *DatabaseServerTransport + trGraphResourcesServer *GraphResourcesServerTransport + trGremlinResourcesServer *GremlinResourcesServerTransport + trLocationsServer *LocationsServerTransport + trMongoDBResourcesServer *MongoDBResourcesServerTransport + trNetworkSecurityPerimeterConfigurationsServer *NetworkSecurityPerimeterConfigurationsServerTransport + trNotebookWorkspacesServer *NotebookWorkspacesServerTransport + trOperationsServer *OperationsServerTransport + trPartitionKeyRangeIDServer *PartitionKeyRangeIDServerTransport + trPartitionKeyRangeIDRegionServer *PartitionKeyRangeIDRegionServerTransport + trPercentileServer *PercentileServerTransport + trPercentileSourceTargetServer *PercentileSourceTargetServerTransport + trPercentileTargetServer *PercentileTargetServerTransport + trPrivateEndpointConnectionsServer *PrivateEndpointConnectionsServerTransport + trPrivateLinkResourcesServer *PrivateLinkResourcesServerTransport + trRestorableDatabaseAccountsServer *RestorableDatabaseAccountsServerTransport + trRestorableGremlinDatabasesServer *RestorableGremlinDatabasesServerTransport + trRestorableGremlinGraphsServer *RestorableGremlinGraphsServerTransport + trRestorableGremlinResourcesServer *RestorableGremlinResourcesServerTransport + trRestorableMongodbCollectionsServer *RestorableMongodbCollectionsServerTransport + trRestorableMongodbDatabasesServer *RestorableMongodbDatabasesServerTransport + trRestorableMongodbResourcesServer *RestorableMongodbResourcesServerTransport + trRestorableSQLContainersServer *RestorableSQLContainersServerTransport + trRestorableSQLDatabasesServer *RestorableSQLDatabasesServerTransport + trRestorableSQLResourcesServer *RestorableSQLResourcesServerTransport + trRestorableTableResourcesServer *RestorableTableResourcesServerTransport + trRestorableTablesServer *RestorableTablesServerTransport + trSQLResourcesServer *SQLResourcesServerTransport + trServiceServer *ServiceServerTransport + trTableResourcesServer *TableResourcesServerTransport + trThroughputPoolAccountServer *ThroughputPoolAccountServerTransport + trThroughputPoolAccountsServer *ThroughputPoolAccountsServerTransport + trThroughputPoolServer *ThroughputPoolServerTransport + trThroughputPoolsServer *ThroughputPoolsServerTransport } // Do implements the policy.Transporter interface for ServerFactoryTransport. @@ -202,16 +202,16 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { case "LocationsClient": initServer(s, &s.trLocationsServer, func() *LocationsServerTransport { return NewLocationsServerTransport(&s.srv.LocationsServer) }) resp, err = s.trLocationsServer.Do(req) - case "MongoClustersClient": - initServer(s, &s.trMongoClustersServer, func() *MongoClustersServerTransport { - return NewMongoClustersServerTransport(&s.srv.MongoClustersServer) - }) - resp, err = s.trMongoClustersServer.Do(req) case "MongoDBResourcesClient": initServer(s, &s.trMongoDBResourcesServer, func() *MongoDBResourcesServerTransport { return NewMongoDBResourcesServerTransport(&s.srv.MongoDBResourcesServer) }) resp, err = s.trMongoDBResourcesServer.Do(req) + case "NetworkSecurityPerimeterConfigurationsClient": + initServer(s, &s.trNetworkSecurityPerimeterConfigurationsServer, func() *NetworkSecurityPerimeterConfigurationsServerTransport { + return NewNetworkSecurityPerimeterConfigurationsServerTransport(&s.srv.NetworkSecurityPerimeterConfigurationsServer) + }) + resp, err = s.trNetworkSecurityPerimeterConfigurationsServer.Do(req) case "NotebookWorkspacesClient": initServer(s, &s.trNotebookWorkspacesServer, func() *NotebookWorkspacesServerTransport { return NewNotebookWorkspacesServerTransport(&s.srv.NotebookWorkspacesServer) diff --git a/sdk/resourcemanager/cosmos/armcosmos/graphresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/graphresources_client.go index 52489181bf7c..3c8c7b9074f1 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/graphresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/graphresources_client.go @@ -28,7 +28,7 @@ type GraphResourcesClient struct { } // NewGraphResourcesClient creates a new instance of GraphResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewGraphResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GraphResourcesClient, error) { @@ -46,7 +46,7 @@ func NewGraphResourcesClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateUpdateGraph - Create or update an Azure Cosmos DB Graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - graphName - Cosmos DB graph resource name. @@ -73,7 +73,7 @@ func (client *GraphResourcesClient) BeginCreateUpdateGraph(ctx context.Context, // CreateUpdateGraph - Create or update an Azure Cosmos DB Graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GraphResourcesClient) createUpdateGraph(ctx context.Context, resourceGroupName string, accountName string, graphName string, createUpdateGraphParameters GraphResourceCreateUpdateParameters, options *GraphResourcesClientBeginCreateUpdateGraphOptions) (*http.Response, error) { var err error const operationName = "GraphResourcesClient.BeginCreateUpdateGraph" @@ -119,7 +119,7 @@ func (client *GraphResourcesClient) createUpdateGraphCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateGraphParameters); err != nil { @@ -131,7 +131,7 @@ func (client *GraphResourcesClient) createUpdateGraphCreateRequest(ctx context.C // BeginDeleteGraphResource - Deletes an existing Azure Cosmos DB Graph Resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - graphName - Cosmos DB graph resource name. @@ -157,7 +157,7 @@ func (client *GraphResourcesClient) BeginDeleteGraphResource(ctx context.Context // DeleteGraphResource - Deletes an existing Azure Cosmos DB Graph Resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GraphResourcesClient) deleteGraphResource(ctx context.Context, resourceGroupName string, accountName string, graphName string, options *GraphResourcesClientBeginDeleteGraphResourceOptions) (*http.Response, error) { var err error const operationName = "GraphResourcesClient.BeginDeleteGraphResource" @@ -203,7 +203,7 @@ func (client *GraphResourcesClient) deleteGraphResourceCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -211,7 +211,7 @@ func (client *GraphResourcesClient) deleteGraphResourceCreateRequest(ctx context // GetGraph - Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - graphName - Cosmos DB graph resource name. @@ -262,7 +262,7 @@ func (client *GraphResourcesClient) getGraphCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,7 +279,7 @@ func (client *GraphResourcesClient) getGraphHandleResponse(resp *http.Response) // NewListGraphsPager - Lists the graphs under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - GraphResourcesClientListGraphsOptions contains the optional parameters for the GraphResourcesClient.NewListGraphsPager @@ -328,7 +328,7 @@ func (client *GraphResourcesClient) listGraphsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/graphresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/graphresources_client_example_test.go index 3b5542a949ca..f04e2b4565ec 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/graphresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/graphresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGraphResourceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGraphResourceList.json func ExampleGraphResourcesClient_NewListGraphsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,7 +59,7 @@ func ExampleGraphResourcesClient_NewListGraphsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGraphResourceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGraphResourceGet.json func ExampleGraphResourcesClient_GetGraph() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -92,7 +92,7 @@ func ExampleGraphResourcesClient_GetGraph() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGraphResourceCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGraphResourceCreateUpdate.json func ExampleGraphResourcesClient_BeginCreateUpdateGraph() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -138,7 +138,7 @@ func ExampleGraphResourcesClient_BeginCreateUpdateGraph() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGraphResourceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGraphResourceDelete.json func ExampleGraphResourcesClient_BeginDeleteGraphResource() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client.go index d975446a987a..0fca9fcf01ed 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client.go @@ -28,7 +28,7 @@ type GremlinResourcesClient struct { } // NewGremlinResourcesClient creates a new instance of GremlinResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewGremlinResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GremlinResourcesClient, error) { @@ -46,7 +46,7 @@ func NewGremlinResourcesClient(subscriptionID string, credential azcore.TokenCre // BeginCreateUpdateGremlinDatabase - Create or update an Azure Cosmos DB Gremlin database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -73,7 +73,7 @@ func (client *GremlinResourcesClient) BeginCreateUpdateGremlinDatabase(ctx conte // CreateUpdateGremlinDatabase - Create or update an Azure Cosmos DB Gremlin database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) createUpdateGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateGremlinDatabaseParameters GremlinDatabaseCreateUpdateParameters, options *GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginCreateUpdateGremlinDatabase" @@ -119,7 +119,7 @@ func (client *GremlinResourcesClient) createUpdateGremlinDatabaseCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateGremlinDatabaseParameters); err != nil { @@ -131,7 +131,7 @@ func (client *GremlinResourcesClient) createUpdateGremlinDatabaseCreateRequest(c // BeginCreateUpdateGremlinGraph - Create or update an Azure Cosmos DB Gremlin graph // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -159,7 +159,7 @@ func (client *GremlinResourcesClient) BeginCreateUpdateGremlinGraph(ctx context. // CreateUpdateGremlinGraph - Create or update an Azure Cosmos DB Gremlin graph // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) createUpdateGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, createUpdateGremlinGraphParameters GremlinGraphCreateUpdateParameters, options *GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginCreateUpdateGremlinGraph" @@ -209,7 +209,7 @@ func (client *GremlinResourcesClient) createUpdateGremlinGraphCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateGremlinGraphParameters); err != nil { @@ -221,7 +221,7 @@ func (client *GremlinResourcesClient) createUpdateGremlinGraphCreateRequest(ctx // BeginDeleteGremlinDatabase - Deletes an existing Azure Cosmos DB Gremlin database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -247,7 +247,7 @@ func (client *GremlinResourcesClient) BeginDeleteGremlinDatabase(ctx context.Con // DeleteGremlinDatabase - Deletes an existing Azure Cosmos DB Gremlin database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) deleteGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientBeginDeleteGremlinDatabaseOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginDeleteGremlinDatabase" @@ -293,7 +293,7 @@ func (client *GremlinResourcesClient) deleteGremlinDatabaseCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -301,7 +301,7 @@ func (client *GremlinResourcesClient) deleteGremlinDatabaseCreateRequest(ctx con // BeginDeleteGremlinGraph - Deletes an existing Azure Cosmos DB Gremlin graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -328,7 +328,7 @@ func (client *GremlinResourcesClient) BeginDeleteGremlinGraph(ctx context.Contex // DeleteGremlinGraph - Deletes an existing Azure Cosmos DB Gremlin graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) deleteGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientBeginDeleteGremlinGraphOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginDeleteGremlinGraph" @@ -378,7 +378,7 @@ func (client *GremlinResourcesClient) deleteGremlinGraphCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -386,7 +386,7 @@ func (client *GremlinResourcesClient) deleteGremlinGraphCreateRequest(ctx contex // GetGremlinDatabase - Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -438,7 +438,7 @@ func (client *GremlinResourcesClient) getGremlinDatabaseCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -457,7 +457,7 @@ func (client *GremlinResourcesClient) getGremlinDatabaseHandleResponse(resp *htt // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -509,7 +509,7 @@ func (client *GremlinResourcesClient) getGremlinDatabaseThroughputCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -527,7 +527,7 @@ func (client *GremlinResourcesClient) getGremlinDatabaseThroughputHandleResponse // GetGremlinGraph - Gets the Gremlin graph under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -584,7 +584,7 @@ func (client *GremlinResourcesClient) getGremlinGraphCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -603,7 +603,7 @@ func (client *GremlinResourcesClient) getGremlinGraphHandleResponse(resp *http.R // provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -660,7 +660,7 @@ func (client *GremlinResourcesClient) getGremlinGraphThroughputCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -677,7 +677,7 @@ func (client *GremlinResourcesClient) getGremlinGraphThroughputHandleResponse(re // NewListGremlinDatabasesPager - Lists the Gremlin databases under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - GremlinResourcesClientListGremlinDatabasesOptions contains the optional parameters for the GremlinResourcesClient.NewListGremlinDatabasesPager @@ -726,7 +726,7 @@ func (client *GremlinResourcesClient) listGremlinDatabasesCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -743,7 +743,7 @@ func (client *GremlinResourcesClient) listGremlinDatabasesHandleResponse(resp *h // NewListGremlinGraphsPager - Lists the Gremlin graph under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -797,7 +797,7 @@ func (client *GremlinResourcesClient) listGremlinGraphsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -815,7 +815,7 @@ func (client *GremlinResourcesClient) listGremlinGraphsHandleResponse(resp *http // BeginMigrateGremlinDatabaseToAutoscale - Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -841,7 +841,7 @@ func (client *GremlinResourcesClient) BeginMigrateGremlinDatabaseToAutoscale(ctx // MigrateGremlinDatabaseToAutoscale - Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) migrateGremlinDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginMigrateGremlinDatabaseToAutoscale" @@ -887,7 +887,7 @@ func (client *GremlinResourcesClient) migrateGremlinDatabaseToAutoscaleCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -896,7 +896,7 @@ func (client *GremlinResourcesClient) migrateGremlinDatabaseToAutoscaleCreateReq // BeginMigrateGremlinDatabaseToManualThroughput - Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -922,7 +922,7 @@ func (client *GremlinResourcesClient) BeginMigrateGremlinDatabaseToManualThrough // MigrateGremlinDatabaseToManualThroughput - Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) migrateGremlinDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginMigrateGremlinDatabaseToManualThroughput" @@ -968,7 +968,7 @@ func (client *GremlinResourcesClient) migrateGremlinDatabaseToManualThroughputCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -977,7 +977,7 @@ func (client *GremlinResourcesClient) migrateGremlinDatabaseToManualThroughputCr // BeginMigrateGremlinGraphToAutoscale - Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1004,7 +1004,7 @@ func (client *GremlinResourcesClient) BeginMigrateGremlinGraphToAutoscale(ctx co // MigrateGremlinGraphToAutoscale - Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) migrateGremlinGraphToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginMigrateGremlinGraphToAutoscale" @@ -1054,7 +1054,7 @@ func (client *GremlinResourcesClient) migrateGremlinGraphToAutoscaleCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1063,7 +1063,7 @@ func (client *GremlinResourcesClient) migrateGremlinGraphToAutoscaleCreateReques // BeginMigrateGremlinGraphToManualThroughput - Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1090,7 +1090,7 @@ func (client *GremlinResourcesClient) BeginMigrateGremlinGraphToManualThroughput // MigrateGremlinGraphToManualThroughput - Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) migrateGremlinGraphToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginMigrateGremlinGraphToManualThroughput" @@ -1140,7 +1140,7 @@ func (client *GremlinResourcesClient) migrateGremlinGraphToManualThroughputCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1149,7 +1149,7 @@ func (client *GremlinResourcesClient) migrateGremlinGraphToManualThroughputCreat // BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a gremlin graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1178,7 +1178,7 @@ func (client *GremlinResourcesClient) BeginRetrieveContinuousBackupInformation(c // RetrieveContinuousBackupInformation - Retrieves continuous backup information for a gremlin graph. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) retrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, location ContinuousBackupRestoreLocation, options *GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginRetrieveContinuousBackupInformation" @@ -1228,7 +1228,7 @@ func (client *GremlinResourcesClient) retrieveContinuousBackupInformationCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, location); err != nil { @@ -1240,7 +1240,7 @@ func (client *GremlinResourcesClient) retrieveContinuousBackupInformationCreateR // BeginUpdateGremlinDatabaseThroughput - Update RUs per second of an Azure Cosmos DB Gremlin database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1267,7 +1267,7 @@ func (client *GremlinResourcesClient) BeginUpdateGremlinDatabaseThroughput(ctx c // UpdateGremlinDatabaseThroughput - Update RUs per second of an Azure Cosmos DB Gremlin database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) updateGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginUpdateGremlinDatabaseThroughput" @@ -1313,7 +1313,7 @@ func (client *GremlinResourcesClient) updateGremlinDatabaseThroughputCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { @@ -1325,7 +1325,7 @@ func (client *GremlinResourcesClient) updateGremlinDatabaseThroughputCreateReque // BeginUpdateGremlinGraphThroughput - Update RUs per second of an Azure Cosmos DB Gremlin graph // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1353,7 +1353,7 @@ func (client *GremlinResourcesClient) BeginUpdateGremlinGraphThroughput(ctx cont // UpdateGremlinGraphThroughput - Update RUs per second of an Azure Cosmos DB Gremlin graph // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *GremlinResourcesClient) updateGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions) (*http.Response, error) { var err error const operationName = "GremlinResourcesClient.BeginUpdateGremlinGraphThroughput" @@ -1403,7 +1403,7 @@ func (client *GremlinResourcesClient) updateGremlinGraphThroughputCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client_example_test.go index 509e19cd79e2..771fe70a6769 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/gremlinresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinDatabaseList.json func ExampleGremlinResourcesClient_NewListGremlinDatabasesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -62,7 +62,7 @@ func ExampleGremlinResourcesClient_NewListGremlinDatabasesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinDatabaseGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinDatabaseGet.json func ExampleGremlinResourcesClient_GetGremlinDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,7 +98,7 @@ func ExampleGremlinResourcesClient_GetGremlinDatabase() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinDatabaseCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinDatabaseCreateUpdate.json func ExampleGremlinResourcesClient_BeginCreateUpdateGremlinDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -147,7 +147,7 @@ func ExampleGremlinResourcesClient_BeginCreateUpdateGremlinDatabase() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinDatabaseDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinDatabaseDelete.json func ExampleGremlinResourcesClient_BeginDeleteGremlinDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -168,7 +168,7 @@ func ExampleGremlinResourcesClient_BeginDeleteGremlinDatabase() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinDatabaseThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinDatabaseThroughputGet.json func ExampleGremlinResourcesClient_GetGremlinDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -208,7 +208,7 @@ func ExampleGremlinResourcesClient_GetGremlinDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinDatabaseThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinDatabaseThroughputUpdate.json func ExampleGremlinResourcesClient_BeginUpdateGremlinDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -258,7 +258,7 @@ func ExampleGremlinResourcesClient_BeginUpdateGremlinDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json func ExampleGremlinResourcesClient_BeginMigrateGremlinDatabaseToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -297,7 +297,7 @@ func ExampleGremlinResourcesClient_BeginMigrateGremlinDatabaseToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json func ExampleGremlinResourcesClient_BeginMigrateGremlinDatabaseToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -333,7 +333,7 @@ func ExampleGremlinResourcesClient_BeginMigrateGremlinDatabaseToManualThroughput // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinGraphList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinGraphList.json func ExampleGremlinResourcesClient_NewListGremlinGraphsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -412,7 +412,7 @@ func ExampleGremlinResourcesClient_NewListGremlinGraphsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinGraphGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinGraphGet.json func ExampleGremlinResourcesClient_GetGremlinGraph() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -483,7 +483,7 @@ func ExampleGremlinResourcesClient_GetGremlinGraph() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinGraphCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinGraphCreateUpdate.json func ExampleGremlinResourcesClient_BeginCreateUpdateGremlinGraph() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -607,7 +607,7 @@ func ExampleGremlinResourcesClient_BeginCreateUpdateGremlinGraph() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinGraphDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinGraphDelete.json func ExampleGremlinResourcesClient_BeginDeleteGremlinGraph() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -628,7 +628,7 @@ func ExampleGremlinResourcesClient_BeginDeleteGremlinGraph() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinGraphThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinGraphThroughputGet.json func ExampleGremlinResourcesClient_GetGremlinGraphThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -668,7 +668,7 @@ func ExampleGremlinResourcesClient_GetGremlinGraphThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinGraphThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinGraphThroughputUpdate.json func ExampleGremlinResourcesClient_BeginUpdateGremlinGraphThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -718,7 +718,7 @@ func ExampleGremlinResourcesClient_BeginUpdateGremlinGraphThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinGraphMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinGraphMigrateToAutoscale.json func ExampleGremlinResourcesClient_BeginMigrateGremlinGraphToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -757,7 +757,7 @@ func ExampleGremlinResourcesClient_BeginMigrateGremlinGraphToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json func ExampleGremlinResourcesClient_BeginMigrateGremlinGraphToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -793,7 +793,7 @@ func ExampleGremlinResourcesClient_BeginMigrateGremlinGraphToManualThroughput() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGremlinGraphBackupInformation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGremlinGraphBackupInformation.json func ExampleGremlinResourcesClient_BeginRetrieveContinuousBackupInformation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/interfaces.go b/sdk/resourcemanager/cosmos/armcosmos/interfaces.go index 2bc958288e38..d5cf913c6482 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/interfaces.go +++ b/sdk/resourcemanager/cosmos/armcosmos/interfaces.go @@ -37,6 +37,16 @@ type DataTransferDataSourceSinkClassification interface { GetDataTransferDataSourceSink() *DataTransferDataSourceSink } +// ServiceResourceCreateUpdatePropertiesClassification provides polymorphic access to related types. +// Call the interface's GetServiceResourceCreateUpdateProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *DataTransferServiceResourceCreateUpdateProperties, *GraphAPIComputeServiceResourceCreateUpdateProperties, *MaterializedViewsBuilderServiceResourceCreateUpdateProperties, +// - *SQLDedicatedGatewayServiceResourceCreateUpdateProperties, *ServiceResourceCreateUpdateProperties +type ServiceResourceCreateUpdatePropertiesClassification interface { + // GetServiceResourceCreateUpdateProperties returns the ServiceResourceCreateUpdateProperties content of the underlying type. + GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties +} + // ServiceResourcePropertiesClassification provides polymorphic access to related types. // Call the interface's GetServiceResourceProperties() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: diff --git a/sdk/resourcemanager/cosmos/armcosmos/locations_client.go b/sdk/resourcemanager/cosmos/armcosmos/locations_client.go index ab5d7f4ca1cb..c0734d09bb2b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/locations_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/locations_client.go @@ -28,7 +28,7 @@ type LocationsClient struct { } // NewLocationsClient creates a new instance of LocationsClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error) { @@ -46,7 +46,7 @@ func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential // Get - Get the properties of an existing Cosmos DB location // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - options - LocationsClientGetOptions contains the optional parameters for the LocationsClient.Get method. func (client *LocationsClient) Get(ctx context.Context, location string, options *LocationsClientGetOptions) (LocationsClientGetResponse, error) { @@ -87,7 +87,7 @@ func (client *LocationsClient) getCreateRequest(ctx context.Context, location st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -104,7 +104,7 @@ func (client *LocationsClient) getHandleResponse(resp *http.Response) (Locations // NewListPager - List Cosmos DB locations and their properties // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - options - LocationsClientListOptions contains the optional parameters for the LocationsClient.NewListPager method. func (client *LocationsClient) NewListPager(options *LocationsClientListOptions) *runtime.Pager[LocationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LocationsClientListResponse]{ @@ -142,7 +142,7 @@ func (client *LocationsClient) listCreateRequest(ctx context.Context, options *L return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/locations_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/locations_client_example_test.go index 71c63dc441f8..9b51ca1768e6 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/locations_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/locations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBLocationList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBLocationList.json func ExampleLocationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -75,7 +75,7 @@ func ExampleLocationsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBLocationGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBLocationGet.json func ExampleLocationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/models.go b/sdk/resourcemanager/cosmos/armcosmos/models.go index 64454e10b145..60fb4daf5af2 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/models.go +++ b/sdk/resourcemanager/cosmos/armcosmos/models.go @@ -53,6 +53,45 @@ type ARMResourceProperties struct { Type *string } +// AccessRule - Access rule in a network security perimeter configuration profile +type AccessRule struct { + // Name of the access rule + Name *string + + // Properties of Access Rule + Properties *AccessRuleProperties +} + +// AccessRuleProperties - Properties of Access Rule +type AccessRuleProperties struct { + // Address prefixes in the CIDR format for inbound rules + AddressPrefixes []*string + + // Direction of Access Rule + Direction *AccessRuleDirection + + // Email addresses for outbound rules + EmailAddresses []*string + + // Fully qualified domain names (FQDN) for outbound rules + FullyQualifiedDomainNames []*string + + // Network security perimeters for inbound rules + NetworkSecurityPerimeters []*NetworkSecurityPerimeter + + // Phone numbers for outbound rules + PhoneNumbers []*string + + // Subscriptions for inbound rules + Subscriptions []*AccessRulePropertiesSubscriptionsItem +} + +// AccessRulePropertiesSubscriptionsItem - Subscription identifiers +type AccessRulePropertiesSubscriptionsItem struct { + // The fully qualified Azure resource ID of the subscription e.g. ('/subscriptions/00000000-0000-0000-0000-000000000000') + ID *string +} + // AccountKeyMetadata - The metadata related to an access key for a given database account. type AccountKeyMetadata struct { // READ-ONLY; Generation time in UTC of the key in ISO-8601 format. If the value is missing from the object, it means that @@ -225,6 +264,27 @@ type Capacity struct { TotalThroughputLimit *int32 } +// CapacityModeChangeTransitionState - The transition state information related capacity mode change with update request. +type CapacityModeChangeTransitionState struct { + // The transition status of capacity mode. + CapacityModeTransitionStatus *CapacityModeTransitionStatus + + // Indicates the current capacity mode of the account. + CurrentCapacityMode *CapacityMode + + // Indicates the previous capacity mode of the account before successful transition. + PreviousCapacityMode *CapacityMode + + // READ-ONLY; End time in UTC of the last successful capacity mode change. + CapacityModeLastSuccessfulTransitionEndTimestamp *time.Time + + // READ-ONLY; Begin time in UTC of the capacity mode change. + CapacityModeTransitionBeginTimestamp *time.Time + + // READ-ONLY; End time in UTC of the capacity mode change. + CapacityModeTransitionEndTimestamp *time.Time +} + // CassandraClusterPublicStatus - Properties of a managed Cassandra cluster public status. type CassandraClusterPublicStatus struct { // List relevant information about any connection errors to the Datacenters. @@ -656,27 +716,6 @@ type Certificate struct { Pem *string } -// CheckNameAvailabilityRequest - The check availability request body. -type CheckNameAvailabilityRequest struct { - // The name of the resource for which availability needs to be checked. - Name *string - - // The resource type. - Type *string -} - -// CheckNameAvailabilityResponse - The check availability result. -type CheckNameAvailabilityResponse struct { - // Detailed reason why the given name is available. - Message *string - - // Indicates if the resource name is available. - NameAvailable *bool - - // The reason why the given name is not available. - Reason *CheckNameAvailabilityReason -} - // ClientEncryptionIncludedPath - . type ClientEncryptionIncludedPath struct { // REQUIRED; The identifier of the Client Encryption Key to be used to encrypt the path. @@ -1091,15 +1130,6 @@ type ConnectionError struct { Port *int32 } -// ConnectionString - Connection string for the mongo cluster -type ConnectionString struct { - // READ-ONLY; Value of the connection string - ConnectionString *string - - // READ-ONLY; Description of the connection string - Description *string -} - // ConsistencyPolicy - The consistency policy for the Cosmos DB database account. type ConsistencyPolicy struct { // REQUIRED; The default consistency level and configuration settings of the Cosmos DB account. @@ -1343,7 +1373,7 @@ type DataTransferJobProperties struct { Duration *string // READ-ONLY; Error response for Faulted job - Error *ErrorResponse + Error *ErrorResponseAutoGenerated // READ-ONLY; Job Name JobName *string @@ -1379,6 +1409,28 @@ type DataTransferServiceResource struct { Properties *DataTransferServiceResourceProperties } +// DataTransferServiceResourceCreateUpdateProperties - Properties for Create or Update request for DataTransferServiceResource +type DataTransferServiceResourceCreateUpdateProperties struct { + // REQUIRED; ServiceType for the service. + ServiceType *ServiceType + + // Instance count for the service. + InstanceCount *int32 + + // Instance type for the service. + InstanceSize *ServiceSize +} + +// GetServiceResourceCreateUpdateProperties implements the ServiceResourceCreateUpdatePropertiesClassification interface for +// type DataTransferServiceResourceCreateUpdateProperties. +func (d *DataTransferServiceResourceCreateUpdateProperties) GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties { + return &ServiceResourceCreateUpdateProperties{ + InstanceCount: d.InstanceCount, + InstanceSize: d.InstanceSize, + ServiceType: d.ServiceType, + } +} + // DataTransferServiceResourceProperties - Properties for DataTransferServiceResource. type DataTransferServiceResourceProperties struct { // REQUIRED; ServiceType for the service. @@ -1485,6 +1537,9 @@ type DatabaseAccountCreateUpdateProperties struct { // The object that represents all properties related to capacity enforcement on an account. Capacity *Capacity + // Indicates the capacityMode of the Cosmos DB account. + CapacityMode *CapacityMode + // The cassandra connector offer type for the Cosmos DB database C* account. ConnectorOffer *ConnectorOffer @@ -1600,6 +1655,12 @@ type DatabaseAccountGetProperties struct { // The object that represents all properties related to capacity enforcement on an account. Capacity *Capacity + // Indicates the capacityMode of the Cosmos DB account. + CapacityMode *CapacityMode + + // The object that represents the migration state for the CapacityMode of the Cosmos DB account. + CapacityModeChangeTransitionState *CapacityModeChangeTransitionState + // The cassandra connector offer type for the Cosmos DB database C* account. ConnectorOffer *ConnectorOffer @@ -1850,6 +1911,9 @@ type DatabaseAccountUpdateProperties struct { // The object that represents all properties related to capacity enforcement on an account. Capacity *Capacity + // Indicates the capacityMode of the Cosmos DB account. + CapacityMode *CapacityMode + // The cassandra connector offer type for the Cosmos DB database C* account. ConnectorOffer *ConnectorOffer @@ -1993,8 +2057,15 @@ type ErrorDetail struct { Target *string } -// ErrorResponse - Error Response. +// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. +// (This also follows the OData error response format.). type ErrorResponse struct { + // The error object. + Error *ErrorDetail +} + +// ErrorResponseAutoGenerated - Error Response. +type ErrorResponseAutoGenerated struct { // Error code. Code *string @@ -2002,13 +2073,6 @@ type ErrorResponse struct { Message *string } -// ErrorResponseAutoGenerated - Common error response for all Azure Resource Manager APIs to return error details for failed -// operations. (This also follows the OData error response format.). -type ErrorResponseAutoGenerated struct { - // The error object. - Error *ErrorDetail -} - type ExcludedPath struct { // The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) Path *string @@ -2047,45 +2111,6 @@ type FailoverPolicy struct { ID *string } -// FirewallRule - Represents a mongo cluster firewall rule. -type FirewallRule struct { - // REQUIRED; The properties of a firewall rule. - Properties *FirewallRuleProperties - - // 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 -} - -// FirewallRuleListResult - A list of firewall rules. -type FirewallRuleListResult struct { - // The list of firewall rules in a mongo cluster. - Value []*FirewallRule - - // READ-ONLY; The link used to get the next page of results. - NextLink *string -} - -// FirewallRuleProperties - The properties of a mongo cluster firewall rule. -type FirewallRuleProperties struct { - // REQUIRED; The end IP address of the mongo cluster firewall rule. Must be IPv4 format. - EndIPAddress *string - - // REQUIRED; The start IP address of the mongo cluster firewall rule. Must be IPv4 format. - StartIPAddress *string - - // READ-ONLY; The provisioning state of the firewall rule. - ProvisioningState *ProvisioningState -} - // GraphAPIComputeRegionalServiceResource - Resource for a regional service location. type GraphAPIComputeRegionalServiceResource struct { // READ-ONLY; The regional endpoint for GraphAPICompute. @@ -2107,6 +2132,28 @@ type GraphAPIComputeServiceResource struct { Properties *GraphAPIComputeServiceResourceProperties } +// GraphAPIComputeServiceResourceCreateUpdateProperties - Properties for Create or Update request for GraphAPIComputeServiceResource +type GraphAPIComputeServiceResourceCreateUpdateProperties struct { + // REQUIRED; ServiceType for the service. + ServiceType *ServiceType + + // Instance count for the service. + InstanceCount *int32 + + // Instance type for the service. + InstanceSize *ServiceSize +} + +// GetServiceResourceCreateUpdateProperties implements the ServiceResourceCreateUpdatePropertiesClassification interface for +// type GraphAPIComputeServiceResourceCreateUpdateProperties. +func (g *GraphAPIComputeServiceResourceCreateUpdateProperties) GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties { + return &ServiceResourceCreateUpdateProperties{ + InstanceCount: g.InstanceCount, + InstanceSize: g.InstanceSize, + ServiceType: g.ServiceType, + } +} + // GraphAPIComputeServiceResourceProperties - Properties for GraphAPIComputeServiceResource. type GraphAPIComputeServiceResourceProperties struct { // REQUIRED; ServiceType for the service. @@ -2611,12 +2658,6 @@ type ListCommands struct { Value []*CommandPublicResource } -// ListConnectionStringsResult - The connection strings for the given mongo cluster. -type ListConnectionStringsResult struct { - // READ-ONLY; An array that contains the connection strings for a mongo cluster. - ConnectionStrings []*ConnectionString -} - // ListDataCenters - List of managed Cassandra data centers and their properties. type ListDataCenters struct { // READ-ONLY; Container for array of data centers. @@ -2791,6 +2832,28 @@ type MaterializedViewsBuilderServiceResource struct { Properties *MaterializedViewsBuilderServiceResourceProperties } +// MaterializedViewsBuilderServiceResourceCreateUpdateProperties - Properties for Create or Update request for MaterializedViewsBuilderServiceResource +type MaterializedViewsBuilderServiceResourceCreateUpdateProperties struct { + // REQUIRED; ServiceType for the service. + ServiceType *ServiceType + + // Instance count for the service. + InstanceCount *int32 + + // Instance type for the service. + InstanceSize *ServiceSize +} + +// GetServiceResourceCreateUpdateProperties implements the ServiceResourceCreateUpdatePropertiesClassification interface for +// type MaterializedViewsBuilderServiceResourceCreateUpdateProperties. +func (m *MaterializedViewsBuilderServiceResourceCreateUpdateProperties) GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties { + return &ServiceResourceCreateUpdateProperties{ + InstanceCount: m.InstanceCount, + InstanceSize: m.InstanceSize, + ServiceType: m.ServiceType, + } +} + // MaterializedViewsBuilderServiceResourceProperties - Properties for MaterializedViewsBuilderServiceResource. type MaterializedViewsBuilderServiceResourceProperties struct { // REQUIRED; ServiceType for the service. @@ -2923,90 +2986,6 @@ type MetricValue struct { Total *float64 } -// MongoCluster - Represents a mongo cluster resource. -type MongoCluster struct { - // REQUIRED; The geo-location where the resource lives - Location *string - - // Properties of the mongo cluster. - Properties *MongoClusterProperties - - // 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 -} - -// MongoClusterListResult - A list of mongo clusters. -type MongoClusterListResult struct { - // The list of mongo clusters - Value []*MongoCluster - - // READ-ONLY; The link used to get the next page of results. - NextLink *string -} - -// MongoClusterProperties - The properties of a mongo cluster. -type MongoClusterProperties struct { - // The administrator's login for the mongo cluster. - AdministratorLogin *string - - // The password of the administrator login. - AdministratorLoginPassword *string - - // The mode to create a mongo cluster. - CreateMode *CreateMode - - // The list of node group specs in the cluster. - NodeGroupSpecs []*NodeGroupSpec - - // Parameters used for restore operations - RestoreParameters *MongoClusterRestoreParameters - - // The Mongo DB server version. Defaults to the latest available version if not specified. - ServerVersion *string - - // READ-ONLY; A status of the mongo cluster. - ClusterStatus *MongoClusterStatus - - // READ-ONLY; The default mongo connection string for the cluster. - ConnectionString *string - - // READ-ONLY; Earliest restore timestamp in UTC ISO8601 format. - EarliestRestoreTime *string - - // READ-ONLY; A provisioning state of the mongo cluster. - ProvisioningState *ProvisioningState -} - -// MongoClusterRestoreParameters - Parameters used for restore operations -type MongoClusterRestoreParameters struct { - // UTC point in time to restore a mongo cluster - PointInTimeUTC *time.Time - - // Resource ID to locate the source cluster to restore - SourceResourceID *string -} - -// MongoClusterUpdate - Represents a mongo cluster resource for updates. -type MongoClusterUpdate struct { - // Properties of the mongo cluster. - Properties *MongoClusterProperties - - // Application-specific metadata in the form of key-value pairs. - Tags map[string]*string -} - // MongoDBCollectionCreateUpdateParameters - Parameters to create and update Cosmos DB MongoDB collection. type MongoDBCollectionCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB MongoDB collection. @@ -3409,36 +3388,79 @@ type MongoUserDefinitionResource struct { UserName *string } -// NodeGroupProperties - The properties of the node group on a cluster. -type NodeGroupProperties struct { - // The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024. - DiskSizeGB *int64 +// NetworkSecurityPerimeter - Information about a network security perimeter (NSP) +type NetworkSecurityPerimeter struct { + // Fully qualified Azure resource ID of the NSP resource + ID *string - // Whether high availability is enabled on the node group. - EnableHa *bool + // Location of the network security perimeter + Location *string - // The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example - // values: 'M30', 'M40'. - SKU *string + // Universal unique ID (UUID) of the network security perimeter + PerimeterGUID *string } -// NodeGroupSpec - Specification for a node group. -type NodeGroupSpec struct { - // The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024. - DiskSizeGB *int64 +// NetworkSecurityPerimeterConfiguration - Network security perimeter (NSP) configuration resource +type NetworkSecurityPerimeterConfiguration struct { + // Network security configuration properties. + Properties *NetworkSecurityPerimeterConfigurationProperties - // Whether high availability is enabled on the node group. - EnableHa *bool + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string - // The node type deployed in the node group. - Kind *NodeKind + // READ-ONLY; The name of the resource + Name *string - // The number of nodes in the node group. - NodeCount *int32 + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData - // The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example - // values: 'M30', 'M40'. - SKU *string + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// NetworkSecurityPerimeterConfigurationListResult - Result of a list NSP (network security perimeter) configurations request. +type NetworkSecurityPerimeterConfigurationListResult struct { + // The link used to get the next page of results. + NextLink *string + + // Array of network security perimeter results. + Value []*NetworkSecurityPerimeterConfiguration +} + +// NetworkSecurityPerimeterConfigurationProperties - Network security configuration properties. +type NetworkSecurityPerimeterConfigurationProperties struct { + // Information about a network security perimeter (NSP) + NetworkSecurityPerimeter *NetworkSecurityPerimeter + + // Network security perimeter configuration profile + Profile *NetworkSecurityProfile + + // Information about resource association + ResourceAssociation *ResourceAssociation + + // READ-ONLY; List of provisioning issues, if any + ProvisioningIssues []*ProvisioningIssue + + // READ-ONLY; Provisioning state of a network security perimeter configuration that is being created or updated. + ProvisioningState *NetworkSecurityPerimeterConfigurationProvisioningState +} + +// NetworkSecurityProfile - Network security perimeter configuration profile +type NetworkSecurityProfile struct { + // List of Access Rules + AccessRules []*AccessRule + + // Current access rules version + AccessRulesVersion *int32 + + // Current diagnostic settings version + DiagnosticSettingsVersion *int32 + + // List of log categories that are enabled + EnabledLogCategories []*string + + // Name of the profile + Name *string } // NotebookWorkspace - A notebook workspace resource @@ -3792,12 +3814,15 @@ type PrivateEndpointConnection struct { // Resource properties. Properties *PrivateEndpointConnectionProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // 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 } @@ -3892,22 +3917,41 @@ type PrivilegeResource struct { Db *string } -// ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a -// location -type ProxyResource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource +// ProvisioningIssue - Describes a provisioning issue for a network security perimeter configuration +type ProvisioningIssue struct { + // READ-ONLY; Name of the issue Name *string - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string + // READ-ONLY; Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource providers should + // generate separate provisioning issue elements for each separate issue detected, and + // include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules + Properties *ProvisioningIssueProperties } -// ProxyResourceAutoGenerated - The resource model definition for a Azure Resource Manager proxy resource. It will not have -// tags and a location -type ProxyResourceAutoGenerated struct { +// ProvisioningIssueProperties - Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource +// providers should generate separate provisioning issue elements for each separate issue detected, and +// include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules +type ProvisioningIssueProperties struct { + // READ-ONLY; Description of the issue + Description *string + + // READ-ONLY; Type of issue + IssueType *IssueType + + // READ-ONLY; Severity of the issue. + Severity *Severity + + // READ-ONLY; Access rules that can be added to the network security profile (NSP) to remediate the issue. + SuggestedAccessRules []*AccessRule + + // READ-ONLY; Fully qualified resource IDs of suggested resources that can be associated to the network security perimeter + // (NSP) to remediate the issue. + SuggestedResourceIDs []*string +} + +// ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a +// location +type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string @@ -3987,18 +4031,6 @@ type RegionalServiceResource struct { // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ResourceAutoGenerated - Common fields that are returned in the response for all Azure Resource Manager resources -type ResourceAutoGenerated struct { // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string @@ -4012,6 +4044,15 @@ type ResourceAutoGenerated struct { Type *string } +// ResourceAssociation - Information about resource association +type ResourceAssociation struct { + // Access mode of the resource association + AccessMode *ResourceAssociationAccessMode + + // Name of the resource association + Name *string +} + // ResourceRestoreParameters - Parameters to indicate the information about the restore. type ResourceRestoreParameters struct { // The id of the restorable database account from which the restore has to be initiated. For example: @@ -5062,6 +5103,31 @@ type SQLDedicatedGatewayServiceResource struct { Properties *SQLDedicatedGatewayServiceResourceProperties } +// SQLDedicatedGatewayServiceResourceCreateUpdateProperties - Properties for Create or Update request for SqlDedicatedGatewayServiceResource +type SQLDedicatedGatewayServiceResourceCreateUpdateProperties struct { + // REQUIRED; ServiceType for the service. + ServiceType *ServiceType + + // DedicatedGatewayType for the service. + DedicatedGatewayType *DedicatedGatewayType + + // Instance count for the service. + InstanceCount *int32 + + // Instance type for the service. + InstanceSize *ServiceSize +} + +// GetServiceResourceCreateUpdateProperties implements the ServiceResourceCreateUpdatePropertiesClassification interface for +// type SQLDedicatedGatewayServiceResourceCreateUpdateProperties. +func (s *SQLDedicatedGatewayServiceResourceCreateUpdateProperties) GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties { + return &ServiceResourceCreateUpdateProperties{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } +} + // SQLDedicatedGatewayServiceResourceProperties - Properties for SqlDedicatedGatewayServiceResource. type SQLDedicatedGatewayServiceResourceProperties struct { // REQUIRED; ServiceType for the service. @@ -5070,6 +5136,9 @@ type SQLDedicatedGatewayServiceResourceProperties struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any + // DedicatedGatewayType for the service. + DedicatedGatewayType *DedicatedGatewayType + // Instance count for the service. InstanceCount *int32 @@ -5526,22 +5595,28 @@ type ServiceResource struct { Type *string } -// ServiceResourceCreateUpdateParameters - Parameters for Create or Update Request for ServiceResource +// ServiceResourceCreateUpdateParameters - Parameters for Create or Update request for ServiceResource type ServiceResourceCreateUpdateParameters struct { // Properties in ServiceResourceCreateUpdateParameters. - Properties *ServiceResourceCreateUpdateProperties + Properties ServiceResourceCreateUpdatePropertiesClassification } // ServiceResourceCreateUpdateProperties - Properties in ServiceResourceCreateUpdateParameters. type ServiceResourceCreateUpdateProperties struct { + // REQUIRED; ServiceType for the service. + ServiceType *ServiceType + // Instance count for the service. InstanceCount *int32 // Instance type for the service. InstanceSize *ServiceSize +} - // ServiceType for the service. - ServiceType *ServiceType +// GetServiceResourceCreateUpdateProperties implements the ServiceResourceCreateUpdatePropertiesClassification interface for +// type ServiceResourceCreateUpdateProperties. +func (s *ServiceResourceCreateUpdateProperties) GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties { + return s } // ServiceResourceListResult - The List operation response, that contains the Service Resource and their properties. diff --git a/sdk/resourcemanager/cosmos/armcosmos/models_serde.go b/sdk/resourcemanager/cosmos/armcosmos/models_serde.go index 8ef5b4086a22..5a79c148557b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/models_serde.go +++ b/sdk/resourcemanager/cosmos/armcosmos/models_serde.go @@ -125,6 +125,115 @@ func (a *ARMResourceProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AccessRule. +func (a AccessRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessRule. +func (a *AccessRule) 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 "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + 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 AccessRuleProperties. +func (a AccessRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", a.AddressPrefixes) + populate(objectMap, "direction", a.Direction) + populate(objectMap, "emailAddresses", a.EmailAddresses) + populate(objectMap, "fullyQualifiedDomainNames", a.FullyQualifiedDomainNames) + populate(objectMap, "networkSecurityPerimeters", a.NetworkSecurityPerimeters) + populate(objectMap, "phoneNumbers", a.PhoneNumbers) + populate(objectMap, "subscriptions", a.Subscriptions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessRuleProperties. +func (a *AccessRuleProperties) 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 "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &a.AddressPrefixes) + delete(rawMsg, key) + case "direction": + err = unpopulate(val, "Direction", &a.Direction) + delete(rawMsg, key) + case "emailAddresses": + err = unpopulate(val, "EmailAddresses", &a.EmailAddresses) + delete(rawMsg, key) + case "fullyQualifiedDomainNames": + err = unpopulate(val, "FullyQualifiedDomainNames", &a.FullyQualifiedDomainNames) + delete(rawMsg, key) + case "networkSecurityPerimeters": + err = unpopulate(val, "NetworkSecurityPerimeters", &a.NetworkSecurityPerimeters) + delete(rawMsg, key) + case "phoneNumbers": + err = unpopulate(val, "PhoneNumbers", &a.PhoneNumbers) + delete(rawMsg, key) + case "subscriptions": + err = unpopulate(val, "Subscriptions", &a.Subscriptions) + 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 AccessRulePropertiesSubscriptionsItem. +func (a AccessRulePropertiesSubscriptionsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessRulePropertiesSubscriptionsItem. +func (a *AccessRulePropertiesSubscriptionsItem) 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 "id": + err = unpopulate(val, "ID", &a.ID) + 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 AccountKeyMetadata. func (a AccountKeyMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -614,6 +723,53 @@ func (c *Capacity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CapacityModeChangeTransitionState. +func (c CapacityModeChangeTransitionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "capacityModeLastSuccessfulTransitionEndTimestamp", c.CapacityModeLastSuccessfulTransitionEndTimestamp) + populateDateTimeRFC3339(objectMap, "capacityModeTransitionBeginTimestamp", c.CapacityModeTransitionBeginTimestamp) + populateDateTimeRFC3339(objectMap, "capacityModeTransitionEndTimestamp", c.CapacityModeTransitionEndTimestamp) + populate(objectMap, "capacityModeTransitionStatus", c.CapacityModeTransitionStatus) + populate(objectMap, "currentCapacityMode", c.CurrentCapacityMode) + populate(objectMap, "previousCapacityMode", c.PreviousCapacityMode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityModeChangeTransitionState. +func (c *CapacityModeChangeTransitionState) 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 "capacityModeLastSuccessfulTransitionEndTimestamp": + err = unpopulateDateTimeRFC3339(val, "CapacityModeLastSuccessfulTransitionEndTimestamp", &c.CapacityModeLastSuccessfulTransitionEndTimestamp) + delete(rawMsg, key) + case "capacityModeTransitionBeginTimestamp": + err = unpopulateDateTimeRFC3339(val, "CapacityModeTransitionBeginTimestamp", &c.CapacityModeTransitionBeginTimestamp) + delete(rawMsg, key) + case "capacityModeTransitionEndTimestamp": + err = unpopulateDateTimeRFC3339(val, "CapacityModeTransitionEndTimestamp", &c.CapacityModeTransitionEndTimestamp) + delete(rawMsg, key) + case "capacityModeTransitionStatus": + err = unpopulate(val, "CapacityModeTransitionStatus", &c.CapacityModeTransitionStatus) + delete(rawMsg, key) + case "currentCapacityMode": + err = unpopulate(val, "CurrentCapacityMode", &c.CurrentCapacityMode) + delete(rawMsg, key) + case "previousCapacityMode": + err = unpopulate(val, "PreviousCapacityMode", &c.PreviousCapacityMode) + 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 CassandraClusterPublicStatus. func (c CassandraClusterPublicStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1755,72 +1911,6 @@ func (c *Certificate) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest. -func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest. -func (c *CheckNameAvailabilityRequest) 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 "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - 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 CheckNameAvailabilityResponse. -func (c CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "message", c.Message) - populate(objectMap, "nameAvailable", c.NameAvailable) - populate(objectMap, "reason", c.Reason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse. -func (c *CheckNameAvailabilityResponse) 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 "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "nameAvailable": - err = unpopulate(val, "NameAvailable", &c.NameAvailable) - delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &c.Reason) - 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 ClientEncryptionIncludedPath. func (c ClientEncryptionIncludedPath) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2775,37 +2865,6 @@ func (c *ConnectionError) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ConnectionString. -func (c ConnectionString) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "connectionString", c.ConnectionString) - populate(objectMap, "description", c.Description) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionString. -func (c *ConnectionString) 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 "connectionString": - err = unpopulate(val, "ConnectionString", &c.ConnectionString) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &c.Description) - 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 ConsistencyPolicy. func (c ConsistencyPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3461,6 +3520,41 @@ func (d *DataTransferServiceResource) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResourceCreateUpdateProperties. +func (d DataTransferServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceCount", d.InstanceCount) + populate(objectMap, "instanceSize", d.InstanceSize) + objectMap["serviceType"] = ServiceTypeDataTransfer + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferServiceResourceCreateUpdateProperties. +func (d *DataTransferServiceResourceCreateUpdateProperties) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceCount": + err = unpopulate(val, "InstanceCount", &d.InstanceCount) + delete(rawMsg, key) + case "instanceSize": + err = unpopulate(val, "InstanceSize", &d.InstanceSize) + delete(rawMsg, key) + case "serviceType": + err = unpopulate(val, "ServiceType", &d.ServiceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResourceProperties. func (d DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3625,6 +3719,7 @@ func (d DatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "backupPolicy", d.BackupPolicy) populate(objectMap, "capabilities", d.Capabilities) populate(objectMap, "capacity", d.Capacity) + populate(objectMap, "capacityMode", d.CapacityMode) populate(objectMap, "connectorOffer", d.ConnectorOffer) populate(objectMap, "consistencyPolicy", d.ConsistencyPolicy) populate(objectMap, "cors", d.Cors) @@ -3684,6 +3779,9 @@ func (d *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(data []byte) error case "capacity": err = unpopulate(val, "Capacity", &d.Capacity) delete(rawMsg, key) + case "capacityMode": + err = unpopulate(val, "CapacityMode", &d.CapacityMode) + delete(rawMsg, key) case "connectorOffer": err = unpopulate(val, "ConnectorOffer", &d.ConnectorOffer) delete(rawMsg, key) @@ -3796,6 +3894,8 @@ func (d DatabaseAccountGetProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "backupPolicy", d.BackupPolicy) populate(objectMap, "capabilities", d.Capabilities) populate(objectMap, "capacity", d.Capacity) + populate(objectMap, "capacityMode", d.CapacityMode) + populate(objectMap, "capacityModeChangeTransitionState", d.CapacityModeChangeTransitionState) populate(objectMap, "connectorOffer", d.ConnectorOffer) populate(objectMap, "consistencyPolicy", d.ConsistencyPolicy) populate(objectMap, "cors", d.Cors) @@ -3862,6 +3962,12 @@ func (d *DatabaseAccountGetProperties) UnmarshalJSON(data []byte) error { case "capacity": err = unpopulate(val, "Capacity", &d.Capacity) delete(rawMsg, key) + case "capacityMode": + err = unpopulate(val, "CapacityMode", &d.CapacityMode) + delete(rawMsg, key) + case "capacityModeChangeTransitionState": + err = unpopulate(val, "CapacityModeChangeTransitionState", &d.CapacityModeChangeTransitionState) + delete(rawMsg, key) case "connectorOffer": err = unpopulate(val, "ConnectorOffer", &d.ConnectorOffer) delete(rawMsg, key) @@ -4256,6 +4362,7 @@ func (d DatabaseAccountUpdateProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "backupPolicy", d.BackupPolicy) populate(objectMap, "capabilities", d.Capabilities) populate(objectMap, "capacity", d.Capacity) + populate(objectMap, "capacityMode", d.CapacityMode) populate(objectMap, "connectorOffer", d.ConnectorOffer) populate(objectMap, "consistencyPolicy", d.ConsistencyPolicy) populate(objectMap, "cors", d.Cors) @@ -4312,6 +4419,9 @@ func (d *DatabaseAccountUpdateProperties) UnmarshalJSON(data []byte) error { case "capacity": err = unpopulate(val, "Capacity", &d.Capacity) delete(rawMsg, key) + case "capacityMode": + err = unpopulate(val, "CapacityMode", &d.CapacityMode) + delete(rawMsg, key) case "connectorOffer": err = unpopulate(val, "ConnectorOffer", &d.ConnectorOffer) delete(rawMsg, key) @@ -4569,8 +4679,7 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorResponse. func (e ErrorResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "code", e.Code) - populate(objectMap, "message", e.Message) + populate(objectMap, "error", e.Error) return json.Marshal(objectMap) } @@ -4583,11 +4692,8 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) + case "error": + err = unpopulate(val, "Error", &e.Error) delete(rawMsg, key) } if err != nil { @@ -4600,7 +4706,8 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorResponseAutoGenerated. func (e ErrorResponseAutoGenerated) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "error", e.Error) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) return json.Marshal(objectMap) } @@ -4613,8 +4720,11 @@ func (e *ErrorResponseAutoGenerated) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "error": - err = unpopulate(val, "Error", &e.Error) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) delete(rawMsg, key) } if err != nil { @@ -4748,127 +4858,54 @@ func (f *FailoverPolicy) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type FirewallRule. -func (f FirewallRule) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeRegionalServiceResource. +func (g GraphAPIComputeRegionalServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", f.ID) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "systemData", f.SystemData) - populate(objectMap, "type", f.Type) + populate(objectMap, "graphApiComputeEndpoint", g.GraphAPIComputeEndpoint) + populate(objectMap, "location", g.Location) + populate(objectMap, "name", g.Name) + populate(objectMap, "status", g.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRule. -func (f *FirewallRule) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeRegionalServiceResource. +func (g *GraphAPIComputeRegionalServiceResource) 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", f, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &f.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) + case "graphApiComputeEndpoint": + err = unpopulate(val, "GraphAPIComputeEndpoint", &g.GraphAPIComputeEndpoint) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &f.Properties) + case "location": + err = unpopulate(val, "Location", &g.Location) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &f.SystemData) + case "name": + err = unpopulate(val, "Name", &g.Name) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &f.Type) + case "status": + err = unpopulate(val, "Status", &g.Status) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallRuleListResult. -func (f FirewallRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", f.NextLink) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleListResult. -func (f *FirewallRuleListResult) 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", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &f.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &f.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallRuleProperties. -func (f FirewallRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "endIpAddress", f.EndIPAddress) - populate(objectMap, "provisioningState", f.ProvisioningState) - populate(objectMap, "startIpAddress", f.StartIPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleProperties. -func (f *FirewallRuleProperties) 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", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endIpAddress": - err = unpopulate(val, "EndIPAddress", &f.EndIPAddress) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) - delete(rawMsg, key) - case "startIpAddress": - err = unpopulate(val, "StartIPAddress", &f.StartIPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeRegionalServiceResource. -func (g GraphAPIComputeRegionalServiceResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResource. +func (g GraphAPIComputeServiceResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "graphApiComputeEndpoint", g.GraphAPIComputeEndpoint) - populate(objectMap, "location", g.Location) - populate(objectMap, "name", g.Name) - populate(objectMap, "status", g.Status) + populate(objectMap, "properties", g.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeRegionalServiceResource. -func (g *GraphAPIComputeRegionalServiceResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResource. +func (g *GraphAPIComputeServiceResource) 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", g, err) @@ -4876,17 +4913,8 @@ func (g *GraphAPIComputeRegionalServiceResource) UnmarshalJSON(data []byte) erro for key, val := range rawMsg { var err error switch key { - case "graphApiComputeEndpoint": - err = unpopulate(val, "GraphAPIComputeEndpoint", &g.GraphAPIComputeEndpoint) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &g.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &g.Status) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) delete(rawMsg, key) } if err != nil { @@ -4896,15 +4924,17 @@ func (g *GraphAPIComputeRegionalServiceResource) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResource. -func (g GraphAPIComputeServiceResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResourceCreateUpdateProperties. +func (g GraphAPIComputeServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", g.Properties) + populate(objectMap, "instanceCount", g.InstanceCount) + populate(objectMap, "instanceSize", g.InstanceSize) + objectMap["serviceType"] = ServiceTypeGraphAPICompute return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResource. -func (g *GraphAPIComputeServiceResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResourceCreateUpdateProperties. +func (g *GraphAPIComputeServiceResourceCreateUpdateProperties) 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", g, err) @@ -4912,8 +4942,14 @@ func (g *GraphAPIComputeServiceResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "Properties", &g.Properties) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &g.InstanceCount) + delete(rawMsg, key) + case "instanceSize": + err = unpopulate(val, "InstanceSize", &g.InstanceSize) + delete(rawMsg, key) + case "serviceType": + err = unpopulate(val, "ServiceType", &g.ServiceType) delete(rawMsg, key) } if err != nil { @@ -6212,33 +6248,6 @@ func (l *ListCommands) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ListConnectionStringsResult. -func (l ListConnectionStringsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "connectionStrings", l.ConnectionStrings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListConnectionStringsResult. -func (l *ListConnectionStringsResult) 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 "connectionStrings": - err = unpopulate(val, "ConnectionStrings", &l.ConnectionStrings) - 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 ListDataCenters. func (l ListDataCenters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6679,6 +6688,41 @@ func (m *MaterializedViewsBuilderServiceResource) UnmarshalJSON(data []byte) err return nil } +// MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResourceCreateUpdateProperties. +func (m MaterializedViewsBuilderServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceCount", m.InstanceCount) + populate(objectMap, "instanceSize", m.InstanceSize) + objectMap["serviceType"] = ServiceTypeMaterializedViewsBuilder + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderServiceResourceCreateUpdateProperties. +func (m *MaterializedViewsBuilderServiceResourceCreateUpdateProperties) 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 "instanceCount": + err = unpopulate(val, "InstanceCount", &m.InstanceCount) + delete(rawMsg, key) + case "instanceSize": + err = unpopulate(val, "InstanceSize", &m.InstanceSize) + delete(rawMsg, key) + case "serviceType": + err = unpopulate(val, "ServiceType", &m.ServiceType) + 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 MaterializedViewsBuilderServiceResourceProperties. func (m MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6917,246 +6961,23 @@ func (m *MetricDefinitionsListResult) UnmarshalJSON(data []byte) error { } // MarshalJSON implements the json.Marshaller interface for type MetricListResult. -func (m MetricListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricListResult. -func (m *MetricListResult) 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 "value": - err = unpopulate(val, "Value", &m.Value) - 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 MetricName. -func (m MetricName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "localizedValue", m.LocalizedValue) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricName. -func (m *MetricName) 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 "localizedValue": - err = unpopulate(val, "LocalizedValue", &m.LocalizedValue) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - 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 MetricValue. -func (m MetricValue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "average", m.Average) - populate(objectMap, "_count", m.Count) - populate(objectMap, "maximum", m.Maximum) - populate(objectMap, "minimum", m.Minimum) - populateDateTimeRFC3339(objectMap, "timestamp", m.Timestamp) - populate(objectMap, "total", m.Total) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricValue. -func (m *MetricValue) 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 "average": - err = unpopulate(val, "Average", &m.Average) - delete(rawMsg, key) - case "_count": - err = unpopulate(val, "Count", &m.Count) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &m.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &m.Minimum) - delete(rawMsg, key) - case "timestamp": - err = unpopulateDateTimeRFC3339(val, "Timestamp", &m.Timestamp) - delete(rawMsg, key) - case "total": - err = unpopulate(val, "Total", &m.Total) - 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 MongoCluster. -func (m MongoCluster) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoCluster. -func (m *MongoCluster) 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 "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - 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 MongoClusterListResult. -func (m MongoClusterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoClusterListResult. -func (m *MongoClusterListResult) 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 "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - 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 MongoClusterProperties. -func (m MongoClusterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "administratorLogin", m.AdministratorLogin) - populate(objectMap, "administratorLoginPassword", m.AdministratorLoginPassword) - populate(objectMap, "clusterStatus", m.ClusterStatus) - populate(objectMap, "connectionString", m.ConnectionString) - populate(objectMap, "createMode", m.CreateMode) - populate(objectMap, "earliestRestoreTime", m.EarliestRestoreTime) - populate(objectMap, "nodeGroupSpecs", m.NodeGroupSpecs) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "restoreParameters", m.RestoreParameters) - populate(objectMap, "serverVersion", m.ServerVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoClusterProperties. -func (m *MongoClusterProperties) 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 "administratorLogin": - err = unpopulate(val, "AdministratorLogin", &m.AdministratorLogin) - delete(rawMsg, key) - case "administratorLoginPassword": - err = unpopulate(val, "AdministratorLoginPassword", &m.AdministratorLoginPassword) - delete(rawMsg, key) - case "clusterStatus": - err = unpopulate(val, "ClusterStatus", &m.ClusterStatus) - delete(rawMsg, key) - case "connectionString": - err = unpopulate(val, "ConnectionString", &m.ConnectionString) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &m.CreateMode) - delete(rawMsg, key) - case "earliestRestoreTime": - err = unpopulate(val, "EarliestRestoreTime", &m.EarliestRestoreTime) - delete(rawMsg, key) - case "nodeGroupSpecs": - err = unpopulate(val, "NodeGroupSpecs", &m.NodeGroupSpecs) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "restoreParameters": - err = unpopulate(val, "RestoreParameters", &m.RestoreParameters) - delete(rawMsg, key) - case "serverVersion": - err = unpopulate(val, "ServerVersion", &m.ServerVersion) +func (m MetricListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricListResult. +func (m *MetricListResult) 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 "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -7166,16 +6987,16 @@ func (m *MongoClusterProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoClusterRestoreParameters. -func (m MongoClusterRestoreParameters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MetricName. +func (m MetricName) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "pointInTimeUTC", m.PointInTimeUTC) - populate(objectMap, "sourceResourceId", m.SourceResourceID) + populate(objectMap, "localizedValue", m.LocalizedValue) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoClusterRestoreParameters. -func (m *MongoClusterRestoreParameters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricName. +func (m *MetricName) 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) @@ -7183,11 +7004,11 @@ func (m *MongoClusterRestoreParameters) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "pointInTimeUTC": - err = unpopulateDateTimeRFC3339(val, "PointInTimeUTC", &m.PointInTimeUTC) + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &m.LocalizedValue) delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &m.SourceResourceID) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -7197,16 +7018,20 @@ func (m *MongoClusterRestoreParameters) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MongoClusterUpdate. -func (m MongoClusterUpdate) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MetricValue. +func (m MetricValue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "tags", m.Tags) + populate(objectMap, "average", m.Average) + populate(objectMap, "_count", m.Count) + populate(objectMap, "maximum", m.Maximum) + populate(objectMap, "minimum", m.Minimum) + populateDateTimeRFC3339(objectMap, "timestamp", m.Timestamp) + populate(objectMap, "total", m.Total) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MongoClusterUpdate. -func (m *MongoClusterUpdate) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricValue. +func (m *MetricValue) 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) @@ -7214,11 +7039,23 @@ func (m *MongoClusterUpdate) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "average": + err = unpopulate(val, "Average", &m.Average) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "_count": + err = unpopulate(val, "Count", &m.Count) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &m.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &m.Minimum) + delete(rawMsg, key) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &m.Timestamp) + delete(rawMsg, key) + case "total": + err = unpopulate(val, "Total", &m.Total) delete(rawMsg, key) } if err != nil { @@ -8264,17 +8101,17 @@ func (m *MongoUserDefinitionResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type NodeGroupProperties. -func (n NodeGroupProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeter. +func (n NetworkSecurityPerimeter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "diskSizeGB", n.DiskSizeGB) - populate(objectMap, "enableHa", n.EnableHa) - populate(objectMap, "sku", n.SKU) + populate(objectMap, "id", n.ID) + populate(objectMap, "location", n.Location) + populate(objectMap, "perimeterGuid", n.PerimeterGUID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NodeGroupProperties. -func (n *NodeGroupProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeter. +func (n *NetworkSecurityPerimeter) 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) @@ -8282,14 +8119,14 @@ func (n *NodeGroupProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "diskSizeGB": - err = unpopulate(val, "DiskSizeGB", &n.DiskSizeGB) + case "id": + err = unpopulate(val, "ID", &n.ID) delete(rawMsg, key) - case "enableHa": - err = unpopulate(val, "EnableHa", &n.EnableHa) + case "location": + err = unpopulate(val, "Location", &n.Location) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &n.SKU) + case "perimeterGuid": + err = unpopulate(val, "PerimeterGUID", &n.PerimeterGUID) delete(rawMsg, key) } if err != nil { @@ -8299,19 +8136,19 @@ func (n *NodeGroupProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type NodeGroupSpec. -func (n NodeGroupSpec) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfiguration. +func (n NetworkSecurityPerimeterConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "diskSizeGB", n.DiskSizeGB) - populate(objectMap, "enableHa", n.EnableHa) - populate(objectMap, "kind", n.Kind) - populate(objectMap, "nodeCount", n.NodeCount) - populate(objectMap, "sku", n.SKU) + populate(objectMap, "id", n.ID) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "systemData", n.SystemData) + populate(objectMap, "type", n.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NodeGroupSpec. -func (n *NodeGroupSpec) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfiguration. +func (n *NetworkSecurityPerimeterConfiguration) 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) @@ -8319,20 +8156,137 @@ func (n *NodeGroupSpec) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "diskSizeGB": - err = unpopulate(val, "DiskSizeGB", &n.DiskSizeGB) + case "id": + err = unpopulate(val, "ID", &n.ID) delete(rawMsg, key) - case "enableHa": - err = unpopulate(val, "EnableHa", &n.EnableHa) + case "name": + err = unpopulate(val, "Name", &n.Name) delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &n.Kind) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) delete(rawMsg, key) - case "nodeCount": - err = unpopulate(val, "NodeCount", &n.NodeCount) + case "systemData": + err = unpopulate(val, "SystemData", &n.SystemData) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &n.SKU) + case "type": + err = unpopulate(val, "Type", &n.Type) + 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 NetworkSecurityPerimeterConfigurationListResult. +func (n NetworkSecurityPerimeterConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationListResult. +func (n *NetworkSecurityPerimeterConfigurationListResult) 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 "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + 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 NetworkSecurityPerimeterConfigurationProperties. +func (n NetworkSecurityPerimeterConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkSecurityPerimeter", n.NetworkSecurityPerimeter) + populate(objectMap, "profile", n.Profile) + populate(objectMap, "provisioningIssues", n.ProvisioningIssues) + populate(objectMap, "provisioningState", n.ProvisioningState) + populate(objectMap, "resourceAssociation", n.ResourceAssociation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationProperties. +func (n *NetworkSecurityPerimeterConfigurationProperties) 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 "networkSecurityPerimeter": + err = unpopulate(val, "NetworkSecurityPerimeter", &n.NetworkSecurityPerimeter) + delete(rawMsg, key) + case "profile": + err = unpopulate(val, "Profile", &n.Profile) + delete(rawMsg, key) + case "provisioningIssues": + err = unpopulate(val, "ProvisioningIssues", &n.ProvisioningIssues) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) + delete(rawMsg, key) + case "resourceAssociation": + err = unpopulate(val, "ResourceAssociation", &n.ResourceAssociation) + 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 NetworkSecurityProfile. +func (n NetworkSecurityProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessRules", n.AccessRules) + populate(objectMap, "accessRulesVersion", n.AccessRulesVersion) + populate(objectMap, "diagnosticSettingsVersion", n.DiagnosticSettingsVersion) + populate(objectMap, "enabledLogCategories", n.EnabledLogCategories) + populate(objectMap, "name", n.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityProfile. +func (n *NetworkSecurityProfile) 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 "accessRules": + err = unpopulate(val, "AccessRules", &n.AccessRules) + delete(rawMsg, key) + case "accessRulesVersion": + err = unpopulate(val, "AccessRulesVersion", &n.AccessRulesVersion) + delete(rawMsg, key) + case "diagnosticSettingsVersion": + err = unpopulate(val, "DiagnosticSettingsVersion", &n.DiagnosticSettingsVersion) + delete(rawMsg, key) + case "enabledLogCategories": + err = unpopulate(val, "EnabledLogCategories", &n.EnabledLogCategories) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) delete(rawMsg, key) } if err != nil { @@ -9301,6 +9255,7 @@ func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) populate(objectMap, "properties", p.Properties) + populate(objectMap, "systemData", p.SystemData) populate(objectMap, "type", p.Type) return json.Marshal(objectMap) } @@ -9323,6 +9278,9 @@ func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &p.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) @@ -9625,17 +9583,16 @@ func (p *PrivilegeResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProxyResource. -func (p ProxyResource) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProvisioningIssue. +func (p ProvisioningIssue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) - populate(objectMap, "type", p.Type) + populate(objectMap, "properties", p.Properties) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. -func (p *ProxyResource) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssue. +func (p *ProvisioningIssue) 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", p, err) @@ -9643,14 +9600,54 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProvisioningIssueProperties. +func (p ProvisioningIssueProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", p.Description) + populate(objectMap, "issueType", p.IssueType) + populate(objectMap, "severity", p.Severity) + populate(objectMap, "suggestedAccessRules", p.SuggestedAccessRules) + populate(objectMap, "suggestedResourceIds", p.SuggestedResourceIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssueProperties. +func (p *ProvisioningIssueProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "issueType": + err = unpopulate(val, "IssueType", &p.IssueType) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &p.Severity) + delete(rawMsg, key) + case "suggestedAccessRules": + err = unpopulate(val, "SuggestedAccessRules", &p.SuggestedAccessRules) + delete(rawMsg, key) + case "suggestedResourceIds": + err = unpopulate(val, "SuggestedResourceIDs", &p.SuggestedResourceIDs) delete(rawMsg, key) } if err != nil { @@ -9660,8 +9657,8 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProxyResourceAutoGenerated. -func (p ProxyResourceAutoGenerated) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProxyResource. +func (p ProxyResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -9670,8 +9667,8 @@ func (p ProxyResourceAutoGenerated) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceAutoGenerated. -func (p *ProxyResourceAutoGenerated) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. +func (p *ProxyResource) 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", p, err) @@ -9879,6 +9876,7 @@ func (r Resource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) + populate(objectMap, "systemData", r.SystemData) populate(objectMap, "type", r.Type) return json.Marshal(objectMap) } @@ -9898,6 +9896,9 @@ func (r *Resource) UnmarshalJSON(data []byte) error { case "name": err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) @@ -9909,18 +9910,16 @@ func (r *Resource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceAutoGenerated. -func (r ResourceAutoGenerated) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ResourceAssociation. +func (r ResourceAssociation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) + populate(objectMap, "accessMode", r.AccessMode) populate(objectMap, "name", r.Name) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "type", r.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAutoGenerated. -func (r *ResourceAutoGenerated) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAssociation. +func (r *ResourceAssociation) 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) @@ -9928,18 +9927,12 @@ func (r *ResourceAutoGenerated) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) + case "accessMode": + err = unpopulate(val, "AccessMode", &r.AccessMode) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", r, err) @@ -12592,10 +12585,50 @@ func (s *SQLDedicatedGatewayServiceResource) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SQLDedicatedGatewayServiceResourceCreateUpdateProperties. +func (s SQLDedicatedGatewayServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dedicatedGatewayType", s.DedicatedGatewayType) + populate(objectMap, "instanceCount", s.InstanceCount) + populate(objectMap, "instanceSize", s.InstanceSize) + objectMap["serviceType"] = ServiceTypeSQLDedicatedGateway + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLDedicatedGatewayServiceResourceCreateUpdateProperties. +func (s *SQLDedicatedGatewayServiceResourceCreateUpdateProperties) 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 "dedicatedGatewayType": + err = unpopulate(val, "DedicatedGatewayType", &s.DedicatedGatewayType) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &s.InstanceCount) + delete(rawMsg, key) + case "instanceSize": + err = unpopulate(val, "InstanceSize", &s.InstanceSize) + delete(rawMsg, key) + case "serviceType": + err = unpopulate(val, "ServiceType", &s.ServiceType) + 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 SQLDedicatedGatewayServiceResourceProperties. func (s SQLDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populateDateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populate(objectMap, "dedicatedGatewayType", s.DedicatedGatewayType) populate(objectMap, "instanceCount", s.InstanceCount) populate(objectMap, "instanceSize", s.InstanceSize) populate(objectMap, "locations", s.Locations) @@ -12622,6 +12655,9 @@ func (s *SQLDedicatedGatewayServiceResourceProperties) UnmarshalJSON(data []byte case "creationTime": err = unpopulateDateTimeRFC3339(val, "CreationTime", &s.CreationTime) delete(rawMsg, key) + case "dedicatedGatewayType": + err = unpopulate(val, "DedicatedGatewayType", &s.DedicatedGatewayType) + delete(rawMsg, key) case "instanceCount": err = unpopulate(val, "InstanceCount", &s.InstanceCount) delete(rawMsg, key) @@ -13800,7 +13836,7 @@ func (s *ServiceResourceCreateUpdateParameters) UnmarshalJSON(data []byte) error var err error switch key { case "properties": - err = unpopulate(val, "Properties", &s.Properties) + s.Properties, err = unmarshalServiceResourceCreateUpdatePropertiesClassification(val) delete(rawMsg, key) } if err != nil { @@ -13815,7 +13851,7 @@ func (s ServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "instanceCount", s.InstanceCount) populate(objectMap, "instanceSize", s.InstanceSize) - populate(objectMap, "serviceType", s.ServiceType) + objectMap["serviceType"] = s.ServiceType return json.Marshal(objectMap) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/mongoclusters_client.go b/sdk/resourcemanager/cosmos/armcosmos/mongoclusters_client.go deleted file mode 100644 index dc87e8b28173..000000000000 --- a/sdk/resourcemanager/cosmos/armcosmos/mongoclusters_client.go +++ /dev/null @@ -1,898 +0,0 @@ -//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 armcosmos - -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" -) - -// MongoClustersClient contains the methods for the MongoClusters group. -// Don't use this type directly, use NewMongoClustersClient() instead. -type MongoClustersClient struct { - internal *arm.Client - subscriptionID string -} - -// NewMongoClustersClient creates a new instance of MongoClustersClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewMongoClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MongoClustersClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &MongoClustersClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CheckNameAvailability - Check the availability of name for resource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -// - location - The name of the Azure region. -// - parameters - The required parameters for checking if resource name is available. -// - options - MongoClustersClientCheckNameAvailabilityOptions contains the optional parameters for the MongoClustersClient.CheckNameAvailability -// method. -func (client *MongoClustersClient) CheckNameAvailability(ctx context.Context, location string, parameters CheckNameAvailabilityRequest, options *MongoClustersClientCheckNameAvailabilityOptions) (MongoClustersClientCheckNameAvailabilityResponse, error) { - var err error - const operationName = "MongoClustersClient.CheckNameAvailability" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.checkNameAvailabilityCreateRequest(ctx, location, parameters, options) - if err != nil { - return MongoClustersClientCheckNameAvailabilityResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return MongoClustersClientCheckNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return MongoClustersClientCheckNameAvailabilityResponse{}, err - } - resp, err := client.checkNameAvailabilityHandleResponse(httpResp) - return resp, err -} - -// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *MongoClustersClient) checkNameAvailabilityCreateRequest(ctx context.Context, location string, parameters CheckNameAvailabilityRequest, options *MongoClustersClientCheckNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/checkMongoClusterNameAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - -// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. -func (client *MongoClustersClient) checkNameAvailabilityHandleResponse(resp *http.Response) (MongoClustersClientCheckNameAvailabilityResponse, error) { - result := MongoClustersClientCheckNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityResponse); err != nil { - return MongoClustersClientCheckNameAvailabilityResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify -// some of the properties, use PATCH. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - mongoClusterName - The name of the mongo cluster. -// - parameters - The required parameters for creating or updating a mongo cluster. -// - options - MongoClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the MongoClustersClient.BeginCreateOrUpdate -// method. -func (client *MongoClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, mongoClusterName string, parameters MongoCluster, options *MongoClustersClientBeginCreateOrUpdateOptions) (*runtime.Poller[MongoClustersClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, mongoClusterName, parameters, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoClustersClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MongoClustersClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some -// of the properties, use PATCH. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -func (client *MongoClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, mongoClusterName string, parameters MongoCluster, options *MongoClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "MongoClustersClient.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, mongoClusterName, parameters, 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 *MongoClustersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, mongoClusterName string, parameters MongoCluster, options *MongoClustersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}" - 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 mongoClusterName == "" { - return nil, errors.New("parameter mongoClusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mongoClusterName}", url.PathEscape(mongoClusterName)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - -// BeginCreateOrUpdateFirewallRule - Creates a new firewall rule or updates an existing firewall rule on a mongo cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - mongoClusterName - The name of the mongo cluster. -// - firewallRuleName - The name of the mongo cluster firewall rule. -// - parameters - The required parameters for creating or updating a firewall rule. -// - options - MongoClustersClientBeginCreateOrUpdateFirewallRuleOptions contains the optional parameters for the MongoClustersClient.BeginCreateOrUpdateFirewallRule -// method. -func (client *MongoClustersClient) BeginCreateOrUpdateFirewallRule(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, parameters FirewallRule, options *MongoClustersClientBeginCreateOrUpdateFirewallRuleOptions) (*runtime.Poller[MongoClustersClientCreateOrUpdateFirewallRuleResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdateFirewallRule(ctx, resourceGroupName, mongoClusterName, firewallRuleName, parameters, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoClustersClientCreateOrUpdateFirewallRuleResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MongoClustersClientCreateOrUpdateFirewallRuleResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdateFirewallRule - Creates a new firewall rule or updates an existing firewall rule on a mongo cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -func (client *MongoClustersClient) createOrUpdateFirewallRule(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, parameters FirewallRule, options *MongoClustersClientBeginCreateOrUpdateFirewallRuleOptions) (*http.Response, error) { - var err error - const operationName = "MongoClustersClient.BeginCreateOrUpdateFirewallRule" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.createOrUpdateFirewallRuleCreateRequest(ctx, resourceGroupName, mongoClusterName, firewallRuleName, parameters, 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 -} - -// createOrUpdateFirewallRuleCreateRequest creates the CreateOrUpdateFirewallRule request. -func (client *MongoClustersClient) createOrUpdateFirewallRuleCreateRequest(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, parameters FirewallRule, options *MongoClustersClientBeginCreateOrUpdateFirewallRuleOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName}" - 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 mongoClusterName == "" { - return nil, errors.New("parameter mongoClusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mongoClusterName}", url.PathEscape(mongoClusterName)) - if firewallRuleName == "" { - return nil, errors.New("parameter firewallRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallRuleName}", url.PathEscape(firewallRuleName)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - -// BeginDelete - Deletes a mongo cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - mongoClusterName - The name of the mongo cluster. -// - options - MongoClustersClientBeginDeleteOptions contains the optional parameters for the MongoClustersClient.BeginDelete -// method. -func (client *MongoClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, mongoClusterName string, options *MongoClustersClientBeginDeleteOptions) (*runtime.Poller[MongoClustersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, mongoClusterName, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoClustersClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MongoClustersClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Delete - Deletes a mongo cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -func (client *MongoClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, mongoClusterName string, options *MongoClustersClientBeginDeleteOptions) (*http.Response, error) { - var err error - const operationName = "MongoClustersClient.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, mongoClusterName, 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.StatusAccepted, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *MongoClustersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, mongoClusterName string, options *MongoClustersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}" - 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 mongoClusterName == "" { - return nil, errors.New("parameter mongoClusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mongoClusterName}", url.PathEscape(mongoClusterName)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDeleteFirewallRule - Deletes a mongo cluster firewall rule. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - mongoClusterName - The name of the mongo cluster. -// - firewallRuleName - The name of the mongo cluster firewall rule. -// - options - MongoClustersClientBeginDeleteFirewallRuleOptions contains the optional parameters for the MongoClustersClient.BeginDeleteFirewallRule -// method. -func (client *MongoClustersClient) BeginDeleteFirewallRule(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, options *MongoClustersClientBeginDeleteFirewallRuleOptions) (*runtime.Poller[MongoClustersClientDeleteFirewallRuleResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteFirewallRule(ctx, resourceGroupName, mongoClusterName, firewallRuleName, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoClustersClientDeleteFirewallRuleResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MongoClustersClientDeleteFirewallRuleResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// DeleteFirewallRule - Deletes a mongo cluster firewall rule. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -func (client *MongoClustersClient) deleteFirewallRule(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, options *MongoClustersClientBeginDeleteFirewallRuleOptions) (*http.Response, error) { - var err error - const operationName = "MongoClustersClient.BeginDeleteFirewallRule" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteFirewallRuleCreateRequest(ctx, resourceGroupName, mongoClusterName, firewallRuleName, 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.StatusAccepted, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// deleteFirewallRuleCreateRequest creates the DeleteFirewallRule request. -func (client *MongoClustersClient) deleteFirewallRuleCreateRequest(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, options *MongoClustersClientBeginDeleteFirewallRuleOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName}" - 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 mongoClusterName == "" { - return nil, errors.New("parameter mongoClusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mongoClusterName}", url.PathEscape(mongoClusterName)) - if firewallRuleName == "" { - return nil, errors.New("parameter firewallRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallRuleName}", url.PathEscape(firewallRuleName)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets information about a mongo cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - mongoClusterName - The name of the mongo cluster. -// - options - MongoClustersClientGetOptions contains the optional parameters for the MongoClustersClient.Get method. -func (client *MongoClustersClient) Get(ctx context.Context, resourceGroupName string, mongoClusterName string, options *MongoClustersClientGetOptions) (MongoClustersClientGetResponse, error) { - var err error - const operationName = "MongoClustersClient.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, mongoClusterName, options) - if err != nil { - return MongoClustersClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return MongoClustersClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return MongoClustersClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *MongoClustersClient) getCreateRequest(ctx context.Context, resourceGroupName string, mongoClusterName string, options *MongoClustersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}" - 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 mongoClusterName == "" { - return nil, errors.New("parameter mongoClusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mongoClusterName}", url.PathEscape(mongoClusterName)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *MongoClustersClient) getHandleResponse(resp *http.Response) (MongoClustersClientGetResponse, error) { - result := MongoClustersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MongoCluster); err != nil { - return MongoClustersClientGetResponse{}, err - } - return result, nil -} - -// GetFirewallRule - Gets information about a mongo cluster firewall rule. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - mongoClusterName - The name of the mongo cluster. -// - firewallRuleName - The name of the mongo cluster firewall rule. -// - options - MongoClustersClientGetFirewallRuleOptions contains the optional parameters for the MongoClustersClient.GetFirewallRule -// method. -func (client *MongoClustersClient) GetFirewallRule(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, options *MongoClustersClientGetFirewallRuleOptions) (MongoClustersClientGetFirewallRuleResponse, error) { - var err error - const operationName = "MongoClustersClient.GetFirewallRule" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getFirewallRuleCreateRequest(ctx, resourceGroupName, mongoClusterName, firewallRuleName, options) - if err != nil { - return MongoClustersClientGetFirewallRuleResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return MongoClustersClientGetFirewallRuleResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return MongoClustersClientGetFirewallRuleResponse{}, err - } - resp, err := client.getFirewallRuleHandleResponse(httpResp) - return resp, err -} - -// getFirewallRuleCreateRequest creates the GetFirewallRule request. -func (client *MongoClustersClient) getFirewallRuleCreateRequest(ctx context.Context, resourceGroupName string, mongoClusterName string, firewallRuleName string, options *MongoClustersClientGetFirewallRuleOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName}" - 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 mongoClusterName == "" { - return nil, errors.New("parameter mongoClusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mongoClusterName}", url.PathEscape(mongoClusterName)) - if firewallRuleName == "" { - return nil, errors.New("parameter firewallRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallRuleName}", url.PathEscape(firewallRuleName)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getFirewallRuleHandleResponse handles the GetFirewallRule response. -func (client *MongoClustersClient) getFirewallRuleHandleResponse(resp *http.Response) (MongoClustersClientGetFirewallRuleResponse, error) { - result := MongoClustersClientGetFirewallRuleResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FirewallRule); err != nil { - return MongoClustersClientGetFirewallRuleResponse{}, err - } - return result, nil -} - -// NewListPager - List all the mongo clusters in a given subscription. -// -// Generated from API version 2024-02-15-preview -// - options - MongoClustersClientListOptions contains the optional parameters for the MongoClustersClient.NewListPager method. -func (client *MongoClustersClient) NewListPager(options *MongoClustersClientListOptions) *runtime.Pager[MongoClustersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[MongoClustersClientListResponse]{ - More: func(page MongoClustersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *MongoClustersClientListResponse) (MongoClustersClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MongoClustersClient.NewListPager") - 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.listCreateRequest(ctx, options) - }, nil) - if err != nil { - return MongoClustersClientListResponse{}, err - } - return client.listHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listCreateRequest creates the List request. -func (client *MongoClustersClient) listCreateRequest(ctx context.Context, options *MongoClustersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/mongoClusters" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *MongoClustersClient) listHandleResponse(resp *http.Response) (MongoClustersClientListResponse, error) { - result := MongoClustersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MongoClusterListResult); err != nil { - return MongoClustersClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List all the mongo clusters in a given resource group. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - options - MongoClustersClientListByResourceGroupOptions contains the optional parameters for the MongoClustersClient.NewListByResourceGroupPager -// method. -func (client *MongoClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *MongoClustersClientListByResourceGroupOptions) *runtime.Pager[MongoClustersClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[MongoClustersClientListByResourceGroupResponse]{ - More: func(page MongoClustersClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *MongoClustersClientListByResourceGroupResponse) (MongoClustersClientListByResourceGroupResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MongoClustersClient.NewListByResourceGroupPager") - 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.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - }, nil) - if err != nil { - return MongoClustersClientListByResourceGroupResponse{}, err - } - return client.listByResourceGroupHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *MongoClustersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *MongoClustersClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters" - 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)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *MongoClustersClient) listByResourceGroupHandleResponse(resp *http.Response) (MongoClustersClientListByResourceGroupResponse, error) { - result := MongoClustersClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MongoClusterListResult); err != nil { - return MongoClustersClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// ListConnectionStrings - List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, -// as well as other connection strings supported by the cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - mongoClusterName - The name of the mongo cluster. -// - options - MongoClustersClientListConnectionStringsOptions contains the optional parameters for the MongoClustersClient.ListConnectionStrings -// method. -func (client *MongoClustersClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, mongoClusterName string, options *MongoClustersClientListConnectionStringsOptions) (MongoClustersClientListConnectionStringsResponse, error) { - var err error - const operationName = "MongoClustersClient.ListConnectionStrings" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.listConnectionStringsCreateRequest(ctx, resourceGroupName, mongoClusterName, options) - if err != nil { - return MongoClustersClientListConnectionStringsResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return MongoClustersClientListConnectionStringsResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return MongoClustersClientListConnectionStringsResponse{}, err - } - resp, err := client.listConnectionStringsHandleResponse(httpResp) - return resp, err -} - -// listConnectionStringsCreateRequest creates the ListConnectionStrings request. -func (client *MongoClustersClient) listConnectionStringsCreateRequest(ctx context.Context, resourceGroupName string, mongoClusterName string, options *MongoClustersClientListConnectionStringsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/listConnectionStrings" - 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 mongoClusterName == "" { - return nil, errors.New("parameter mongoClusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mongoClusterName}", url.PathEscape(mongoClusterName)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listConnectionStringsHandleResponse handles the ListConnectionStrings response. -func (client *MongoClustersClient) listConnectionStringsHandleResponse(resp *http.Response) (MongoClustersClientListConnectionStringsResponse, error) { - result := MongoClustersClientListConnectionStringsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListConnectionStringsResult); err != nil { - return MongoClustersClientListConnectionStringsResponse{}, err - } - return result, nil -} - -// NewListFirewallRulesPager - List all the firewall rules in a given mongo cluster. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - mongoClusterName - The name of the mongo cluster. -// - options - MongoClustersClientListFirewallRulesOptions contains the optional parameters for the MongoClustersClient.NewListFirewallRulesPager -// method. -func (client *MongoClustersClient) NewListFirewallRulesPager(resourceGroupName string, mongoClusterName string, options *MongoClustersClientListFirewallRulesOptions) *runtime.Pager[MongoClustersClientListFirewallRulesResponse] { - return runtime.NewPager(runtime.PagingHandler[MongoClustersClientListFirewallRulesResponse]{ - More: func(page MongoClustersClientListFirewallRulesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *MongoClustersClientListFirewallRulesResponse) (MongoClustersClientListFirewallRulesResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MongoClustersClient.NewListFirewallRulesPager") - 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.listFirewallRulesCreateRequest(ctx, resourceGroupName, mongoClusterName, options) - }, nil) - if err != nil { - return MongoClustersClientListFirewallRulesResponse{}, err - } - return client.listFirewallRulesHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listFirewallRulesCreateRequest creates the ListFirewallRules request. -func (client *MongoClustersClient) listFirewallRulesCreateRequest(ctx context.Context, resourceGroupName string, mongoClusterName string, options *MongoClustersClientListFirewallRulesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules" - 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 mongoClusterName == "" { - return nil, errors.New("parameter mongoClusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mongoClusterName}", url.PathEscape(mongoClusterName)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listFirewallRulesHandleResponse handles the ListFirewallRules response. -func (client *MongoClustersClient) listFirewallRulesHandleResponse(resp *http.Response) (MongoClustersClientListFirewallRulesResponse, error) { - result := MongoClustersClientListFirewallRulesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FirewallRuleListResult); err != nil { - return MongoClustersClientListFirewallRulesResponse{}, err - } - return result, nil -} - -// BeginUpdate - Updates an existing mongo cluster. The request body can contain one to many of the properties present in -// the normal mongo cluster definition. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - mongoClusterName - The name of the mongo cluster. -// - parameters - The parameters for updating a mongo cluster. -// - options - MongoClustersClientBeginUpdateOptions contains the optional parameters for the MongoClustersClient.BeginUpdate -// method. -func (client *MongoClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, mongoClusterName string, parameters MongoClusterUpdate, options *MongoClustersClientBeginUpdateOptions) (*runtime.Poller[MongoClustersClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, mongoClusterName, parameters, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MongoClustersClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MongoClustersClientUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Update - Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal -// mongo cluster definition. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-02-15-preview -func (client *MongoClustersClient) update(ctx context.Context, resourceGroupName string, mongoClusterName string, parameters MongoClusterUpdate, options *MongoClustersClientBeginUpdateOptions) (*http.Response, error) { - var err error - const operationName = "MongoClustersClient.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, mongoClusterName, parameters, 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 *MongoClustersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, mongoClusterName string, parameters MongoClusterUpdate, options *MongoClustersClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}" - 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 mongoClusterName == "" { - return nil, errors.New("parameter mongoClusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mongoClusterName}", url.PathEscape(mongoClusterName)) - 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-02-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} diff --git a/sdk/resourcemanager/cosmos/armcosmos/mongoclusters_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/mongoclusters_client_example_test.go deleted file mode 100644 index b5901c517164..000000000000 --- a/sdk/resourcemanager/cosmos/armcosmos/mongoclusters_client_example_test.go +++ /dev/null @@ -1,784 +0,0 @@ -//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 armcosmos_test - -import ( - "context" - "log" - - "time" - - "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/cosmos/armcosmos/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterList.json -func ExampleMongoClustersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMongoClustersClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.MongoClusterListResult = armcosmos.MongoClusterListResult{ - // Value: []*armcosmos.MongoCluster{ - // { - // Name: to.Ptr("myMongoCluster"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus2"), - // Tags: map[string]*string{ - // "additionalProp1": to.Ptr("string"), - // "additionalProp2": to.Ptr("string"), - // "additionalProp3": to.Ptr("string"), - // }, - // Properties: &armcosmos.MongoClusterProperties{ - // AdministratorLogin: to.Ptr("mongoAdmin"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com"), - // EarliestRestoreTime: to.Ptr("2023-01-13T20:07:35Z"), - // NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - // { - // DiskSizeGB: to.Ptr[int64](128), - // EnableHa: to.Ptr(true), - // SKU: to.Ptr("M30"), - // Kind: to.Ptr(armcosmos.NodeKindShard), - // NodeCount: to.Ptr[int32](4), - // }}, - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // ServerVersion: to.Ptr("5.0"), - // }, - // }, - // { - // Name: to.Ptr("myMongoCluster2"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster2"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user2"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "additionalProp1": to.Ptr("string"), - // }, - // Properties: &armcosmos.MongoClusterProperties{ - // AdministratorLogin: to.Ptr("mongoAdmin"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com"), - // EarliestRestoreTime: to.Ptr("2023-01-10T20:07:35Z"), - // NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - // { - // DiskSizeGB: to.Ptr[int64](256), - // EnableHa: to.Ptr(true), - // SKU: to.Ptr("M40"), - // Kind: to.Ptr(armcosmos.NodeKindShard), - // NodeCount: to.Ptr[int32](2), - // }}, - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // ServerVersion: to.Ptr("5.0"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterListByResourceGroup.json -func ExampleMongoClustersClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMongoClustersClient().NewListByResourceGroupPager("TestResourceGroup", 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.MongoClusterListResult = armcosmos.MongoClusterListResult{ - // Value: []*armcosmos.MongoCluster{ - // { - // Name: to.Ptr("myMongoCluster"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus2"), - // Tags: map[string]*string{ - // "additionalProp1": to.Ptr("string"), - // "additionalProp2": to.Ptr("string"), - // "additionalProp3": to.Ptr("string"), - // }, - // Properties: &armcosmos.MongoClusterProperties{ - // AdministratorLogin: to.Ptr("mongoAdmin"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com"), - // EarliestRestoreTime: to.Ptr("2023-01-13T20:07:35Z"), - // NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - // { - // DiskSizeGB: to.Ptr[int64](128), - // EnableHa: to.Ptr(true), - // SKU: to.Ptr("M30"), - // Kind: to.Ptr(armcosmos.NodeKindShard), - // NodeCount: to.Ptr[int32](4), - // }}, - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // ServerVersion: to.Ptr("5.0"), - // }, - // }, - // { - // Name: to.Ptr("myMongoCluster2"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster2"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user2"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "additionalProp1": to.Ptr("string"), - // }, - // Properties: &armcosmos.MongoClusterProperties{ - // AdministratorLogin: to.Ptr("mongoAdmin"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster2.mongocluster.cosmos.azure.com"), - // EarliestRestoreTime: to.Ptr("2023-01-10T20:07:35Z"), - // NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - // { - // DiskSizeGB: to.Ptr[int64](256), - // EnableHa: to.Ptr(true), - // SKU: to.Ptr("M40"), - // Kind: to.Ptr(armcosmos.NodeKindShard), - // NodeCount: to.Ptr[int32](2), - // }}, - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // ServerVersion: to.Ptr("5.0"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterCreate.json -func ExampleMongoClustersClient_BeginCreateOrUpdate_createANewMongoCluster() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoClustersClient().BeginCreateOrUpdate(ctx, "TestResourceGroup", "myMongoCluster", armcosmos.MongoCluster{ - Location: to.Ptr("westus2"), - Properties: &armcosmos.MongoClusterProperties{ - AdministratorLogin: to.Ptr("mongoAdmin"), - AdministratorLoginPassword: to.Ptr("password"), - NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - { - DiskSizeGB: to.Ptr[int64](128), - EnableHa: to.Ptr(true), - SKU: to.Ptr("M30"), - Kind: to.Ptr(armcosmos.NodeKindShard), - NodeCount: to.Ptr[int32](3), - }}, - ServerVersion: to.Ptr("5.0"), - }, - }, 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.MongoCluster = armcosmos.MongoCluster{ - // Name: to.Ptr("myMongoCluster"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus2"), - // Properties: &armcosmos.MongoClusterProperties{ - // AdministratorLogin: to.Ptr("mongoAdmin"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com"), - // EarliestRestoreTime: to.Ptr("2023-01-13T20:07:35Z"), - // NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - // { - // DiskSizeGB: to.Ptr[int64](128), - // EnableHa: to.Ptr(true), - // SKU: to.Ptr("M30"), - // Kind: to.Ptr(armcosmos.NodeKindShard), - // NodeCount: to.Ptr[int32](3), - // }}, - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // ServerVersion: to.Ptr("5.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterCreatePITR.json -func ExampleMongoClustersClient_BeginCreateOrUpdate_createANewMongoClusterWithPointInTimeRestore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoClustersClient().BeginCreateOrUpdate(ctx, "TestResourceGroup", "myMongoCluster", armcosmos.MongoCluster{ - Location: to.Ptr("westus2"), - Properties: &armcosmos.MongoClusterProperties{ - CreateMode: to.Ptr(armcosmos.CreateModePointInTimeRestore), - RestoreParameters: &armcosmos.MongoClusterRestoreParameters{ - PointInTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-13T20:07:35.000Z"); return t }()), - SourceResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myOtherMongoCluster"), - }, - }, - }, 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.MongoCluster = armcosmos.MongoCluster{ - // Name: to.Ptr("myMongoCluster"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster"), - // Location: to.Ptr("westus2"), - // Properties: &armcosmos.MongoClusterProperties{ - // AdministratorLogin: to.Ptr("mongoAdmin"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com"), - // EarliestRestoreTime: to.Ptr("2023-01-13T20:07:35Z"), - // NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - // { - // DiskSizeGB: to.Ptr[int64](128), - // EnableHa: to.Ptr(true), - // SKU: to.Ptr("M30"), - // Kind: to.Ptr(armcosmos.NodeKindShard), - // NodeCount: to.Ptr[int32](3), - // }}, - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // ServerVersion: to.Ptr("5.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterGet.json -func ExampleMongoClustersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMongoClustersClient().Get(ctx, "TestResourceGroup", "myMongoCluster", 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.MongoCluster = armcosmos.MongoCluster{ - // Name: to.Ptr("myMongoCluster"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus2"), - // Tags: map[string]*string{ - // "additionalProp1": to.Ptr("string"), - // "additionalProp2": to.Ptr("string"), - // "additionalProp3": to.Ptr("string"), - // }, - // Properties: &armcosmos.MongoClusterProperties{ - // AdministratorLogin: to.Ptr("mongoAdmin"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com"), - // EarliestRestoreTime: to.Ptr("2023-01-13T20:07:35Z"), - // NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - // { - // DiskSizeGB: to.Ptr[int64](128), - // EnableHa: to.Ptr(true), - // SKU: to.Ptr("M30"), - // Kind: to.Ptr(armcosmos.NodeKindShard), - // NodeCount: to.Ptr[int32](4), - // }}, - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // ServerVersion: to.Ptr("5.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterDelete.json -func ExampleMongoClustersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoClustersClient().BeginDelete(ctx, "TestResourceGroup", "myMongoCluster", 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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterAddNode.json -func ExampleMongoClustersClient_BeginUpdate_addNewShardNodes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoClustersClient().BeginUpdate(ctx, "TestResourceGroup", "myMongoCluster", armcosmos.MongoClusterUpdate{ - Properties: &armcosmos.MongoClusterProperties{ - NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - { - Kind: to.Ptr(armcosmos.NodeKindShard), - NodeCount: to.Ptr[int32](4), - }}, - }, - }, 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.MongoCluster = armcosmos.MongoCluster{ - // Name: to.Ptr("myMongoCluster"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus2"), - // Properties: &armcosmos.MongoClusterProperties{ - // AdministratorLogin: to.Ptr("mongoAdmin"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com"), - // EarliestRestoreTime: to.Ptr("2023-01-13T20:07:35Z"), - // NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - // { - // DiskSizeGB: to.Ptr[int64](128), - // EnableHa: to.Ptr(true), - // SKU: to.Ptr("M30"), - // Kind: to.Ptr(armcosmos.NodeKindShard), - // NodeCount: to.Ptr[int32](4), - // }}, - // ServerVersion: to.Ptr("5.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterUpdate.json -func ExampleMongoClustersClient_BeginUpdate_updateTheMongoCluster() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoClustersClient().BeginUpdate(ctx, "TestResourceGroup", "myMongoCluster", armcosmos.MongoClusterUpdate{ - Properties: &armcosmos.MongoClusterProperties{ - AdministratorLogin: to.Ptr("mongoAdmin"), - AdministratorLoginPassword: to.Ptr("password"), - NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - { - DiskSizeGB: to.Ptr[int64](256), - EnableHa: to.Ptr(true), - SKU: to.Ptr("M50"), - Kind: to.Ptr(armcosmos.NodeKindShard), - NodeCount: to.Ptr[int32](4), - }}, - ServerVersion: to.Ptr("5.0"), - }, - }, 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.MongoCluster = armcosmos.MongoCluster{ - // Name: to.Ptr("myMongoCluster"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus2"), - // Properties: &armcosmos.MongoClusterProperties{ - // AdministratorLogin: to.Ptr("mongoAdmin"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com"), - // EarliestRestoreTime: to.Ptr("2023-01-13T20:07:35Z"), - // NodeGroupSpecs: []*armcosmos.NodeGroupSpec{ - // { - // DiskSizeGB: to.Ptr[int64](256), - // EnableHa: to.Ptr(true), - // SKU: to.Ptr("M50"), - // Kind: to.Ptr(armcosmos.NodeKindShard), - // NodeCount: to.Ptr[int32](4), - // }}, - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // ServerVersion: to.Ptr("5.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterFirewallRuleCreate.json -func ExampleMongoClustersClient_BeginCreateOrUpdateFirewallRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoClustersClient().BeginCreateOrUpdateFirewallRule(ctx, "TestGroup", "myMongoCluster", "rule1", armcosmos.FirewallRule{ - Properties: &armcosmos.FirewallRuleProperties{ - EndIPAddress: to.Ptr("255.255.255.255"), - StartIPAddress: to.Ptr("0.0.0.0"), - }, - }, 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.FirewallRule = armcosmos.FirewallRule{ - // Name: to.Ptr("rule1"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters/firewallRules"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Properties: &armcosmos.FirewallRuleProperties{ - // EndIPAddress: to.Ptr("255.255.255.255"), - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // StartIPAddress: to.Ptr("0.0.0.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterFirewallRuleDelete.json -func ExampleMongoClustersClient_BeginDeleteFirewallRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMongoClustersClient().BeginDeleteFirewallRule(ctx, "TestGroup", "myMongoCluster", "rule1", 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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterFirewallRuleGet.json -func ExampleMongoClustersClient_GetFirewallRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMongoClustersClient().GetFirewallRule(ctx, "TestGroup", "myMongoCluster", "rule1", 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.FirewallRule = armcosmos.FirewallRule{ - // Name: to.Ptr("rule1"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters/firewallRules"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Properties: &armcosmos.FirewallRuleProperties{ - // EndIPAddress: to.Ptr("255.255.255.255"), - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // StartIPAddress: to.Ptr("0.0.0.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterFirewallRuleList.json -func ExampleMongoClustersClient_NewListFirewallRulesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMongoClustersClient().NewListFirewallRulesPager("TestGroup", "myMongoCluster", 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.FirewallRuleListResult = armcosmos.FirewallRuleListResult{ - // Value: []*armcosmos.FirewallRule{ - // { - // Name: to.Ptr("rule1"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters/firewallRules"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Properties: &armcosmos.FirewallRuleProperties{ - // EndIPAddress: to.Ptr("255.255.255.255"), - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // StartIPAddress: to.Ptr("0.0.0.0"), - // }, - // }, - // { - // Name: to.Ptr("rule2"), - // Type: to.Ptr("/Microsoft.DocumentDB/mongoClusters/firewallRules"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule2"), - // SystemData: &armcosmos.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcosmos.CreatedByTypeUser), - // }, - // Properties: &armcosmos.FirewallRuleProperties{ - // EndIPAddress: to.Ptr("255.0.0.0"), - // ProvisioningState: to.Ptr(armcosmos.ProvisioningStateSucceeded), - // StartIPAddress: to.Ptr("1.0.0.0"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterNameAvailability.json -func ExampleMongoClustersClient_CheckNameAvailability_checkNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMongoClustersClient().CheckNameAvailability(ctx, "westus2", armcosmos.CheckNameAvailabilityRequest{ - Name: to.Ptr("newmongocluster"), - Type: to.Ptr("Microsoft.DocumentDB/mongoClusters"), - }, 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.CheckNameAvailabilityResponse = armcosmos.CheckNameAvailabilityResponse{ - // NameAvailable: to.Ptr(true), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterNameAvailability_AlreadyExists.json -func ExampleMongoClustersClient_CheckNameAvailability_checkNameAvailabilityAlreadyExistsResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMongoClustersClient().CheckNameAvailability(ctx, "westus2", armcosmos.CheckNameAvailabilityRequest{ - Name: to.Ptr("existingmongocluster"), - Type: to.Ptr("Microsoft.DocumentDB/mongoClusters"), - }, 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.CheckNameAvailabilityResponse = armcosmos.CheckNameAvailabilityResponse{ - // Message: to.Ptr("Cluster name 'existingmongocluster' is already in use."), - // NameAvailable: to.Ptr(false), - // Reason: to.Ptr(armcosmos.CheckNameAvailabilityReasonAlreadyExists), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/mongo-cluster/CosmosDBMongoClusterListConnectionStrings.json -func ExampleMongoClustersClient_ListConnectionStrings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcosmos.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMongoClustersClient().ListConnectionStrings(ctx, "TestGroup", "myMongoCluster", 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.ListConnectionStringsResult = armcosmos.ListConnectionStringsResult{ - // ConnectionStrings: []*armcosmos.ConnectionString{ - // { - // Description: to.Ptr("default connection string"), - // ConnectionString: to.Ptr("mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com"), - // }}, - // } -} diff --git a/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client.go index 6fdfbfea434b..ff5e87d762f1 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client.go @@ -28,7 +28,7 @@ type MongoDBResourcesClient struct { } // NewMongoDBResourcesClient creates a new instance of MongoDBResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewMongoDBResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MongoDBResourcesClient, error) { @@ -46,7 +46,7 @@ func NewMongoDBResourcesClient(subscriptionID string, credential azcore.TokenCre // BeginCreateUpdateMongoDBCollection - Create or update an Azure Cosmos DB MongoDB Collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -74,7 +74,7 @@ func (client *MongoDBResourcesClient) BeginCreateUpdateMongoDBCollection(ctx con // CreateUpdateMongoDBCollection - Create or update an Azure Cosmos DB MongoDB Collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) createUpdateMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, createUpdateMongoDBCollectionParameters MongoDBCollectionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection" @@ -124,7 +124,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoDBCollectionCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateMongoDBCollectionParameters); err != nil { @@ -136,7 +136,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoDBCollectionCreateRequest // BeginCreateUpdateMongoDBDatabase - Create or updates Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -163,7 +163,7 @@ func (client *MongoDBResourcesClient) BeginCreateUpdateMongoDBDatabase(ctx conte // CreateUpdateMongoDBDatabase - Create or updates Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) createUpdateMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateMongoDBDatabaseParameters MongoDBDatabaseCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginCreateUpdateMongoDBDatabase" @@ -209,7 +209,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoDBDatabaseCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateMongoDBDatabaseParameters); err != nil { @@ -221,7 +221,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoDBDatabaseCreateRequest(c // BeginCreateUpdateMongoRoleDefinition - Creates or updates an Azure Cosmos DB Mongo Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -248,7 +248,7 @@ func (client *MongoDBResourcesClient) BeginCreateUpdateMongoRoleDefinition(ctx c // CreateUpdateMongoRoleDefinition - Creates or updates an Azure Cosmos DB Mongo Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) createUpdateMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, createUpdateMongoRoleDefinitionParameters MongoRoleDefinitionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginCreateUpdateMongoRoleDefinition" @@ -294,7 +294,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoRoleDefinitionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateMongoRoleDefinitionParameters); err != nil { @@ -306,7 +306,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoRoleDefinitionCreateReque // BeginCreateUpdateMongoUserDefinition - Creates or updates an Azure Cosmos DB Mongo User Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - mongoUserDefinitionID - The ID for the User Definition {dbName.userName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -333,7 +333,7 @@ func (client *MongoDBResourcesClient) BeginCreateUpdateMongoUserDefinition(ctx c // CreateUpdateMongoUserDefinition - Creates or updates an Azure Cosmos DB Mongo User Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) createUpdateMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, createUpdateMongoUserDefinitionParameters MongoUserDefinitionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginCreateUpdateMongoUserDefinition" @@ -379,7 +379,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoUserDefinitionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateMongoUserDefinitionParameters); err != nil { @@ -391,7 +391,7 @@ func (client *MongoDBResourcesClient) createUpdateMongoUserDefinitionCreateReque // BeginDeleteMongoDBCollection - Deletes an existing Azure Cosmos DB MongoDB Collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -418,7 +418,7 @@ func (client *MongoDBResourcesClient) BeginDeleteMongoDBCollection(ctx context.C // DeleteMongoDBCollection - Deletes an existing Azure Cosmos DB MongoDB Collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) deleteMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginDeleteMongoDBCollection" @@ -468,7 +468,7 @@ func (client *MongoDBResourcesClient) deleteMongoDBCollectionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -476,7 +476,7 @@ func (client *MongoDBResourcesClient) deleteMongoDBCollectionCreateRequest(ctx c // BeginDeleteMongoDBDatabase - Deletes an existing Azure Cosmos DB MongoDB database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -502,7 +502,7 @@ func (client *MongoDBResourcesClient) BeginDeleteMongoDBDatabase(ctx context.Con // DeleteMongoDBDatabase - Deletes an existing Azure Cosmos DB MongoDB database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) deleteMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginDeleteMongoDBDatabase" @@ -548,7 +548,7 @@ func (client *MongoDBResourcesClient) deleteMongoDBDatabaseCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -556,7 +556,7 @@ func (client *MongoDBResourcesClient) deleteMongoDBDatabaseCreateRequest(ctx con // BeginDeleteMongoRoleDefinition - Deletes an existing Azure Cosmos DB Mongo Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -582,7 +582,7 @@ func (client *MongoDBResourcesClient) BeginDeleteMongoRoleDefinition(ctx context // DeleteMongoRoleDefinition - Deletes an existing Azure Cosmos DB Mongo Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) deleteMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginDeleteMongoRoleDefinition" @@ -628,7 +628,7 @@ func (client *MongoDBResourcesClient) deleteMongoRoleDefinitionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -637,7 +637,7 @@ func (client *MongoDBResourcesClient) deleteMongoRoleDefinitionCreateRequest(ctx // BeginDeleteMongoUserDefinition - Deletes an existing Azure Cosmos DB Mongo User Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - mongoUserDefinitionID - The ID for the User Definition {dbName.userName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -663,7 +663,7 @@ func (client *MongoDBResourcesClient) BeginDeleteMongoUserDefinition(ctx context // DeleteMongoUserDefinition - Deletes an existing Azure Cosmos DB Mongo User Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) deleteMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginDeleteMongoUserDefinition" @@ -709,7 +709,7 @@ func (client *MongoDBResourcesClient) deleteMongoUserDefinitionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -718,7 +718,7 @@ func (client *MongoDBResourcesClient) deleteMongoUserDefinitionCreateRequest(ctx // GetMongoDBCollection - Gets the MongoDB collection under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -775,7 +775,7 @@ func (client *MongoDBResourcesClient) getMongoDBCollectionCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -794,7 +794,7 @@ func (client *MongoDBResourcesClient) getMongoDBCollectionHandleResponse(resp *h // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -851,7 +851,7 @@ func (client *MongoDBResourcesClient) getMongoDBCollectionThroughputCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -869,7 +869,7 @@ func (client *MongoDBResourcesClient) getMongoDBCollectionThroughputHandleRespon // GetMongoDBDatabase - Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -921,7 +921,7 @@ func (client *MongoDBResourcesClient) getMongoDBDatabaseCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -940,7 +940,7 @@ func (client *MongoDBResourcesClient) getMongoDBDatabaseHandleResponse(resp *htt // account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -992,7 +992,7 @@ func (client *MongoDBResourcesClient) getMongoDBDatabaseThroughputCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1010,7 +1010,7 @@ func (client *MongoDBResourcesClient) getMongoDBDatabaseThroughputHandleResponse // GetMongoRoleDefinition - Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -1062,7 +1062,7 @@ func (client *MongoDBResourcesClient) getMongoRoleDefinitionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1080,7 +1080,7 @@ func (client *MongoDBResourcesClient) getMongoRoleDefinitionHandleResponse(resp // GetMongoUserDefinition - Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - mongoUserDefinitionID - The ID for the User Definition {dbName.userName}. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -1132,7 +1132,7 @@ func (client *MongoDBResourcesClient) getMongoUserDefinitionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1150,7 +1150,7 @@ func (client *MongoDBResourcesClient) getMongoUserDefinitionHandleResponse(resp // BeginListMongoDBCollectionPartitionMerge - Merges the partitions of a MongoDB Collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1179,7 +1179,7 @@ func (client *MongoDBResourcesClient) BeginListMongoDBCollectionPartitionMerge(c // ListMongoDBCollectionPartitionMerge - Merges the partitions of a MongoDB Collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) listMongoDBCollectionPartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, mergeParameters MergeParameters, options *MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginListMongoDBCollectionPartitionMerge" @@ -1229,7 +1229,7 @@ func (client *MongoDBResourcesClient) listMongoDBCollectionPartitionMergeCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, mergeParameters); err != nil { @@ -1240,7 +1240,7 @@ func (client *MongoDBResourcesClient) listMongoDBCollectionPartitionMergeCreateR // NewListMongoDBCollectionsPager - Lists the MongoDB collection under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1294,7 +1294,7 @@ func (client *MongoDBResourcesClient) listMongoDBCollectionsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1311,7 +1311,7 @@ func (client *MongoDBResourcesClient) listMongoDBCollectionsHandleResponse(resp // NewListMongoDBDatabasesPager - Lists the MongoDB databases under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - MongoDBResourcesClientListMongoDBDatabasesOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoDBDatabasesPager @@ -1360,7 +1360,7 @@ func (client *MongoDBResourcesClient) listMongoDBDatabasesCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1377,7 +1377,7 @@ func (client *MongoDBResourcesClient) listMongoDBDatabasesHandleResponse(resp *h // NewListMongoRoleDefinitionsPager - Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - MongoDBResourcesClientListMongoRoleDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoRoleDefinitionsPager @@ -1426,7 +1426,7 @@ func (client *MongoDBResourcesClient) listMongoRoleDefinitionsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1443,7 +1443,7 @@ func (client *MongoDBResourcesClient) listMongoRoleDefinitionsHandleResponse(res // NewListMongoUserDefinitionsPager - Retrieves the list of all Azure Cosmos DB Mongo User Definition. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - MongoDBResourcesClientListMongoUserDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoUserDefinitionsPager @@ -1492,7 +1492,7 @@ func (client *MongoDBResourcesClient) listMongoUserDefinitionsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1510,7 +1510,7 @@ func (client *MongoDBResourcesClient) listMongoUserDefinitionsHandleResponse(res // BeginMigrateMongoDBCollectionToAutoscale - Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1537,7 +1537,7 @@ func (client *MongoDBResourcesClient) BeginMigrateMongoDBCollectionToAutoscale(c // MigrateMongoDBCollectionToAutoscale - Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) migrateMongoDBCollectionToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginMigrateMongoDBCollectionToAutoscale" @@ -1587,7 +1587,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBCollectionToAutoscaleCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1597,7 +1597,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBCollectionToAutoscaleCreateR // throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1624,7 +1624,7 @@ func (client *MongoDBResourcesClient) BeginMigrateMongoDBCollectionToManualThrou // MigrateMongoDBCollectionToManualThroughput - Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) migrateMongoDBCollectionToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginMigrateMongoDBCollectionToManualThroughput" @@ -1674,7 +1674,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBCollectionToManualThroughput return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1683,7 +1683,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBCollectionToManualThroughput // BeginMigrateMongoDBDatabaseToAutoscale - Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1709,7 +1709,7 @@ func (client *MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToAutoscale(ctx // MigrateMongoDBDatabaseToAutoscale - Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToAutoscale" @@ -1755,7 +1755,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToAutoscaleCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1764,7 +1764,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToAutoscaleCreateReq // BeginMigrateMongoDBDatabaseToManualThroughput - Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1790,7 +1790,7 @@ func (client *MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToManualThrough // MigrateMongoDBDatabaseToManualThroughput - Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToManualThroughput" @@ -1836,7 +1836,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToManualThroughputCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1845,7 +1845,7 @@ func (client *MongoDBResourcesClient) migrateMongoDBDatabaseToManualThroughputCr // BeginMongoDBContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB MongoDB container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1874,7 +1874,7 @@ func (client *MongoDBResourcesClient) BeginMongoDBContainerRedistributeThroughpu // MongoDBContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB MongoDB container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) mongoDBContainerRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, redistributeThroughputParameters RedistributeThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginMongoDBContainerRedistributeThroughput" @@ -1924,7 +1924,7 @@ func (client *MongoDBResourcesClient) mongoDBContainerRedistributeThroughputCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, redistributeThroughputParameters); err != nil { @@ -1936,7 +1936,7 @@ func (client *MongoDBResourcesClient) mongoDBContainerRedistributeThroughputCrea // BeginMongoDBContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB MongoDB container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1966,7 +1966,7 @@ func (client *MongoDBResourcesClient) BeginMongoDBContainerRetrieveThroughputDis // MongoDBContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB MongoDB container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) mongoDBContainerRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, retrieveThroughputParameters RetrieveThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginMongoDBContainerRetrieveThroughputDistribution" @@ -2016,7 +2016,7 @@ func (client *MongoDBResourcesClient) mongoDBContainerRetrieveThroughputDistribu return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, retrieveThroughputParameters); err != nil { @@ -2028,7 +2028,7 @@ func (client *MongoDBResourcesClient) mongoDBContainerRetrieveThroughputDistribu // BeginMongoDBDatabasePartitionMerge - Merges the partitions of a MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2056,7 +2056,7 @@ func (client *MongoDBResourcesClient) BeginMongoDBDatabasePartitionMerge(ctx con // MongoDBDatabasePartitionMerge - Merges the partitions of a MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) mongoDBDatabasePartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, mergeParameters MergeParameters, options *MongoDBResourcesClientBeginMongoDBDatabasePartitionMergeOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginMongoDBDatabasePartitionMerge" @@ -2102,7 +2102,7 @@ func (client *MongoDBResourcesClient) mongoDBDatabasePartitionMergeCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, mergeParameters); err != nil { @@ -2114,7 +2114,7 @@ func (client *MongoDBResourcesClient) mongoDBDatabasePartitionMergeCreateRequest // BeginMongoDBDatabaseRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2142,7 +2142,7 @@ func (client *MongoDBResourcesClient) BeginMongoDBDatabaseRedistributeThroughput // MongoDBDatabaseRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) mongoDBDatabaseRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, redistributeThroughputParameters RedistributeThroughputParameters, options *MongoDBResourcesClientBeginMongoDBDatabaseRedistributeThroughputOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginMongoDBDatabaseRedistributeThroughput" @@ -2188,7 +2188,7 @@ func (client *MongoDBResourcesClient) mongoDBDatabaseRedistributeThroughputCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, redistributeThroughputParameters); err != nil { @@ -2200,7 +2200,7 @@ func (client *MongoDBResourcesClient) mongoDBDatabaseRedistributeThroughputCreat // BeginMongoDBDatabaseRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2229,7 +2229,7 @@ func (client *MongoDBResourcesClient) BeginMongoDBDatabaseRetrieveThroughputDist // MongoDBDatabaseRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) mongoDBDatabaseRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, retrieveThroughputParameters RetrieveThroughputParameters, options *MongoDBResourcesClientBeginMongoDBDatabaseRetrieveThroughputDistributionOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginMongoDBDatabaseRetrieveThroughputDistribution" @@ -2275,7 +2275,7 @@ func (client *MongoDBResourcesClient) mongoDBDatabaseRetrieveThroughputDistribut return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, retrieveThroughputParameters); err != nil { @@ -2287,7 +2287,7 @@ func (client *MongoDBResourcesClient) mongoDBDatabaseRetrieveThroughputDistribut // BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a Mongodb collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2316,7 +2316,7 @@ func (client *MongoDBResourcesClient) BeginRetrieveContinuousBackupInformation(c // RetrieveContinuousBackupInformation - Retrieves continuous backup information for a Mongodb collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) retrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, location ContinuousBackupRestoreLocation, options *MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginRetrieveContinuousBackupInformation" @@ -2366,7 +2366,7 @@ func (client *MongoDBResourcesClient) retrieveContinuousBackupInformationCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, location); err != nil { @@ -2378,7 +2378,7 @@ func (client *MongoDBResourcesClient) retrieveContinuousBackupInformationCreateR // BeginUpdateMongoDBCollectionThroughput - Update the RUs per second of an Azure Cosmos DB MongoDB collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2406,7 +2406,7 @@ func (client *MongoDBResourcesClient) BeginUpdateMongoDBCollectionThroughput(ctx // UpdateMongoDBCollectionThroughput - Update the RUs per second of an Azure Cosmos DB MongoDB collection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) updateMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginUpdateMongoDBCollectionThroughput" @@ -2456,7 +2456,7 @@ func (client *MongoDBResourcesClient) updateMongoDBCollectionThroughputCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { @@ -2468,7 +2468,7 @@ func (client *MongoDBResourcesClient) updateMongoDBCollectionThroughputCreateReq // BeginUpdateMongoDBDatabaseThroughput - Update RUs per second of the an Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2495,7 +2495,7 @@ func (client *MongoDBResourcesClient) BeginUpdateMongoDBDatabaseThroughput(ctx c // UpdateMongoDBDatabaseThroughput - Update RUs per second of the an Azure Cosmos DB MongoDB database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *MongoDBResourcesClient) updateMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions) (*http.Response, error) { var err error const operationName = "MongoDBResourcesClient.BeginUpdateMongoDBDatabaseThroughput" @@ -2541,7 +2541,7 @@ func (client *MongoDBResourcesClient) updateMongoDBDatabaseThroughputCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client_example_test.go index a9b66d08fb9f..3837fe1d9058 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/mongodbresources_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseList.json func ExampleMongoDBResourcesClient_NewListMongoDBDatabasesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -61,7 +61,7 @@ func ExampleMongoDBResourcesClient_NewListMongoDBDatabasesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseGet.json func ExampleMongoDBResourcesClient_GetMongoDBDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -97,7 +97,7 @@ func ExampleMongoDBResourcesClient_GetMongoDBDatabase() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseCreateUpdate.json func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBDatabase_cosmosDbMongoDbDatabaseCreateUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -143,7 +143,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBDatabase_cosmosDbMong // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseRestore.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseRestore.json func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBDatabase_cosmosDbMongoDbDatabaseRestore() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -195,7 +195,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBDatabase_cosmosDbMong // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseDelete.json func ExampleMongoDBResourcesClient_BeginDeleteMongoDBDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -216,7 +216,7 @@ func ExampleMongoDBResourcesClient_BeginDeleteMongoDBDatabase() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseThroughputGet.json func ExampleMongoDBResourcesClient_GetMongoDBDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -256,7 +256,7 @@ func ExampleMongoDBResourcesClient_GetMongoDBDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json func ExampleMongoDBResourcesClient_BeginUpdateMongoDBDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -306,7 +306,7 @@ func ExampleMongoDBResourcesClient_BeginUpdateMongoDBDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json func ExampleMongoDBResourcesClient_BeginMigrateMongoDBDatabaseToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -345,7 +345,7 @@ func ExampleMongoDBResourcesClient_BeginMigrateMongoDBDatabaseToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json func ExampleMongoDBResourcesClient_BeginMigrateMongoDBDatabaseToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -381,7 +381,7 @@ func ExampleMongoDBResourcesClient_BeginMigrateMongoDBDatabaseToManualThroughput // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseRetrieveThroughputDistribution.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseRetrieveThroughputDistribution.json func ExampleMongoDBResourcesClient_BeginMongoDBDatabaseRetrieveThroughputDistribution() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -432,7 +432,7 @@ func ExampleMongoDBResourcesClient_BeginMongoDBDatabaseRetrieveThroughputDistrib // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabaseRedistributeThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabaseRedistributeThroughput.json func ExampleMongoDBResourcesClient_BeginMongoDBDatabaseRedistributeThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -502,7 +502,7 @@ func ExampleMongoDBResourcesClient_BeginMongoDBDatabaseRedistributeThroughput() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json func ExampleMongoDBResourcesClient_BeginMongoDBContainerRetrieveThroughputDistribution() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -553,7 +553,7 @@ func ExampleMongoDBResourcesClient_BeginMongoDBContainerRetrieveThroughputDistri // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json func ExampleMongoDBResourcesClient_BeginMongoDBContainerRedistributeThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -623,7 +623,7 @@ func ExampleMongoDBResourcesClient_BeginMongoDBContainerRedistributeThroughput() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionList.json func ExampleMongoDBResourcesClient_NewListMongoDBCollectionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -679,7 +679,7 @@ func ExampleMongoDBResourcesClient_NewListMongoDBCollectionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionGet.json func ExampleMongoDBResourcesClient_GetMongoDBCollection() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -730,7 +730,7 @@ func ExampleMongoDBResourcesClient_GetMongoDBCollection() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionCreateUpdate.json func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection_cosmosDbMongoDbCollectionCreateUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -818,7 +818,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection_cosmosDbMo // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionRestore.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionRestore.json func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection_cosmosDbMongoDbCollectionRestore() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -891,7 +891,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoDBCollection_cosmosDbMo // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionDelete.json func ExampleMongoDBResourcesClient_BeginDeleteMongoDBCollection() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -912,7 +912,7 @@ func ExampleMongoDBResourcesClient_BeginDeleteMongoDBCollection() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBDatabasePartitionMerge.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBDatabasePartitionMerge.json func ExampleMongoDBResourcesClient_BeginMongoDBDatabasePartitionMerge() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -973,7 +973,7 @@ func ExampleMongoDBResourcesClient_BeginMongoDBDatabasePartitionMerge() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json func ExampleMongoDBResourcesClient_BeginListMongoDBCollectionPartitionMerge() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1034,7 +1034,7 @@ func ExampleMongoDBResourcesClient_BeginListMongoDBCollectionPartitionMerge() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionThroughputGet.json func ExampleMongoDBResourcesClient_GetMongoDBCollectionThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1074,7 +1074,7 @@ func ExampleMongoDBResourcesClient_GetMongoDBCollectionThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionThroughputUpdate.json func ExampleMongoDBResourcesClient_BeginUpdateMongoDBCollectionThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1124,7 +1124,7 @@ func ExampleMongoDBResourcesClient_BeginUpdateMongoDBCollectionThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json func ExampleMongoDBResourcesClient_BeginMigrateMongoDBCollectionToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1163,7 +1163,7 @@ func ExampleMongoDBResourcesClient_BeginMigrateMongoDBCollectionToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json func ExampleMongoDBResourcesClient_BeginMigrateMongoDBCollectionToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1199,7 +1199,7 @@ func ExampleMongoDBResourcesClient_BeginMigrateMongoDBCollectionToManualThroughp // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBRoleDefinitionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBRoleDefinitionGet.json func ExampleMongoDBResourcesClient_GetMongoRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1244,7 +1244,7 @@ func ExampleMongoDBResourcesClient_GetMongoRoleDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1313,7 +1313,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoRoleDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.json func ExampleMongoDBResourcesClient_BeginDeleteMongoRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1334,7 +1334,7 @@ func ExampleMongoDBResourcesClient_BeginDeleteMongoRoleDefinition() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBRoleDefinitionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBRoleDefinitionList.json func ExampleMongoDBResourcesClient_NewListMongoRoleDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1387,7 +1387,7 @@ func ExampleMongoDBResourcesClient_NewListMongoRoleDefinitionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBUserDefinitionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBUserDefinitionGet.json func ExampleMongoDBResourcesClient_GetMongoUserDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1423,7 +1423,7 @@ func ExampleMongoDBResourcesClient_GetMongoUserDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoUserDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1476,7 +1476,7 @@ func ExampleMongoDBResourcesClient_BeginCreateUpdateMongoUserDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBUserDefinitionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBUserDefinitionDelete.json func ExampleMongoDBResourcesClient_BeginDeleteMongoUserDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1497,7 +1497,7 @@ func ExampleMongoDBResourcesClient_BeginDeleteMongoUserDefinition() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBUserDefinitionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBUserDefinitionList.json func ExampleMongoDBResourcesClient_NewListMongoUserDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1541,7 +1541,7 @@ func ExampleMongoDBResourcesClient_NewListMongoUserDefinitionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMongoDBCollectionBackupInformation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMongoDBCollectionBackupInformation.json func ExampleMongoDBResourcesClient_BeginRetrieveContinuousBackupInformation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/networksecurityperimeterconfigurations_client.go b/sdk/resourcemanager/cosmos/armcosmos/networksecurityperimeterconfigurations_client.go new file mode 100644 index 000000000000..cfbe1a8a5bf9 --- /dev/null +++ b/sdk/resourcemanager/cosmos/armcosmos/networksecurityperimeterconfigurations_client.go @@ -0,0 +1,261 @@ +//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 armcosmos + +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" +) + +// NetworkSecurityPerimeterConfigurationsClient contains the methods for the NetworkSecurityPerimeterConfigurations group. +// Don't use this type directly, use NewNetworkSecurityPerimeterConfigurationsClient() instead. +type NetworkSecurityPerimeterConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewNetworkSecurityPerimeterConfigurationsClient creates a new instance of NetworkSecurityPerimeterConfigurationsClient 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 NewNetworkSecurityPerimeterConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &NetworkSecurityPerimeterConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets effective Network Security Perimeter Configuration for association +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-15-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - Cosmos DB database account name. +// - networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration +// - options - NetworkSecurityPerimeterConfigurationsClientGetOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.Get +// method. +func (client *NetworkSecurityPerimeterConfigurationsClient) Get(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientGetOptions) (NetworkSecurityPerimeterConfigurationsClientGetResponse, error) { + var err error + const operationName = "NetworkSecurityPerimeterConfigurationsClient.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, accountName, networkSecurityPerimeterConfigurationName, options) + if err != nil { + return NetworkSecurityPerimeterConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return NetworkSecurityPerimeterConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NetworkSecurityPerimeterConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *NetworkSecurityPerimeterConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if networkSecurityPerimeterConfigurationName == "" { + return nil, errors.New("parameter networkSecurityPerimeterConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityPerimeterConfigurationName}", url.PathEscape(networkSecurityPerimeterConfigurationName)) + 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-05-15-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *NetworkSecurityPerimeterConfigurationsClient) getHandleResponse(resp *http.Response) (NetworkSecurityPerimeterConfigurationsClientGetResponse, error) { + result := NetworkSecurityPerimeterConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkSecurityPerimeterConfiguration); err != nil { + return NetworkSecurityPerimeterConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets list of effective Network Security Perimeter Configuration for cosmos db account +// +// Generated from API version 2024-05-15-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - Cosmos DB database account name. +// - options - NetworkSecurityPerimeterConfigurationsClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.NewListPager +// method. +func (client *NetworkSecurityPerimeterConfigurationsClient) NewListPager(resourceGroupName string, accountName string, options *NetworkSecurityPerimeterConfigurationsClientListOptions) *runtime.Pager[NetworkSecurityPerimeterConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[NetworkSecurityPerimeterConfigurationsClientListResponse]{ + More: func(page NetworkSecurityPerimeterConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *NetworkSecurityPerimeterConfigurationsClientListResponse) (NetworkSecurityPerimeterConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NetworkSecurityPerimeterConfigurationsClient.NewListPager") + 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.listCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return NetworkSecurityPerimeterConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *NetworkSecurityPerimeterConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *NetworkSecurityPerimeterConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/networkSecurityPerimeterConfigurations" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + 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-05-15-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *NetworkSecurityPerimeterConfigurationsClient) listHandleResponse(resp *http.Response) (NetworkSecurityPerimeterConfigurationsClientListResponse, error) { + result := NetworkSecurityPerimeterConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkSecurityPerimeterConfigurationListResult); err != nil { + return NetworkSecurityPerimeterConfigurationsClientListResponse{}, err + } + return result, nil +} + +// BeginReconcile - Refreshes any information about the association. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-15-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - Cosmos DB database account name. +// - networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration +// - options - NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginReconcile +// method. +func (client *NetworkSecurityPerimeterConfigurationsClient) BeginReconcile(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*runtime.Poller[NetworkSecurityPerimeterConfigurationsClientReconcileResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reconcile(ctx, resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NetworkSecurityPerimeterConfigurationsClientReconcileResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NetworkSecurityPerimeterConfigurationsClientReconcileResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Reconcile - Refreshes any information about the association. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-15-preview +func (client *NetworkSecurityPerimeterConfigurationsClient) reconcile(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*http.Response, error) { + var err error + const operationName = "NetworkSecurityPerimeterConfigurationsClient.BeginReconcile" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.reconcileCreateRequest(ctx, resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, 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.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// reconcileCreateRequest creates the Reconcile request. +func (client *NetworkSecurityPerimeterConfigurationsClient) reconcileCreateRequest(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile" + 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 accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if networkSecurityPerimeterConfigurationName == "" { + return nil, errors.New("parameter networkSecurityPerimeterConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityPerimeterConfigurationName}", url.PathEscape(networkSecurityPerimeterConfigurationName)) + 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-05-15-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/sdk/resourcemanager/cosmos/armcosmos/networksecurityperimeterconfigurations_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/networksecurityperimeterconfigurations_client_example_test.go new file mode 100644 index 000000000000..eb649dca0c59 --- /dev/null +++ b/sdk/resourcemanager/cosmos/armcosmos/networksecurityperimeterconfigurations_client_example_test.go @@ -0,0 +1,158 @@ +//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 armcosmos_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" +) + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/NetworkSecurityPerimeterConfigurationList.json +func ExampleNetworkSecurityPerimeterConfigurationsClient_NewListPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcosmos.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewNetworkSecurityPerimeterConfigurationsClient().NewListPager("res4410", "cosmosTest", 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.NetworkSecurityPerimeterConfigurationListResult = armcosmos.NetworkSecurityPerimeterConfigurationListResult{ + // Value: []*armcosmos.NetworkSecurityPerimeterConfiguration{ + // { + // Name: to.Ptr("dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), + // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/networkSecurityPerimeterConfigurations"), + // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/res4410/providers/Microsoft.DocumentDB/databaseAccounts/cosmosTest/networkSecurityPerimeterConfigurations/dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), + // Properties: &armcosmos.NetworkSecurityPerimeterConfigurationProperties{ + // NetworkSecurityPerimeter: &armcosmos.NetworkSecurityPerimeter{ + // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/res4794/providers/Microsoft.Network/networkSecurityPerimeters/nsp1"), + // Location: to.Ptr("East US"), + // PerimeterGUID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"), + // }, + // Profile: &armcosmos.NetworkSecurityProfile{ + // Name: to.Ptr("profile1"), + // AccessRules: []*armcosmos.AccessRule{ + // { + // Name: to.Ptr("inVpnRule"), + // Properties: &armcosmos.AccessRuleProperties{ + // AddressPrefixes: []*string{ + // to.Ptr("148.0.0.0/8"), + // to.Ptr("152.4.6.0/24")}, + // Direction: to.Ptr(armcosmos.AccessRuleDirectionInbound), + // }, + // }}, + // AccessRulesVersion: to.Ptr[int32](10), + // DiagnosticSettingsVersion: to.Ptr[int32](5), + // EnabledLogCategories: []*string{ + // to.Ptr("NspPublicInboundPerimeterRulesAllowed"), + // to.Ptr("NspPublicInboundPerimeterRulesDenied")}, + // }, + // ProvisioningState: to.Ptr(armcosmos.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded), + // ResourceAssociation: &armcosmos.ResourceAssociation{ + // Name: to.Ptr("association1"), + // AccessMode: to.Ptr(armcosmos.ResourceAssociationAccessModeEnforced), + // }, + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/NetworkSecurityPerimeterConfigurationGet.json +func ExampleNetworkSecurityPerimeterConfigurationsClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcosmos.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewNetworkSecurityPerimeterConfigurationsClient().Get(ctx, "res4410", "cosmosTest", "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1", 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.NetworkSecurityPerimeterConfiguration = armcosmos.NetworkSecurityPerimeterConfiguration{ + // Name: to.Ptr("dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), + // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/networkSecurityPerimeterConfigurations"), + // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/res4410/providers/Microsoft.DocumentDB/databaseAccounts/cosmosTest/networkSecurityPerimeterConfigurations/dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), + // Properties: &armcosmos.NetworkSecurityPerimeterConfigurationProperties{ + // NetworkSecurityPerimeter: &armcosmos.NetworkSecurityPerimeter{ + // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/res4794/providers/Microsoft.Network/networkSecurityPerimeters/nsp1"), + // Location: to.Ptr("East US"), + // PerimeterGUID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"), + // }, + // Profile: &armcosmos.NetworkSecurityProfile{ + // Name: to.Ptr("profile1"), + // AccessRules: []*armcosmos.AccessRule{ + // { + // Name: to.Ptr("allowedSubscriptions"), + // Properties: &armcosmos.AccessRuleProperties{ + // Direction: to.Ptr(armcosmos.AccessRuleDirectionInbound), + // Subscriptions: []*armcosmos.AccessRulePropertiesSubscriptionsItem{ + // { + // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774"), + // }}, + // }, + // }}, + // AccessRulesVersion: to.Ptr[int32](10), + // DiagnosticSettingsVersion: to.Ptr[int32](5), + // EnabledLogCategories: []*string{ + // to.Ptr("NspPublicInboundPerimeterRulesAllowed"), + // to.Ptr("NspPublicInboundPerimeterRulesDenied")}, + // }, + // ProvisioningState: to.Ptr(armcosmos.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded), + // ResourceAssociation: &armcosmos.ResourceAssociation{ + // Name: to.Ptr("resourceAssociation1"), + // AccessMode: to.Ptr(armcosmos.ResourceAssociationAccessModeEnforced), + // }, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/NetworkSecurityPerimeterConfigurationReconcile.json +func ExampleNetworkSecurityPerimeterConfigurationsClient_BeginReconcile() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcosmos.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewNetworkSecurityPerimeterConfigurationsClient().BeginReconcile(ctx, "res4410", "sto8607", "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1", 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) + } +} diff --git a/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client.go b/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client.go index c7f8693b25ea..e234b0375320 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client.go @@ -28,7 +28,7 @@ type NotebookWorkspacesClient struct { } // NewNotebookWorkspacesClient creates a new instance of NotebookWorkspacesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewNotebookWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NotebookWorkspacesClient, error) { @@ -46,7 +46,7 @@ func NewNotebookWorkspacesClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Creates the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -73,7 +73,7 @@ func (client *NotebookWorkspacesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *NotebookWorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, notebookCreateUpdateParameters NotebookWorkspaceCreateUpdateParameters, options *NotebookWorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "NotebookWorkspacesClient.BeginCreateOrUpdate" @@ -119,7 +119,7 @@ func (client *NotebookWorkspacesClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, notebookCreateUpdateParameters); err != nil { @@ -131,7 +131,7 @@ func (client *NotebookWorkspacesClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Deletes the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -157,7 +157,7 @@ func (client *NotebookWorkspacesClient) BeginDelete(ctx context.Context, resourc // Delete - Deletes the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *NotebookWorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "NotebookWorkspacesClient.BeginDelete" @@ -203,7 +203,7 @@ func (client *NotebookWorkspacesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,7 +212,7 @@ func (client *NotebookWorkspacesClient) deleteCreateRequest(ctx context.Context, // Get - Gets the notebook workspace for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -263,7 +263,7 @@ func (client *NotebookWorkspacesClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -280,7 +280,7 @@ func (client *NotebookWorkspacesClient) getHandleResponse(resp *http.Response) ( // NewListByDatabaseAccountPager - Gets the notebook workspace resources of an existing Cosmos DB account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - NotebookWorkspacesClientListByDatabaseAccountOptions contains the optional parameters for the NotebookWorkspacesClient.NewListByDatabaseAccountPager @@ -329,7 +329,7 @@ func (client *NotebookWorkspacesClient) listByDatabaseAccountCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -347,7 +347,7 @@ func (client *NotebookWorkspacesClient) listByDatabaseAccountHandleResponse(resp // ListConnectionInfo - Retrieves the connection info for the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -399,7 +399,7 @@ func (client *NotebookWorkspacesClient) listConnectionInfoCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -417,7 +417,7 @@ func (client *NotebookWorkspacesClient) listConnectionInfoHandleResponse(resp *h // BeginRegenerateAuthToken - Regenerates the auth token for the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -443,7 +443,7 @@ func (client *NotebookWorkspacesClient) BeginRegenerateAuthToken(ctx context.Con // RegenerateAuthToken - Regenerates the auth token for the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *NotebookWorkspacesClient) regenerateAuthToken(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientBeginRegenerateAuthTokenOptions) (*http.Response, error) { var err error const operationName = "NotebookWorkspacesClient.BeginRegenerateAuthToken" @@ -489,7 +489,7 @@ func (client *NotebookWorkspacesClient) regenerateAuthTokenCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -498,7 +498,7 @@ func (client *NotebookWorkspacesClient) regenerateAuthTokenCreateRequest(ctx con // BeginStart - Starts the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - notebookWorkspaceName - The name of the notebook workspace resource. @@ -524,7 +524,7 @@ func (client *NotebookWorkspacesClient) BeginStart(ctx context.Context, resource // Start - Starts the notebook workspace // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *NotebookWorkspacesClient) start(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "NotebookWorkspacesClient.BeginStart" @@ -570,7 +570,7 @@ func (client *NotebookWorkspacesClient) startCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client_example_test.go index 58e563f2b245..e056014a3447 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/notebookworkspaces_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBNotebookWorkspaceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBNotebookWorkspaceList.json func ExampleNotebookWorkspacesClient_NewListByDatabaseAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -54,7 +54,7 @@ func ExampleNotebookWorkspacesClient_NewListByDatabaseAccountPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBNotebookWorkspaceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBNotebookWorkspaceGet.json func ExampleNotebookWorkspacesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -83,7 +83,7 @@ func ExampleNotebookWorkspacesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBNotebookWorkspaceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBNotebookWorkspaceCreate.json func ExampleNotebookWorkspacesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -116,7 +116,7 @@ func ExampleNotebookWorkspacesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBNotebookWorkspaceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBNotebookWorkspaceDelete.json func ExampleNotebookWorkspacesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -137,7 +137,7 @@ func ExampleNotebookWorkspacesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json func ExampleNotebookWorkspacesClient_ListConnectionInfo() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -161,7 +161,7 @@ func ExampleNotebookWorkspacesClient_ListConnectionInfo() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json func ExampleNotebookWorkspacesClient_BeginRegenerateAuthToken() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -182,7 +182,7 @@ func ExampleNotebookWorkspacesClient_BeginRegenerateAuthToken() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBNotebookWorkspaceStart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBNotebookWorkspaceStart.json func ExampleNotebookWorkspacesClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/operations_client.go b/sdk/resourcemanager/cosmos/armcosmos/operations_client.go index a97d1eab07e5..ea622f62f92e 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/operations_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Cosmos DB Resource Provider operations. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-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]{ @@ -72,7 +72,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/operations_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/operations_client_example_test.go index babc46658bf5..619678c0e548 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/operations_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBOperationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBOperationsList.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/options.go b/sdk/resourcemanager/cosmos/armcosmos/options.go index 93d21ee1f216..f5b2a09eb3f0 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/options.go +++ b/sdk/resourcemanager/cosmos/armcosmos/options.go @@ -660,79 +660,6 @@ type LocationsClientListOptions struct { // placeholder for future optional parameters } -// MongoClustersClientBeginCreateOrUpdateFirewallRuleOptions contains the optional parameters for the MongoClustersClient.BeginCreateOrUpdateFirewallRule -// method. -type MongoClustersClientBeginCreateOrUpdateFirewallRuleOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MongoClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the MongoClustersClient.BeginCreateOrUpdate -// method. -type MongoClustersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MongoClustersClientBeginDeleteFirewallRuleOptions contains the optional parameters for the MongoClustersClient.BeginDeleteFirewallRule -// method. -type MongoClustersClientBeginDeleteFirewallRuleOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MongoClustersClientBeginDeleteOptions contains the optional parameters for the MongoClustersClient.BeginDelete method. -type MongoClustersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MongoClustersClientBeginUpdateOptions contains the optional parameters for the MongoClustersClient.BeginUpdate method. -type MongoClustersClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MongoClustersClientCheckNameAvailabilityOptions contains the optional parameters for the MongoClustersClient.CheckNameAvailability -// method. -type MongoClustersClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// MongoClustersClientGetFirewallRuleOptions contains the optional parameters for the MongoClustersClient.GetFirewallRule -// method. -type MongoClustersClientGetFirewallRuleOptions struct { - // placeholder for future optional parameters -} - -// MongoClustersClientGetOptions contains the optional parameters for the MongoClustersClient.Get method. -type MongoClustersClientGetOptions struct { - // placeholder for future optional parameters -} - -// MongoClustersClientListByResourceGroupOptions contains the optional parameters for the MongoClustersClient.NewListByResourceGroupPager -// method. -type MongoClustersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// MongoClustersClientListConnectionStringsOptions contains the optional parameters for the MongoClustersClient.ListConnectionStrings -// method. -type MongoClustersClientListConnectionStringsOptions struct { - // placeholder for future optional parameters -} - -// MongoClustersClientListFirewallRulesOptions contains the optional parameters for the MongoClustersClient.NewListFirewallRulesPager -// method. -type MongoClustersClientListFirewallRulesOptions struct { - // placeholder for future optional parameters -} - -// MongoClustersClientListOptions contains the optional parameters for the MongoClustersClient.NewListPager method. -type MongoClustersClientListOptions struct { - // placeholder for future optional parameters -} - // MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection // method. type MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions struct { @@ -940,6 +867,25 @@ type MongoDBResourcesClientListMongoUserDefinitionsOptions struct { // placeholder for future optional parameters } +// NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginReconcile +// method. +type NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NetworkSecurityPerimeterConfigurationsClientGetOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.Get +// method. +type NetworkSecurityPerimeterConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// NetworkSecurityPerimeterConfigurationsClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.NewListPager +// method. +type NetworkSecurityPerimeterConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + // NotebookWorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NotebookWorkspacesClient.BeginCreateOrUpdate // method. type NotebookWorkspacesClientBeginCreateOrUpdateOptions struct { diff --git a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client.go b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client.go index 3166f46f7b20..546989234fdb 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client.go @@ -28,7 +28,7 @@ type PartitionKeyRangeIDClient struct { } // NewPartitionKeyRangeIDClient creates a new instance of PartitionKeyRangeIDClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewPartitionKeyRangeIDClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PartitionKeyRangeIDClient, error) { @@ -45,7 +45,7 @@ func NewPartitionKeyRangeIDClient(subscriptionID string, credential azcore.Token // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given partition key range id. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseRid - Cosmos DB database rid. @@ -113,7 +113,7 @@ func (client *PartitionKeyRangeIDClient) listMetricsCreateRequest(ctx context.Co } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client_example_test.go index 17df27168aa0..d5f2a337e56b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeid_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPKeyRangeIdGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPKeyRangeIdGetMetrics.json func ExamplePartitionKeyRangeIDClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client.go b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client.go index 240ccf1725ed..4bad72ba1a77 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client.go @@ -28,7 +28,7 @@ type PartitionKeyRangeIDRegionClient struct { } // NewPartitionKeyRangeIDRegionClient creates a new instance of PartitionKeyRangeIDRegionClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewPartitionKeyRangeIDRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PartitionKeyRangeIDRegionClient, error) { @@ -45,7 +45,7 @@ func NewPartitionKeyRangeIDRegionClient(subscriptionID string, credential azcore // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given partition key range id and region. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - region - Cosmos DB region, with spaces between words and each word capitalized. @@ -118,7 +118,7 @@ func (client *PartitionKeyRangeIDRegionClient) listMetricsCreateRequest(ctx cont } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client_example_test.go index 23ad1732148b..4cb150ae97e2 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/partitionkeyrangeidregion_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json func ExamplePartitionKeyRangeIDRegionClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentile_client.go b/sdk/resourcemanager/cosmos/armcosmos/percentile_client.go index e0df8410e31a..e43dd0be060f 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentile_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentile_client.go @@ -28,7 +28,7 @@ type PercentileClient struct { } // NewPercentileClient creates a new instance of PercentileClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewPercentileClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PercentileClient, error) { @@ -46,7 +46,7 @@ func NewPercentileClient(subscriptionID string, credential azcore.TokenCredentia // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account. This url is // only for PBS and Replication Latency data // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are @@ -99,7 +99,7 @@ func (client *PercentileClient) listMetricsCreateRequest(ctx context.Context, re } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentile_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/percentile_client_example_test.go index ae5bebcfe903..6aaf53062340 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentile_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentile_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPercentileGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPercentileGetMetrics.json func ExamplePercentileClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client.go b/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client.go index 9975e20b2072..f0c281303098 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client.go @@ -28,7 +28,7 @@ type PercentileSourceTargetClient struct { } // NewPercentileSourceTargetClient creates a new instance of PercentileSourceTargetClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewPercentileSourceTargetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PercentileSourceTargetClient, error) { @@ -46,7 +46,7 @@ func NewPercentileSourceTargetClient(subscriptionID string, credential azcore.To // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given account, source and target region. // This url is only for PBS and Replication Latency data // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - sourceRegion - Source region from which data is written. Cosmos DB region, with spaces between words and each word capitalized. @@ -109,7 +109,7 @@ func (client *PercentileSourceTargetClient) listMetricsCreateRequest(ctx context } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client_example_test.go index 3fc48f540cc9..47aad78b29cd 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentilesourcetarget_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPercentileSourceTargetGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPercentileSourceTargetGetMetrics.json func ExamplePercentileSourceTargetClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client.go b/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client.go index d68b41a16266..2d5a51950343 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client.go @@ -28,7 +28,7 @@ type PercentileTargetClient struct { } // NewPercentileTargetClient creates a new instance of PercentileTargetClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewPercentileTargetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PercentileTargetClient, error) { @@ -46,7 +46,7 @@ func NewPercentileTargetClient(subscriptionID string, credential azcore.TokenCre // NewListMetricsPager - Retrieves the metrics determined by the given filter for the given account target region. This url // is only for PBS and Replication Latency data // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - targetRegion - Target region to which data is written. Cosmos DB region, with spaces between words and each word capitalized. @@ -104,7 +104,7 @@ func (client *PercentileTargetClient) listMetricsCreateRequest(ctx context.Conte } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client_example_test.go index 22016afc0595..6763aa64c93b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/percentiletarget_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPercentileTargetGetMetrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPercentileTargetGetMetrics.json func ExamplePercentileTargetClient_NewListMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/polymorphic_helpers.go b/sdk/resourcemanager/cosmos/armcosmos/polymorphic_helpers.go index b9ccb992391e..44396c811665 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/polymorphic_helpers.go +++ b/sdk/resourcemanager/cosmos/armcosmos/polymorphic_helpers.go @@ -62,6 +62,33 @@ func unmarshalDataTransferDataSourceSinkClassification(rawMsg json.RawMessage) ( return b, nil } +func unmarshalServiceResourceCreateUpdatePropertiesClassification(rawMsg json.RawMessage) (ServiceResourceCreateUpdatePropertiesClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ServiceResourceCreateUpdatePropertiesClassification + switch m["serviceType"] { + case string(ServiceTypeDataTransfer): + b = &DataTransferServiceResourceCreateUpdateProperties{} + case string(ServiceTypeGraphAPICompute): + b = &GraphAPIComputeServiceResourceCreateUpdateProperties{} + case string(ServiceTypeMaterializedViewsBuilder): + b = &MaterializedViewsBuilderServiceResourceCreateUpdateProperties{} + case string(ServiceTypeSQLDedicatedGateway): + b = &SQLDedicatedGatewayServiceResourceCreateUpdateProperties{} + default: + b = &ServiceResourceCreateUpdateProperties{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + func unmarshalServiceResourcePropertiesClassification(rawMsg json.RawMessage) (ServiceResourcePropertiesClassification, error) { if rawMsg == nil || string(rawMsg) == "null" { return nil, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client.go b/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client.go index 3d9d75588023..4fc7dc581b0f 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client.go @@ -28,7 +28,7 @@ type PrivateEndpointConnectionsClient struct { } // NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { @@ -46,7 +46,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -72,7 +72,7 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Approve or reject a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "PrivateEndpointConnectionsClient.BeginCreateOrUpdate" @@ -118,7 +118,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -130,7 +130,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -156,7 +156,7 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Deletes a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "PrivateEndpointConnectionsClient.BeginDelete" @@ -202,7 +202,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -211,7 +211,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -263,7 +263,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -280,7 +280,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListByDatabaseAccountPager - List all private endpoint connections on a Cosmos DB account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - PrivateEndpointConnectionsClientListByDatabaseAccountOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByDatabaseAccountPager @@ -329,7 +329,7 @@ func (client *PrivateEndpointConnectionsClient) listByDatabaseAccountCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client_example_test.go index aba77e879fbb..60e8e5a49fc0 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/privateendpointconnections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json func ExamplePrivateEndpointConnectionsClient_NewListByDatabaseAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,7 +80,7 @@ func ExamplePrivateEndpointConnectionsClient_NewListByDatabaseAccountPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPrivateEndpointConnectionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPrivateEndpointConnectionGet.json func ExamplePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -117,7 +117,7 @@ func ExamplePrivateEndpointConnectionsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -165,7 +165,7 @@ func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json func ExamplePrivateEndpointConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client.go index 9c9ac4032b77..9536ab2553d4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client.go @@ -28,7 +28,7 @@ type PrivateLinkResourcesClient struct { } // NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { @@ -46,7 +46,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Gets the private link resources that need to be created for a Cosmos DB account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - groupName - The name of the private link resource. @@ -98,7 +98,7 @@ func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,7 +115,7 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // NewListByDatabaseAccountPager - Gets the private link resources that need to be created for a Cosmos DB account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - PrivateLinkResourcesClientListByDatabaseAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByDatabaseAccountPager @@ -164,7 +164,7 @@ func (client *PrivateLinkResourcesClient) listByDatabaseAccountCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client_example_test.go index d2cf5963bfe1..8704e0ecad60 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/privatelinkresources_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPrivateLinkResourceListGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPrivateLinkResourceListGet.json func ExamplePrivateLinkResourcesClient_NewListByDatabaseAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -58,7 +58,7 @@ func ExamplePrivateLinkResourcesClient_NewListByDatabaseAccountPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBPrivateLinkResourceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBPrivateLinkResourceGet.json func ExamplePrivateLinkResourcesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/responses.go b/sdk/resourcemanager/cosmos/armcosmos/responses.go index 7dec5fc1a2eb..23a4aad97179 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/responses.go +++ b/sdk/resourcemanager/cosmos/armcosmos/responses.go @@ -611,76 +611,6 @@ type LocationsClientListResponse struct { LocationListResult } -// MongoClustersClientCheckNameAvailabilityResponse contains the response from method MongoClustersClient.CheckNameAvailability. -type MongoClustersClientCheckNameAvailabilityResponse struct { - // The check availability result. - CheckNameAvailabilityResponse -} - -// MongoClustersClientCreateOrUpdateFirewallRuleResponse contains the response from method MongoClustersClient.BeginCreateOrUpdateFirewallRule. -type MongoClustersClientCreateOrUpdateFirewallRuleResponse struct { - // Represents a mongo cluster firewall rule. - FirewallRule -} - -// MongoClustersClientCreateOrUpdateResponse contains the response from method MongoClustersClient.BeginCreateOrUpdate. -type MongoClustersClientCreateOrUpdateResponse struct { - // Represents a mongo cluster resource. - MongoCluster -} - -// MongoClustersClientDeleteFirewallRuleResponse contains the response from method MongoClustersClient.BeginDeleteFirewallRule. -type MongoClustersClientDeleteFirewallRuleResponse struct { - // placeholder for future response values -} - -// MongoClustersClientDeleteResponse contains the response from method MongoClustersClient.BeginDelete. -type MongoClustersClientDeleteResponse struct { - // placeholder for future response values -} - -// MongoClustersClientGetFirewallRuleResponse contains the response from method MongoClustersClient.GetFirewallRule. -type MongoClustersClientGetFirewallRuleResponse struct { - // Represents a mongo cluster firewall rule. - FirewallRule -} - -// MongoClustersClientGetResponse contains the response from method MongoClustersClient.Get. -type MongoClustersClientGetResponse struct { - // Represents a mongo cluster resource. - MongoCluster -} - -// MongoClustersClientListByResourceGroupResponse contains the response from method MongoClustersClient.NewListByResourceGroupPager. -type MongoClustersClientListByResourceGroupResponse struct { - // A list of mongo clusters. - MongoClusterListResult -} - -// MongoClustersClientListConnectionStringsResponse contains the response from method MongoClustersClient.ListConnectionStrings. -type MongoClustersClientListConnectionStringsResponse struct { - // The connection strings for the given mongo cluster. - ListConnectionStringsResult -} - -// MongoClustersClientListFirewallRulesResponse contains the response from method MongoClustersClient.NewListFirewallRulesPager. -type MongoClustersClientListFirewallRulesResponse struct { - // A list of firewall rules. - FirewallRuleListResult -} - -// MongoClustersClientListResponse contains the response from method MongoClustersClient.NewListPager. -type MongoClustersClientListResponse struct { - // A list of mongo clusters. - MongoClusterListResult -} - -// MongoClustersClientUpdateResponse contains the response from method MongoClustersClient.BeginUpdate. -type MongoClustersClientUpdateResponse struct { - // Represents a mongo cluster resource. - MongoCluster -} - // MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse contains the response from method MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection. type MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse struct { // An Azure Cosmos DB MongoDB collection. @@ -863,6 +793,23 @@ type MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse struct { ThroughputSettingsGetResults } +// NetworkSecurityPerimeterConfigurationsClientGetResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.Get. +type NetworkSecurityPerimeterConfigurationsClientGetResponse struct { + // Network security perimeter (NSP) configuration resource + NetworkSecurityPerimeterConfiguration +} + +// NetworkSecurityPerimeterConfigurationsClientListResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.NewListPager. +type NetworkSecurityPerimeterConfigurationsClientListResponse struct { + // Result of a list NSP (network security perimeter) configurations request. + NetworkSecurityPerimeterConfigurationListResult +} + +// NetworkSecurityPerimeterConfigurationsClientReconcileResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.BeginReconcile. +type NetworkSecurityPerimeterConfigurationsClientReconcileResponse struct { + // placeholder for future response values +} + // NotebookWorkspacesClientCreateOrUpdateResponse contains the response from method NotebookWorkspacesClient.BeginCreateOrUpdate. type NotebookWorkspacesClientCreateOrUpdateResponse struct { // A notebook workspace resource diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client.go index af970bed3b67..9dd018654b8c 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client.go @@ -28,7 +28,7 @@ type RestorableDatabaseAccountsClient struct { } // NewRestorableDatabaseAccountsClient creates a new instance of RestorableDatabaseAccountsClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableDatabaseAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableDatabaseAccountsClient, error) { @@ -47,7 +47,7 @@ func NewRestorableDatabaseAccountsClient(subscriptionID string, credential azcor // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableDatabaseAccountsClientGetByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.GetByLocation @@ -94,7 +94,7 @@ func (client *RestorableDatabaseAccountsClient) getByLocationCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -112,7 +112,7 @@ func (client *RestorableDatabaseAccountsClient) getByLocationHandleResponse(resp // NewListPager - Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - options - RestorableDatabaseAccountsClientListOptions contains the optional parameters for the RestorableDatabaseAccountsClient.NewListPager // method. func (client *RestorableDatabaseAccountsClient) NewListPager(options *RestorableDatabaseAccountsClientListOptions) *runtime.Pager[RestorableDatabaseAccountsClientListResponse] { @@ -151,7 +151,7 @@ func (client *RestorableDatabaseAccountsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -170,7 +170,7 @@ func (client *RestorableDatabaseAccountsClient) listHandleResponse(resp *http.Re // in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' // permission. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - options - RestorableDatabaseAccountsClientListByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.NewListByLocationPager // method. @@ -214,7 +214,7 @@ func (client *RestorableDatabaseAccountsClient) listByLocationCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client_example_test.go index b159c4bbcf3f..9e77ded16149 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabledatabaseaccounts_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableDatabaseAccountList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableDatabaseAccountList.json func ExampleRestorableDatabaseAccountsClient_NewListByLocationPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -94,7 +94,7 @@ func ExampleRestorableDatabaseAccountsClient_NewListByLocationPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json func ExampleRestorableDatabaseAccountsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -171,7 +171,7 @@ func ExampleRestorableDatabaseAccountsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableDatabaseAccountGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableDatabaseAccountGet.json func ExampleRestorableDatabaseAccountsClient_GetByLocation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client.go index 38c695cdac5a..64457942745d 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client.go @@ -28,7 +28,7 @@ type RestorableGremlinDatabasesClient struct { } // NewRestorableGremlinDatabasesClient creates a new instance of RestorableGremlinDatabasesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableGremlinDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableGremlinDatabasesClient, error) { @@ -47,7 +47,7 @@ func NewRestorableGremlinDatabasesClient(subscriptionID string, credential azcor // account. This helps in scenario where database was accidentally deleted to get the deletion // time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableGremlinDatabasesClientListOptions contains the optional parameters for the RestorableGremlinDatabasesClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableGremlinDatabasesClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client_example_test.go index 3ffa1b545f1f..5e04bb465912 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlindatabases_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableGremlinDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableGremlinDatabaseList.json func ExampleRestorableGremlinDatabasesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client.go index 8c2a710bd60f..dabc18c26dcb 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client.go @@ -28,7 +28,7 @@ type RestorableGremlinGraphsClient struct { } // NewRestorableGremlinGraphsClient creates a new instance of RestorableGremlinGraphsClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableGremlinGraphsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableGremlinGraphsClient, error) { @@ -47,7 +47,7 @@ func NewRestorableGremlinGraphsClient(subscriptionID string, credential azcore.T // This helps in scenario where container was accidentally deleted. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableGremlinGraphsClientListOptions contains the optional parameters for the RestorableGremlinGraphsClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableGremlinGraphsClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") if options != nil && options.EndTime != nil { reqQP.Set("endTime", *options.EndTime) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client_example_test.go index 5f0baa967512..575903a816cb 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlingraphs_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableGremlinGraphList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableGremlinGraphList.json func ExampleRestorableGremlinGraphsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client.go index 9c67bde3f414..a8b2d2006d1f 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client.go @@ -28,7 +28,7 @@ type RestorableGremlinResourcesClient struct { } // NewRestorableGremlinResourcesClient creates a new instance of RestorableGremlinResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableGremlinResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableGremlinResourcesClient, error) { @@ -47,7 +47,7 @@ func NewRestorableGremlinResourcesClient(subscriptionID string, credential azcor // location. This helps in scenarios to validate what resources exist at given timestamp and // location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableGremlinResourcesClientListOptions contains the optional parameters for the RestorableGremlinResourcesClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableGremlinResourcesClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") if options != nil && options.RestoreLocation != nil { reqQP.Set("restoreLocation", *options.RestoreLocation) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client_example_test.go index c7f2d808d555..421a54de2634 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablegremlinresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableGremlinResourceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableGremlinResourceList.json func ExampleRestorableGremlinResourcesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client.go index c75f5671f35d..aa299b32bdb0 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client.go @@ -28,7 +28,7 @@ type RestorableMongodbCollectionsClient struct { } // NewRestorableMongodbCollectionsClient creates a new instance of RestorableMongodbCollectionsClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableMongodbCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableMongodbCollectionsClient, error) { @@ -47,7 +47,7 @@ func NewRestorableMongodbCollectionsClient(subscriptionID string, credential azc // database. This helps in scenario where container was accidentally deleted. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableMongodbCollectionsClientListOptions contains the optional parameters for the RestorableMongodbCollectionsClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableMongodbCollectionsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") if options != nil && options.EndTime != nil { reqQP.Set("endTime", *options.EndTime) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client_example_test.go index cc7e5c04095f..ee4367a8ee23 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbcollections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableMongodbCollectionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableMongodbCollectionList.json func ExampleRestorableMongodbCollectionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client.go index 39e8875cbe34..922e2282ae9a 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client.go @@ -28,7 +28,7 @@ type RestorableMongodbDatabasesClient struct { } // NewRestorableMongodbDatabasesClient creates a new instance of RestorableMongodbDatabasesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableMongodbDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableMongodbDatabasesClient, error) { @@ -47,7 +47,7 @@ func NewRestorableMongodbDatabasesClient(subscriptionID string, credential azcor // account. This helps in scenario where database was accidentally deleted to get the deletion // time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableMongodbDatabasesClientListOptions contains the optional parameters for the RestorableMongodbDatabasesClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableMongodbDatabasesClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client_example_test.go index e37c021ace38..286cc83598d0 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbdatabases_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableMongodbDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableMongodbDatabaseList.json func ExampleRestorableMongodbDatabasesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client.go index bfb46913e5ed..a716bd56dfc8 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client.go @@ -28,7 +28,7 @@ type RestorableMongodbResourcesClient struct { } // NewRestorableMongodbResourcesClient creates a new instance of RestorableMongodbResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableMongodbResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableMongodbResourcesClient, error) { @@ -47,7 +47,7 @@ func NewRestorableMongodbResourcesClient(subscriptionID string, credential azcor // This helps in scenarios to validate what resources exist at given timestamp and location. // This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableMongodbResourcesClientListOptions contains the optional parameters for the RestorableMongodbResourcesClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableMongodbResourcesClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") if options != nil && options.RestoreLocation != nil { reqQP.Set("restoreLocation", *options.RestoreLocation) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client_example_test.go index 0abf4b78aab6..0bafae6e653f 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablemongodbresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableMongodbResourceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableMongodbResourceList.json func ExampleRestorableMongodbResourcesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client.go index 3be6a5f372d3..5b26e60cd6c9 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client.go @@ -28,7 +28,7 @@ type RestorableSQLContainersClient struct { } // NewRestorableSQLContainersClient creates a new instance of RestorableSQLContainersClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableSQLContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableSQLContainersClient, error) { @@ -47,7 +47,7 @@ func NewRestorableSQLContainersClient(subscriptionID string, credential azcore.T // This helps in scenario where container was accidentally deleted. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableSQLContainersClientListOptions contains the optional parameters for the RestorableSQLContainersClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableSQLContainersClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") if options != nil && options.EndTime != nil { reqQP.Set("endTime", *options.EndTime) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client_example_test.go index 314990dcc3fe..3e9208c0d81c 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlcontainers_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableSqlContainerList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableSqlContainerList.json func ExampleRestorableSQLContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client.go index 940d8537ac70..ba935cd4d3e4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client.go @@ -28,7 +28,7 @@ type RestorableSQLDatabasesClient struct { } // NewRestorableSQLDatabasesClient creates a new instance of RestorableSQLDatabasesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableSQLDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableSQLDatabasesClient, error) { @@ -47,7 +47,7 @@ func NewRestorableSQLDatabasesClient(subscriptionID string, credential azcore.To // account. This helps in scenario where database was accidentally deleted to get the deletion // time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableSQLDatabasesClientListOptions contains the optional parameters for the RestorableSQLDatabasesClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableSQLDatabasesClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client_example_test.go index 9f3f52bd015a..f7feef4d2cdc 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqldatabases_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableSqlDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableSqlDatabaseList.json func ExampleRestorableSQLDatabasesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client.go index b8b8e5fd849e..645a000af444 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client.go @@ -28,7 +28,7 @@ type RestorableSQLResourcesClient struct { } // NewRestorableSQLResourcesClient creates a new instance of RestorableSQLResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableSQLResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableSQLResourcesClient, error) { @@ -47,7 +47,7 @@ func NewRestorableSQLResourcesClient(subscriptionID string, credential azcore.To // This helps in scenarios to validate what resources exist at given timestamp and location. // This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableSQLResourcesClientListOptions contains the optional parameters for the RestorableSQLResourcesClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableSQLResourcesClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") if options != nil && options.RestoreLocation != nil { reqQP.Set("restoreLocation", *options.RestoreLocation) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client_example_test.go index 7650647b6fe2..2685253eb5ac 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorablesqlresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableSqlResourceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableSqlResourceList.json func ExampleRestorableSQLResourcesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client.go index b871d02d6e61..d8e902d4bce8 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client.go @@ -28,7 +28,7 @@ type RestorableTableResourcesClient struct { } // NewRestorableTableResourcesClient creates a new instance of RestorableTableResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableTableResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableTableResourcesClient, error) { @@ -47,7 +47,7 @@ func NewRestorableTableResourcesClient(subscriptionID string, credential azcore. // to validate what resources exist at given timestamp and location. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableTableResourcesClientListOptions contains the optional parameters for the RestorableTableResourcesClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableTableResourcesClient) listCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") if options != nil && options.RestoreLocation != nil { reqQP.Set("restoreLocation", *options.RestoreLocation) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client_example_test.go index f3192b7ee38a..a2acb92f0e22 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabletableresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableTableResourceList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableTableResourceList.json func ExampleRestorableTableResourcesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client.go b/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client.go index 3a0c724d35e4..c8c8c6d7de1d 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client.go @@ -28,7 +28,7 @@ type RestorableTablesClient struct { } // NewRestorableTablesClient creates a new instance of RestorableTablesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewRestorableTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableTablesClient, error) { @@ -47,7 +47,7 @@ func NewRestorableTablesClient(subscriptionID string, credential azcore.TokenCre // table was accidentally deleted. This API requires // 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - location - Cosmos DB region, with spaces between words and each word capitalized. // - instanceID - The instanceId GUID of a restorable database account. // - options - RestorableTablesClientListOptions contains the optional parameters for the RestorableTablesClient.NewListPager @@ -96,7 +96,7 @@ func (client *RestorableTablesClient) listCreateRequest(ctx context.Context, loc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") if options != nil && options.EndTime != nil { reqQP.Set("endTime", *options.EndTime) } diff --git a/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client_example_test.go index 2890dcdb9198..e9fe8a6f9fd5 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/restorabletables_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBRestorableTableList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBRestorableTableList.json func ExampleRestorableTablesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/service_client.go b/sdk/resourcemanager/cosmos/armcosmos/service_client.go index dc1d47cece21..60046cd1bd85 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/service_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/service_client.go @@ -28,7 +28,7 @@ type ServiceClient struct { } // NewServiceClient creates a new instance of ServiceClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceClient, error) { @@ -46,7 +46,7 @@ func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Creates a service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - serviceName - Cosmos DB service name. @@ -72,7 +72,7 @@ func (client *ServiceClient) BeginCreate(ctx context.Context, resourceGroupName // Create - Creates a service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *ServiceClient) create(ctx context.Context, resourceGroupName string, accountName string, serviceName string, createUpdateParameters ServiceResourceCreateUpdateParameters, options *ServiceClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "ServiceClient.BeginCreate" @@ -118,7 +118,7 @@ func (client *ServiceClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateParameters); err != nil { @@ -130,7 +130,7 @@ func (client *ServiceClient) createCreateRequest(ctx context.Context, resourceGr // BeginDelete - Deletes service with the given serviceName. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - serviceName - Cosmos DB service name. @@ -155,7 +155,7 @@ func (client *ServiceClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes service with the given serviceName. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *ServiceClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ServiceClient.BeginDelete" @@ -201,7 +201,7 @@ func (client *ServiceClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -210,7 +210,7 @@ func (client *ServiceClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets the status of service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - serviceName - Cosmos DB service name. @@ -261,7 +261,7 @@ func (client *ServiceClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -278,7 +278,7 @@ func (client *ServiceClient) getHandleResponse(resp *http.Response) (ServiceClie // NewListPager - Gets the status of service. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method. @@ -326,7 +326,7 @@ func (client *ServiceClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/service_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/service_client_example_test.go index f2c7a30035b1..e74e8f444e37 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/service_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/service_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBServicesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBServicesList.json func ExampleServiceClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleServiceClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDataTransferServiceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDataTransferServiceCreate.json func ExampleServiceClient_BeginCreate_dataTransferServiceCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -78,7 +78,7 @@ func ExampleServiceClient_BeginCreate_dataTransferServiceCreate() { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginCreate(ctx, "rg1", "ddb1", "DataTransfer", armcosmos.ServiceResourceCreateUpdateParameters{ - Properties: &armcosmos.ServiceResourceCreateUpdateProperties{ + Properties: &armcosmos.DataTransferServiceResourceCreateUpdateProperties{ InstanceCount: to.Ptr[int32](1), InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), ServiceType: to.Ptr(armcosmos.ServiceTypeDataTransfer), @@ -114,7 +114,7 @@ func ExampleServiceClient_BeginCreate_dataTransferServiceCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGraphAPIComputeServiceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGraphAPIComputeServiceCreate.json func ExampleServiceClient_BeginCreate_graphApiComputeServiceCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,7 +126,7 @@ func ExampleServiceClient_BeginCreate_graphApiComputeServiceCreate() { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginCreate(ctx, "rg1", "ddb1", "GraphAPICompute", armcosmos.ServiceResourceCreateUpdateParameters{ - Properties: &armcosmos.ServiceResourceCreateUpdateProperties{ + Properties: &armcosmos.GraphAPIComputeServiceResourceCreateUpdateProperties{ InstanceCount: to.Ptr[int32](1), InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), ServiceType: to.Ptr(armcosmos.ServiceTypeGraphAPICompute), @@ -164,7 +164,7 @@ func ExampleServiceClient_BeginCreate_graphApiComputeServiceCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json func ExampleServiceClient_BeginCreate_materializedViewsBuilderServiceCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -176,7 +176,7 @@ func ExampleServiceClient_BeginCreate_materializedViewsBuilderServiceCreate() { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginCreate(ctx, "rg1", "ddb1", "MaterializedViewsBuilder", armcosmos.ServiceResourceCreateUpdateParameters{ - Properties: &armcosmos.ServiceResourceCreateUpdateProperties{ + Properties: &armcosmos.MaterializedViewsBuilderServiceResourceCreateUpdateProperties{ InstanceCount: to.Ptr[int32](1), InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), ServiceType: to.Ptr(armcosmos.ServiceTypeMaterializedViewsBuilder), @@ -212,7 +212,7 @@ func ExampleServiceClient_BeginCreate_materializedViewsBuilderServiceCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDedicatedGatewayServiceCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceCreate.json func ExampleServiceClient_BeginCreate_sqlDedicatedGatewayServiceCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -224,10 +224,11 @@ func ExampleServiceClient_BeginCreate_sqlDedicatedGatewayServiceCreate() { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginCreate(ctx, "rg1", "ddb1", "SqlDedicatedGateway", armcosmos.ServiceResourceCreateUpdateParameters{ - Properties: &armcosmos.ServiceResourceCreateUpdateProperties{ - InstanceCount: to.Ptr[int32](1), - InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), - ServiceType: to.Ptr(armcosmos.ServiceTypeSQLDedicatedGateway), + Properties: &armcosmos.SQLDedicatedGatewayServiceResourceCreateUpdateProperties{ + InstanceCount: to.Ptr[int32](1), + InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), + ServiceType: to.Ptr(armcosmos.ServiceTypeSQLDedicatedGateway), + DedicatedGatewayType: to.Ptr(armcosmos.DedicatedGatewayTypeIntegratedCache), }, }, nil) if err != nil { @@ -250,6 +251,7 @@ func ExampleServiceClient_BeginCreate_sqlDedicatedGatewayServiceCreate() { // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeSQLDedicatedGateway), // Status: to.Ptr(armcosmos.ServiceStatusRunning), + // DedicatedGatewayType: to.Ptr(armcosmos.DedicatedGatewayTypeIntegratedCache), // Locations: []*armcosmos.SQLDedicatedGatewayRegionalServiceResource{ // { // Name: to.Ptr("SqlDedicatedGateway-westus2"), @@ -262,7 +264,7 @@ func ExampleServiceClient_BeginCreate_sqlDedicatedGatewayServiceCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDataTransferServiceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDataTransferServiceGet.json func ExampleServiceClient_Get_dataTransferServiceGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -300,7 +302,7 @@ func ExampleServiceClient_Get_dataTransferServiceGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGraphAPIComputeServiceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGraphAPIComputeServiceGet.json func ExampleServiceClient_Get_graphApiComputeServiceGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -340,7 +342,7 @@ func ExampleServiceClient_Get_graphApiComputeServiceGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMaterializedViewsBuilderServiceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMaterializedViewsBuilderServiceGet.json func ExampleServiceClient_Get_materializedViewsBuilderServiceGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -378,7 +380,7 @@ func ExampleServiceClient_Get_materializedViewsBuilderServiceGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDedicatedGatewayServiceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceGet.json func ExampleServiceClient_Get_sqlDedicatedGatewayServiceGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -406,6 +408,7 @@ func ExampleServiceClient_Get_sqlDedicatedGatewayServiceGet() { // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeSQLDedicatedGateway), // Status: to.Ptr(armcosmos.ServiceStatusRunning), + // DedicatedGatewayType: to.Ptr(armcosmos.DedicatedGatewayTypeIntegratedCache), // Locations: []*armcosmos.SQLDedicatedGatewayRegionalServiceResource{ // { // Name: to.Ptr("SqlDedicatedGateway-westus2"), @@ -418,7 +421,7 @@ func ExampleServiceClient_Get_sqlDedicatedGatewayServiceGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBDataTransferServiceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBDataTransferServiceDelete.json func ExampleServiceClient_BeginDelete_dataTransferServiceDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -439,7 +442,7 @@ func ExampleServiceClient_BeginDelete_dataTransferServiceDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBGraphAPIComputeServiceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBGraphAPIComputeServiceDelete.json func ExampleServiceClient_BeginDelete_graphApiComputeServiceDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -460,7 +463,7 @@ func ExampleServiceClient_BeginDelete_graphApiComputeServiceDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json func ExampleServiceClient_BeginDelete_materializedViewsBuilderServiceDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -481,7 +484,7 @@ func ExampleServiceClient_BeginDelete_materializedViewsBuilderServiceDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDedicatedGatewayServiceDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/services/sqldedicatedgateway/CosmosDBSqlDedicatedGatewayServiceDelete.json func ExampleServiceClient_BeginDelete_sqlDedicatedGatewayServiceDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client.go index c7a6ed018bcb..192441c29399 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client.go @@ -28,7 +28,7 @@ type SQLResourcesClient struct { } // NewSQLResourcesClient creates a new instance of SQLResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewSQLResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLResourcesClient, error) { @@ -47,7 +47,7 @@ func NewSQLResourcesClient(subscriptionID string, credential azcore.TokenCredent // such as the Azure Powershell (instead of directly). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -76,7 +76,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateClientEncryptionKey(ctx conte // as the Azure Powershell (instead of directly). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) createUpdateClientEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, databaseName string, clientEncryptionKeyName string, createUpdateClientEncryptionKeyParameters ClientEncryptionKeyCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginCreateUpdateClientEncryptionKey" @@ -126,7 +126,7 @@ func (client *SQLResourcesClient) createUpdateClientEncryptionKeyCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateClientEncryptionKeyParameters); err != nil { @@ -138,7 +138,7 @@ func (client *SQLResourcesClient) createUpdateClientEncryptionKeyCreateRequest(c // BeginCreateUpdateSQLContainer - Create or update an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -166,7 +166,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLContainer(ctx context.Cont // CreateUpdateSQLContainer - Create or update an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) createUpdateSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, createUpdateSQLContainerParameters SQLContainerCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLContainerOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginCreateUpdateSQLContainer" @@ -216,7 +216,7 @@ func (client *SQLResourcesClient) createUpdateSQLContainerCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateSQLContainerParameters); err != nil { @@ -228,7 +228,7 @@ func (client *SQLResourcesClient) createUpdateSQLContainerCreateRequest(ctx cont // BeginCreateUpdateSQLDatabase - Create or update an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -255,7 +255,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLDatabase(ctx context.Conte // CreateUpdateSQLDatabase - Create or update an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) createUpdateSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateSQLDatabaseParameters SQLDatabaseCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginCreateUpdateSQLDatabase" @@ -301,7 +301,7 @@ func (client *SQLResourcesClient) createUpdateSQLDatabaseCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateSQLDatabaseParameters); err != nil { @@ -313,7 +313,7 @@ func (client *SQLResourcesClient) createUpdateSQLDatabaseCreateRequest(ctx conte // BeginCreateUpdateSQLRoleAssignment - Creates or updates an Azure Cosmos DB SQL Role Assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - roleAssignmentID - The GUID for the Role Assignment. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -340,7 +340,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLRoleAssignment(ctx context // CreateUpdateSQLRoleAssignment - Creates or updates an Azure Cosmos DB SQL Role Assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) createUpdateSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, accountName string, createUpdateSQLRoleAssignmentParameters SQLRoleAssignmentCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginCreateUpdateSQLRoleAssignment" @@ -386,7 +386,7 @@ func (client *SQLResourcesClient) createUpdateSQLRoleAssignmentCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateSQLRoleAssignmentParameters); err != nil { @@ -398,7 +398,7 @@ func (client *SQLResourcesClient) createUpdateSQLRoleAssignmentCreateRequest(ctx // BeginCreateUpdateSQLRoleDefinition - Creates or updates an Azure Cosmos DB SQL Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - roleDefinitionID - The GUID for the Role Definition. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -425,7 +425,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLRoleDefinition(ctx context // CreateUpdateSQLRoleDefinition - Creates or updates an Azure Cosmos DB SQL Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) createUpdateSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, accountName string, createUpdateSQLRoleDefinitionParameters SQLRoleDefinitionCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginCreateUpdateSQLRoleDefinition" @@ -471,7 +471,7 @@ func (client *SQLResourcesClient) createUpdateSQLRoleDefinitionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateSQLRoleDefinitionParameters); err != nil { @@ -483,7 +483,7 @@ func (client *SQLResourcesClient) createUpdateSQLRoleDefinitionCreateRequest(ctx // BeginCreateUpdateSQLStoredProcedure - Create or update an Azure Cosmos DB SQL storedProcedure // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -512,7 +512,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLStoredProcedure(ctx contex // CreateUpdateSQLStoredProcedure - Create or update an Azure Cosmos DB SQL storedProcedure // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) createUpdateSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, createUpdateSQLStoredProcedureParameters SQLStoredProcedureCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginCreateUpdateSQLStoredProcedure" @@ -566,7 +566,7 @@ func (client *SQLResourcesClient) createUpdateSQLStoredProcedureCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateSQLStoredProcedureParameters); err != nil { @@ -578,7 +578,7 @@ func (client *SQLResourcesClient) createUpdateSQLStoredProcedureCreateRequest(ct // BeginCreateUpdateSQLTrigger - Create or update an Azure Cosmos DB SQL trigger // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -607,7 +607,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLTrigger(ctx context.Contex // CreateUpdateSQLTrigger - Create or update an Azure Cosmos DB SQL trigger // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) createUpdateSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, createUpdateSQLTriggerParameters SQLTriggerCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLTriggerOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginCreateUpdateSQLTrigger" @@ -661,7 +661,7 @@ func (client *SQLResourcesClient) createUpdateSQLTriggerCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateSQLTriggerParameters); err != nil { @@ -673,7 +673,7 @@ func (client *SQLResourcesClient) createUpdateSQLTriggerCreateRequest(ctx contex // BeginCreateUpdateSQLUserDefinedFunction - Create or update an Azure Cosmos DB SQL userDefinedFunction // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -702,7 +702,7 @@ func (client *SQLResourcesClient) BeginCreateUpdateSQLUserDefinedFunction(ctx co // CreateUpdateSQLUserDefinedFunction - Create or update an Azure Cosmos DB SQL userDefinedFunction // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) createUpdateSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, createUpdateSQLUserDefinedFunctionParameters SQLUserDefinedFunctionCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginCreateUpdateSQLUserDefinedFunction" @@ -756,7 +756,7 @@ func (client *SQLResourcesClient) createUpdateSQLUserDefinedFunctionCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateSQLUserDefinedFunctionParameters); err != nil { @@ -768,7 +768,7 @@ func (client *SQLResourcesClient) createUpdateSQLUserDefinedFunctionCreateReques // BeginDeleteSQLContainer - Deletes an existing Azure Cosmos DB SQL container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -795,7 +795,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLContainer(ctx context.Context, r // DeleteSQLContainer - Deletes an existing Azure Cosmos DB SQL container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) deleteSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientBeginDeleteSQLContainerOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginDeleteSQLContainer" @@ -845,7 +845,7 @@ func (client *SQLResourcesClient) deleteSQLContainerCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -853,7 +853,7 @@ func (client *SQLResourcesClient) deleteSQLContainerCreateRequest(ctx context.Co // BeginDeleteSQLDatabase - Deletes an existing Azure Cosmos DB SQL database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -879,7 +879,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLDatabase(ctx context.Context, re // DeleteSQLDatabase - Deletes an existing Azure Cosmos DB SQL database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) deleteSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientBeginDeleteSQLDatabaseOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginDeleteSQLDatabase" @@ -925,7 +925,7 @@ func (client *SQLResourcesClient) deleteSQLDatabaseCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -933,7 +933,7 @@ func (client *SQLResourcesClient) deleteSQLDatabaseCreateRequest(ctx context.Con // BeginDeleteSQLRoleAssignment - Deletes an existing Azure Cosmos DB SQL Role Assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - roleAssignmentID - The GUID for the Role Assignment. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -959,7 +959,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLRoleAssignment(ctx context.Conte // DeleteSQLRoleAssignment - Deletes an existing Azure Cosmos DB SQL Role Assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) deleteSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, accountName string, options *SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginDeleteSQLRoleAssignment" @@ -1005,7 +1005,7 @@ func (client *SQLResourcesClient) deleteSQLRoleAssignmentCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1014,7 +1014,7 @@ func (client *SQLResourcesClient) deleteSQLRoleAssignmentCreateRequest(ctx conte // BeginDeleteSQLRoleDefinition - Deletes an existing Azure Cosmos DB SQL Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - roleDefinitionID - The GUID for the Role Definition. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -1040,7 +1040,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLRoleDefinition(ctx context.Conte // DeleteSQLRoleDefinition - Deletes an existing Azure Cosmos DB SQL Role Definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) deleteSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, accountName string, options *SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginDeleteSQLRoleDefinition" @@ -1086,7 +1086,7 @@ func (client *SQLResourcesClient) deleteSQLRoleDefinitionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1095,7 +1095,7 @@ func (client *SQLResourcesClient) deleteSQLRoleDefinitionCreateRequest(ctx conte // BeginDeleteSQLStoredProcedure - Deletes an existing Azure Cosmos DB SQL storedProcedure. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1123,7 +1123,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLStoredProcedure(ctx context.Cont // DeleteSQLStoredProcedure - Deletes an existing Azure Cosmos DB SQL storedProcedure. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) deleteSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, options *SQLResourcesClientBeginDeleteSQLStoredProcedureOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginDeleteSQLStoredProcedure" @@ -1177,7 +1177,7 @@ func (client *SQLResourcesClient) deleteSQLStoredProcedureCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -1185,7 +1185,7 @@ func (client *SQLResourcesClient) deleteSQLStoredProcedureCreateRequest(ctx cont // BeginDeleteSQLTrigger - Deletes an existing Azure Cosmos DB SQL trigger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1213,7 +1213,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLTrigger(ctx context.Context, res // DeleteSQLTrigger - Deletes an existing Azure Cosmos DB SQL trigger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) deleteSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, options *SQLResourcesClientBeginDeleteSQLTriggerOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginDeleteSQLTrigger" @@ -1267,7 +1267,7 @@ func (client *SQLResourcesClient) deleteSQLTriggerCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -1275,7 +1275,7 @@ func (client *SQLResourcesClient) deleteSQLTriggerCreateRequest(ctx context.Cont // BeginDeleteSQLUserDefinedFunction - Deletes an existing Azure Cosmos DB SQL userDefinedFunction. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1303,7 +1303,7 @@ func (client *SQLResourcesClient) BeginDeleteSQLUserDefinedFunction(ctx context. // DeleteSQLUserDefinedFunction - Deletes an existing Azure Cosmos DB SQL userDefinedFunction. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) deleteSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, options *SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginDeleteSQLUserDefinedFunction" @@ -1357,7 +1357,7 @@ func (client *SQLResourcesClient) deleteSQLUserDefinedFunctionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -1365,7 +1365,7 @@ func (client *SQLResourcesClient) deleteSQLUserDefinedFunctionCreateRequest(ctx // GetClientEncryptionKey - Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1422,7 +1422,7 @@ func (client *SQLResourcesClient) getClientEncryptionKeyCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1440,7 +1440,7 @@ func (client *SQLResourcesClient) getClientEncryptionKeyHandleResponse(resp *htt // GetSQLContainer - Gets the SQL container under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1497,7 +1497,7 @@ func (client *SQLResourcesClient) getSQLContainerCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1515,7 +1515,7 @@ func (client *SQLResourcesClient) getSQLContainerHandleResponse(resp *http.Respo // GetSQLContainerThroughput - Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1572,7 +1572,7 @@ func (client *SQLResourcesClient) getSQLContainerThroughputCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1590,7 +1590,7 @@ func (client *SQLResourcesClient) getSQLContainerThroughputHandleResponse(resp * // GetSQLDatabase - Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1642,7 +1642,7 @@ func (client *SQLResourcesClient) getSQLDatabaseCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1661,7 +1661,7 @@ func (client *SQLResourcesClient) getSQLDatabaseHandleResponse(resp *http.Respon // with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1713,7 +1713,7 @@ func (client *SQLResourcesClient) getSQLDatabaseThroughputCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1731,7 +1731,7 @@ func (client *SQLResourcesClient) getSQLDatabaseThroughputHandleResponse(resp *h // GetSQLRoleAssignment - Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - roleAssignmentID - The GUID for the Role Assignment. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -1783,7 +1783,7 @@ func (client *SQLResourcesClient) getSQLRoleAssignmentCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1801,7 +1801,7 @@ func (client *SQLResourcesClient) getSQLRoleAssignmentHandleResponse(resp *http. // GetSQLRoleDefinition - Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - roleDefinitionID - The GUID for the Role Definition. // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. @@ -1853,7 +1853,7 @@ func (client *SQLResourcesClient) getSQLRoleDefinitionCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1871,7 +1871,7 @@ func (client *SQLResourcesClient) getSQLRoleDefinitionHandleResponse(resp *http. // GetSQLStoredProcedure - Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -1933,7 +1933,7 @@ func (client *SQLResourcesClient) getSQLStoredProcedureCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1951,7 +1951,7 @@ func (client *SQLResourcesClient) getSQLStoredProcedureHandleResponse(resp *http // GetSQLTrigger - Gets the SQL trigger under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2013,7 +2013,7 @@ func (client *SQLResourcesClient) getSQLTriggerCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2031,7 +2031,7 @@ func (client *SQLResourcesClient) getSQLTriggerHandleResponse(resp *http.Respons // GetSQLUserDefinedFunction - Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2093,7 +2093,7 @@ func (client *SQLResourcesClient) getSQLUserDefinedFunctionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2110,7 +2110,7 @@ func (client *SQLResourcesClient) getSQLUserDefinedFunctionHandleResponse(resp * // NewListClientEncryptionKeysPager - Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2164,7 +2164,7 @@ func (client *SQLResourcesClient) listClientEncryptionKeysCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2182,7 +2182,7 @@ func (client *SQLResourcesClient) listClientEncryptionKeysHandleResponse(resp *h // BeginListSQLContainerPartitionMerge - Merges the partitions of a SQL Container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2211,7 +2211,7 @@ func (client *SQLResourcesClient) BeginListSQLContainerPartitionMerge(ctx contex // ListSQLContainerPartitionMerge - Merges the partitions of a SQL Container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) listSQLContainerPartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, mergeParameters MergeParameters, options *SQLResourcesClientBeginListSQLContainerPartitionMergeOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginListSQLContainerPartitionMerge" @@ -2261,7 +2261,7 @@ func (client *SQLResourcesClient) listSQLContainerPartitionMergeCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, mergeParameters); err != nil { @@ -2272,7 +2272,7 @@ func (client *SQLResourcesClient) listSQLContainerPartitionMergeCreateRequest(ct // NewListSQLContainersPager - Lists the SQL container under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2326,7 +2326,7 @@ func (client *SQLResourcesClient) listSQLContainersCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2343,7 +2343,7 @@ func (client *SQLResourcesClient) listSQLContainersHandleResponse(resp *http.Res // NewListSQLDatabasesPager - Lists the SQL databases under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - SQLResourcesClientListSQLDatabasesOptions contains the optional parameters for the SQLResourcesClient.NewListSQLDatabasesPager @@ -2392,7 +2392,7 @@ func (client *SQLResourcesClient) listSQLDatabasesCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2409,7 +2409,7 @@ func (client *SQLResourcesClient) listSQLDatabasesHandleResponse(resp *http.Resp // NewListSQLRoleAssignmentsPager - Retrieves the list of all Azure Cosmos DB SQL Role Assignments. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - SQLResourcesClientListSQLRoleAssignmentsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLRoleAssignmentsPager @@ -2458,7 +2458,7 @@ func (client *SQLResourcesClient) listSQLRoleAssignmentsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2475,7 +2475,7 @@ func (client *SQLResourcesClient) listSQLRoleAssignmentsHandleResponse(resp *htt // NewListSQLRoleDefinitionsPager - Retrieves the list of all Azure Cosmos DB SQL Role Definitions. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - SQLResourcesClientListSQLRoleDefinitionsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLRoleDefinitionsPager @@ -2524,7 +2524,7 @@ func (client *SQLResourcesClient) listSQLRoleDefinitionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2541,7 +2541,7 @@ func (client *SQLResourcesClient) listSQLRoleDefinitionsHandleResponse(resp *htt // NewListSQLStoredProceduresPager - Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2600,7 +2600,7 @@ func (client *SQLResourcesClient) listSQLStoredProceduresCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2617,7 +2617,7 @@ func (client *SQLResourcesClient) listSQLStoredProceduresHandleResponse(resp *ht // NewListSQLTriggersPager - Lists the SQL trigger under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2676,7 +2676,7 @@ func (client *SQLResourcesClient) listSQLTriggersCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2693,7 +2693,7 @@ func (client *SQLResourcesClient) listSQLTriggersHandleResponse(resp *http.Respo // NewListSQLUserDefinedFunctionsPager - Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2752,7 +2752,7 @@ func (client *SQLResourcesClient) listSQLUserDefinedFunctionsCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2770,7 +2770,7 @@ func (client *SQLResourcesClient) listSQLUserDefinedFunctionsHandleResponse(resp // BeginMigrateSQLContainerToAutoscale - Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2797,7 +2797,7 @@ func (client *SQLResourcesClient) BeginMigrateSQLContainerToAutoscale(ctx contex // MigrateSQLContainerToAutoscale - Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) migrateSQLContainerToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginMigrateSQLContainerToAutoscale" @@ -2847,7 +2847,7 @@ func (client *SQLResourcesClient) migrateSQLContainerToAutoscaleCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2856,7 +2856,7 @@ func (client *SQLResourcesClient) migrateSQLContainerToAutoscaleCreateRequest(ct // BeginMigrateSQLContainerToManualThroughput - Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2883,7 +2883,7 @@ func (client *SQLResourcesClient) BeginMigrateSQLContainerToManualThroughput(ctx // MigrateSQLContainerToManualThroughput - Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) migrateSQLContainerToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginMigrateSQLContainerToManualThroughput" @@ -2933,7 +2933,7 @@ func (client *SQLResourcesClient) migrateSQLContainerToManualThroughputCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2942,7 +2942,7 @@ func (client *SQLResourcesClient) migrateSQLContainerToManualThroughputCreateReq // BeginMigrateSQLDatabaseToAutoscale - Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -2968,7 +2968,7 @@ func (client *SQLResourcesClient) BeginMigrateSQLDatabaseToAutoscale(ctx context // MigrateSQLDatabaseToAutoscale - Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) migrateSQLDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginMigrateSQLDatabaseToAutoscale" @@ -3014,7 +3014,7 @@ func (client *SQLResourcesClient) migrateSQLDatabaseToAutoscaleCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3023,7 +3023,7 @@ func (client *SQLResourcesClient) migrateSQLDatabaseToAutoscaleCreateRequest(ctx // BeginMigrateSQLDatabaseToManualThroughput - Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3049,7 +3049,7 @@ func (client *SQLResourcesClient) BeginMigrateSQLDatabaseToManualThroughput(ctx // MigrateSQLDatabaseToManualThroughput - Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) migrateSQLDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginMigrateSQLDatabaseToManualThroughput" @@ -3095,7 +3095,7 @@ func (client *SQLResourcesClient) migrateSQLDatabaseToManualThroughputCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3104,7 +3104,7 @@ func (client *SQLResourcesClient) migrateSQLDatabaseToManualThroughputCreateRequ // BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a container resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3133,7 +3133,7 @@ func (client *SQLResourcesClient) BeginRetrieveContinuousBackupInformation(ctx c // RetrieveContinuousBackupInformation - Retrieves continuous backup information for a container resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) retrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, location ContinuousBackupRestoreLocation, options *SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginRetrieveContinuousBackupInformation" @@ -3183,7 +3183,7 @@ func (client *SQLResourcesClient) retrieveContinuousBackupInformationCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, location); err != nil { @@ -3195,7 +3195,7 @@ func (client *SQLResourcesClient) retrieveContinuousBackupInformationCreateReque // BeginSQLContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3224,7 +3224,7 @@ func (client *SQLResourcesClient) BeginSQLContainerRedistributeThroughput(ctx co // SQLContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) sQLContainerRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, redistributeThroughputParameters RedistributeThroughputParameters, options *SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginSQLContainerRedistributeThroughput" @@ -3274,7 +3274,7 @@ func (client *SQLResourcesClient) sqlContainerRedistributeThroughputCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, redistributeThroughputParameters); err != nil { @@ -3286,7 +3286,7 @@ func (client *SQLResourcesClient) sqlContainerRedistributeThroughputCreateReques // BeginSQLContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3315,7 +3315,7 @@ func (client *SQLResourcesClient) BeginSQLContainerRetrieveThroughputDistributio // SQLContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) sQLContainerRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, retrieveThroughputParameters RetrieveThroughputParameters, options *SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginSQLContainerRetrieveThroughputDistribution" @@ -3365,7 +3365,7 @@ func (client *SQLResourcesClient) sqlContainerRetrieveThroughputDistributionCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, retrieveThroughputParameters); err != nil { @@ -3377,7 +3377,7 @@ func (client *SQLResourcesClient) sqlContainerRetrieveThroughputDistributionCrea // BeginSQLDatabasePartitionMerge - Merges the partitions of a SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3405,7 +3405,7 @@ func (client *SQLResourcesClient) BeginSQLDatabasePartitionMerge(ctx context.Con // SQLDatabasePartitionMerge - Merges the partitions of a SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) sQLDatabasePartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, mergeParameters MergeParameters, options *SQLResourcesClientBeginSQLDatabasePartitionMergeOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginSQLDatabasePartitionMerge" @@ -3451,7 +3451,7 @@ func (client *SQLResourcesClient) sqlDatabasePartitionMergeCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, mergeParameters); err != nil { @@ -3463,7 +3463,7 @@ func (client *SQLResourcesClient) sqlDatabasePartitionMergeCreateRequest(ctx con // BeginSQLDatabaseRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3491,7 +3491,7 @@ func (client *SQLResourcesClient) BeginSQLDatabaseRedistributeThroughput(ctx con // SQLDatabaseRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) sQLDatabaseRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, redistributeThroughputParameters RedistributeThroughputParameters, options *SQLResourcesClientBeginSQLDatabaseRedistributeThroughputOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginSQLDatabaseRedistributeThroughput" @@ -3537,7 +3537,7 @@ func (client *SQLResourcesClient) sqlDatabaseRedistributeThroughputCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, redistributeThroughputParameters); err != nil { @@ -3549,7 +3549,7 @@ func (client *SQLResourcesClient) sqlDatabaseRedistributeThroughputCreateRequest // BeginSQLDatabaseRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3577,7 +3577,7 @@ func (client *SQLResourcesClient) BeginSQLDatabaseRetrieveThroughputDistribution // SQLDatabaseRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) sQLDatabaseRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, retrieveThroughputParameters RetrieveThroughputParameters, options *SQLResourcesClientBeginSQLDatabaseRetrieveThroughputDistributionOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginSQLDatabaseRetrieveThroughputDistribution" @@ -3623,7 +3623,7 @@ func (client *SQLResourcesClient) sqlDatabaseRetrieveThroughputDistributionCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, retrieveThroughputParameters); err != nil { @@ -3635,7 +3635,7 @@ func (client *SQLResourcesClient) sqlDatabaseRetrieveThroughputDistributionCreat // BeginUpdateSQLContainerThroughput - Update RUs per second of an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3663,7 +3663,7 @@ func (client *SQLResourcesClient) BeginUpdateSQLContainerThroughput(ctx context. // UpdateSQLContainerThroughput - Update RUs per second of an Azure Cosmos DB SQL container // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) updateSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *SQLResourcesClientBeginUpdateSQLContainerThroughputOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginUpdateSQLContainerThroughput" @@ -3713,7 +3713,7 @@ func (client *SQLResourcesClient) updateSQLContainerThroughputCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { @@ -3725,7 +3725,7 @@ func (client *SQLResourcesClient) updateSQLContainerThroughputCreateRequest(ctx // BeginUpdateSQLDatabaseThroughput - Update RUs per second of an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - databaseName - Cosmos DB database name. @@ -3752,7 +3752,7 @@ func (client *SQLResourcesClient) BeginUpdateSQLDatabaseThroughput(ctx context.C // UpdateSQLDatabaseThroughput - Update RUs per second of an Azure Cosmos DB SQL database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *SQLResourcesClient) updateSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions) (*http.Response, error) { var err error const operationName = "SQLResourcesClient.BeginUpdateSQLDatabaseThroughput" @@ -3798,7 +3798,7 @@ func (client *SQLResourcesClient) updateSQLDatabaseThroughputCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client_example_test.go index 3e9d597bba99..c3f193991f3b 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/sqlresources_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseList.json func ExampleSQLResourcesClient_NewListSQLDatabasesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleSQLResourcesClient_NewListSQLDatabasesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseGet.json func ExampleSQLResourcesClient_GetSQLDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,7 +104,7 @@ func ExampleSQLResourcesClient_GetSQLDatabase() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLDatabase_cosmosDbSqlDatabaseCreateUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -153,7 +153,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLDatabase_cosmosDbSqlDatabaseC // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseRestore.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseRestore.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLDatabase_cosmosDbSqlDatabaseRestore() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -208,7 +208,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLDatabase_cosmosDbSqlDatabaseR // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLDatabase() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -229,7 +229,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLDatabase() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseThroughputGet.json func ExampleSQLResourcesClient_GetSQLDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -269,7 +269,7 @@ func ExampleSQLResourcesClient_GetSQLDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseThroughputUpdate.json func ExampleSQLResourcesClient_BeginUpdateSQLDatabaseThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -319,7 +319,7 @@ func ExampleSQLResourcesClient_BeginUpdateSQLDatabaseThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json func ExampleSQLResourcesClient_BeginMigrateSQLDatabaseToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -358,7 +358,7 @@ func ExampleSQLResourcesClient_BeginMigrateSQLDatabaseToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json func ExampleSQLResourcesClient_BeginMigrateSQLDatabaseToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -394,7 +394,7 @@ func ExampleSQLResourcesClient_BeginMigrateSQLDatabaseToManualThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlClientEncryptionKeysList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlClientEncryptionKeysList.json func ExampleSQLResourcesClient_NewListClientEncryptionKeysPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -464,7 +464,7 @@ func ExampleSQLResourcesClient_NewListClientEncryptionKeysPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlClientEncryptionKeyGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlClientEncryptionKeyGet.json func ExampleSQLResourcesClient_GetClientEncryptionKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -505,7 +505,7 @@ func ExampleSQLResourcesClient_GetClientEncryptionKey() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateClientEncryptionKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -564,7 +564,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateClientEncryptionKey() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerList.json func ExampleSQLResourcesClient_NewListSQLContainersPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -795,7 +795,7 @@ func ExampleSQLResourcesClient_NewListSQLContainersPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerGet.json func ExampleSQLResourcesClient_GetSQLContainer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -887,7 +887,7 @@ func ExampleSQLResourcesClient_GetSQLContainer() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlContainerCreateUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1041,7 +1041,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlContaine // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerRestore.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerRestore.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlContainerRestore() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1144,7 +1144,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlContaine // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlMaterializedViewCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlMaterializedViewCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlMaterializedViewCreateUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1254,7 +1254,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLContainer_cosmosDbSqlMaterial // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLContainer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1275,7 +1275,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLContainer() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabasePartitionMerge.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabasePartitionMerge.json func ExampleSQLResourcesClient_BeginSQLDatabasePartitionMerge() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1328,7 +1328,7 @@ func ExampleSQLResourcesClient_BeginSQLDatabasePartitionMerge() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json func ExampleSQLResourcesClient_BeginListSQLContainerPartitionMerge() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1381,7 +1381,7 @@ func ExampleSQLResourcesClient_BeginListSQLContainerPartitionMerge() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerThroughputGet.json func ExampleSQLResourcesClient_GetSQLContainerThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1421,7 +1421,7 @@ func ExampleSQLResourcesClient_GetSQLContainerThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerThroughputUpdate.json func ExampleSQLResourcesClient_BeginUpdateSQLContainerThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1471,7 +1471,7 @@ func ExampleSQLResourcesClient_BeginUpdateSQLContainerThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerMigrateToAutoscale.json func ExampleSQLResourcesClient_BeginMigrateSQLContainerToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1510,7 +1510,7 @@ func ExampleSQLResourcesClient_BeginMigrateSQLContainerToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerMigrateToManualThroughput.json func ExampleSQLResourcesClient_BeginMigrateSQLContainerToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1546,7 +1546,7 @@ func ExampleSQLResourcesClient_BeginMigrateSQLContainerToManualThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseRetrieveThroughputDistribution.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseRetrieveThroughputDistribution.json func ExampleSQLResourcesClient_BeginSQLDatabaseRetrieveThroughputDistribution() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1597,7 +1597,7 @@ func ExampleSQLResourcesClient_BeginSQLDatabaseRetrieveThroughputDistribution() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlDatabaseRedistributeThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlDatabaseRedistributeThroughput.json func ExampleSQLResourcesClient_BeginSQLDatabaseRedistributeThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1667,7 +1667,7 @@ func ExampleSQLResourcesClient_BeginSQLDatabaseRedistributeThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json func ExampleSQLResourcesClient_BeginSQLContainerRetrieveThroughputDistribution() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1718,7 +1718,7 @@ func ExampleSQLResourcesClient_BeginSQLContainerRetrieveThroughputDistribution() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json func ExampleSQLResourcesClient_BeginSQLContainerRedistributeThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1788,7 +1788,7 @@ func ExampleSQLResourcesClient_BeginSQLContainerRedistributeThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlStoredProcedureList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlStoredProcedureList.json func ExampleSQLResourcesClient_NewListSQLStoredProceduresPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1830,7 +1830,7 @@ func ExampleSQLResourcesClient_NewListSQLStoredProceduresPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlStoredProcedureGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlStoredProcedureGet.json func ExampleSQLResourcesClient_GetSQLStoredProcedure() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1864,7 +1864,7 @@ func ExampleSQLResourcesClient_GetSQLStoredProcedure() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlStoredProcedureCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlStoredProcedureCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLStoredProcedure() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1910,7 +1910,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLStoredProcedure() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlStoredProcedureDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlStoredProcedureDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLStoredProcedure() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1931,7 +1931,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLStoredProcedure() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlUserDefinedFunctionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlUserDefinedFunctionList.json func ExampleSQLResourcesClient_NewListSQLUserDefinedFunctionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1973,7 +1973,7 @@ func ExampleSQLResourcesClient_NewListSQLUserDefinedFunctionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlUserDefinedFunctionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlUserDefinedFunctionGet.json func ExampleSQLResourcesClient_GetSQLUserDefinedFunction() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2007,7 +2007,7 @@ func ExampleSQLResourcesClient_GetSQLUserDefinedFunction() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLUserDefinedFunction() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2053,7 +2053,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLUserDefinedFunction() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlUserDefinedFunctionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlUserDefinedFunctionDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLUserDefinedFunction() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2074,7 +2074,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLUserDefinedFunction() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlTriggerList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlTriggerList.json func ExampleSQLResourcesClient_NewListSQLTriggersPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2118,7 +2118,7 @@ func ExampleSQLResourcesClient_NewListSQLTriggersPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlTriggerGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlTriggerGet.json func ExampleSQLResourcesClient_GetSQLTrigger() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2154,7 +2154,7 @@ func ExampleSQLResourcesClient_GetSQLTrigger() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlTriggerCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlTriggerCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLTrigger() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2204,7 +2204,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLTrigger() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlTriggerDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlTriggerDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLTrigger() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2225,7 +2225,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLTrigger() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlRoleDefinitionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlRoleDefinitionGet.json func ExampleSQLResourcesClient_GetSQLRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2265,7 +2265,7 @@ func ExampleSQLResourcesClient_GetSQLRoleDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2322,7 +2322,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLRoleDefinition() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlRoleDefinitionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlRoleDefinitionDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLRoleDefinition() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2343,7 +2343,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLRoleDefinition() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlRoleDefinitionList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlRoleDefinitionList.json func ExampleSQLResourcesClient_NewListSQLRoleDefinitionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2391,7 +2391,7 @@ func ExampleSQLResourcesClient_NewListSQLRoleDefinitionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlRoleAssignmentGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlRoleAssignmentGet.json func ExampleSQLResourcesClient_GetSQLRoleAssignment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2421,7 +2421,7 @@ func ExampleSQLResourcesClient_GetSQLRoleAssignment() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json func ExampleSQLResourcesClient_BeginCreateUpdateSQLRoleAssignment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2461,7 +2461,7 @@ func ExampleSQLResourcesClient_BeginCreateUpdateSQLRoleAssignment() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlRoleAssignmentDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlRoleAssignmentDelete.json func ExampleSQLResourcesClient_BeginDeleteSQLRoleAssignment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2482,7 +2482,7 @@ func ExampleSQLResourcesClient_BeginDeleteSQLRoleAssignment() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlRoleAssignmentList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlRoleAssignmentList.json func ExampleSQLResourcesClient_NewListSQLRoleAssignmentsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2520,7 +2520,7 @@ func ExampleSQLResourcesClient_NewListSQLRoleAssignmentsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBSqlContainerBackupInformation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBSqlContainerBackupInformation.json func ExampleSQLResourcesClient_BeginRetrieveContinuousBackupInformation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/tableresources_client.go b/sdk/resourcemanager/cosmos/armcosmos/tableresources_client.go index ca52c5687dbe..1e9628d284f5 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/tableresources_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/tableresources_client.go @@ -28,7 +28,7 @@ type TableResourcesClient struct { } // NewTableResourcesClient creates a new instance of TableResourcesClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewTableResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TableResourcesClient, error) { @@ -46,7 +46,7 @@ func NewTableResourcesClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateUpdateTable - Create or update an Azure Cosmos DB Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -73,7 +73,7 @@ func (client *TableResourcesClient) BeginCreateUpdateTable(ctx context.Context, // CreateUpdateTable - Create or update an Azure Cosmos DB Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *TableResourcesClient) createUpdateTable(ctx context.Context, resourceGroupName string, accountName string, tableName string, createUpdateTableParameters TableCreateUpdateParameters, options *TableResourcesClientBeginCreateUpdateTableOptions) (*http.Response, error) { var err error const operationName = "TableResourcesClient.BeginCreateUpdateTable" @@ -119,7 +119,7 @@ func (client *TableResourcesClient) createUpdateTableCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, createUpdateTableParameters); err != nil { @@ -131,7 +131,7 @@ func (client *TableResourcesClient) createUpdateTableCreateRequest(ctx context.C // BeginDeleteTable - Deletes an existing Azure Cosmos DB Table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -157,7 +157,7 @@ func (client *TableResourcesClient) BeginDeleteTable(ctx context.Context, resour // DeleteTable - Deletes an existing Azure Cosmos DB Table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *TableResourcesClient) deleteTable(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientBeginDeleteTableOptions) (*http.Response, error) { var err error const operationName = "TableResourcesClient.BeginDeleteTable" @@ -203,7 +203,7 @@ func (client *TableResourcesClient) deleteTableCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -211,7 +211,7 @@ func (client *TableResourcesClient) deleteTableCreateRequest(ctx context.Context // GetTable - Gets the Tables under an existing Azure Cosmos DB database account with the provided name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -262,7 +262,7 @@ func (client *TableResourcesClient) getTableCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +281,7 @@ func (client *TableResourcesClient) getTableHandleResponse(resp *http.Response) // name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -333,7 +333,7 @@ func (client *TableResourcesClient) getTableThroughputCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -350,7 +350,7 @@ func (client *TableResourcesClient) getTableThroughputHandleResponse(resp *http. // NewListTablesPager - Lists the Tables under an existing Azure Cosmos DB database account. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - options - TableResourcesClientListTablesOptions contains the optional parameters for the TableResourcesClient.NewListTablesPager @@ -399,7 +399,7 @@ func (client *TableResourcesClient) listTablesCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -417,7 +417,7 @@ func (client *TableResourcesClient) listTablesHandleResponse(resp *http.Response // BeginMigrateTableToAutoscale - Migrate an Azure Cosmos DB Table from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -443,7 +443,7 @@ func (client *TableResourcesClient) BeginMigrateTableToAutoscale(ctx context.Con // MigrateTableToAutoscale - Migrate an Azure Cosmos DB Table from manual throughput to autoscale // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *TableResourcesClient) migrateTableToAutoscale(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientBeginMigrateTableToAutoscaleOptions) (*http.Response, error) { var err error const operationName = "TableResourcesClient.BeginMigrateTableToAutoscale" @@ -489,7 +489,7 @@ func (client *TableResourcesClient) migrateTableToAutoscaleCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -498,7 +498,7 @@ func (client *TableResourcesClient) migrateTableToAutoscaleCreateRequest(ctx con // BeginMigrateTableToManualThroughput - Migrate an Azure Cosmos DB Table from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -524,7 +524,7 @@ func (client *TableResourcesClient) BeginMigrateTableToManualThroughput(ctx cont // MigrateTableToManualThroughput - Migrate an Azure Cosmos DB Table from autoscale to manual throughput // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *TableResourcesClient) migrateTableToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientBeginMigrateTableToManualThroughputOptions) (*http.Response, error) { var err error const operationName = "TableResourcesClient.BeginMigrateTableToManualThroughput" @@ -570,7 +570,7 @@ func (client *TableResourcesClient) migrateTableToManualThroughputCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -579,7 +579,7 @@ func (client *TableResourcesClient) migrateTableToManualThroughputCreateRequest( // BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -607,7 +607,7 @@ func (client *TableResourcesClient) BeginRetrieveContinuousBackupInformation(ctx // RetrieveContinuousBackupInformation - Retrieves continuous backup information for a table. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *TableResourcesClient) retrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, tableName string, location ContinuousBackupRestoreLocation, options *TableResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*http.Response, error) { var err error const operationName = "TableResourcesClient.BeginRetrieveContinuousBackupInformation" @@ -653,7 +653,7 @@ func (client *TableResourcesClient) retrieveContinuousBackupInformationCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, location); err != nil { @@ -665,7 +665,7 @@ func (client *TableResourcesClient) retrieveContinuousBackupInformationCreateReq // BeginUpdateTableThroughput - Update RUs per second of an Azure Cosmos DB Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - accountName - Cosmos DB database account name. // - tableName - Cosmos DB table name. @@ -692,7 +692,7 @@ func (client *TableResourcesClient) BeginUpdateTableThroughput(ctx context.Conte // UpdateTableThroughput - Update RUs per second of an Azure Cosmos DB Table // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *TableResourcesClient) updateTableThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *TableResourcesClientBeginUpdateTableThroughputOptions) (*http.Response, error) { var err error const operationName = "TableResourcesClient.BeginUpdateTableThroughput" @@ -738,7 +738,7 @@ func (client *TableResourcesClient) updateTableThroughputCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, updateThroughputParameters); err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/tableresources_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/tableresources_client_example_test.go index 48eeae3259cb..2ceb1c923988 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/tableresources_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/tableresources_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBTableList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBTableList.json func ExampleTableResourcesClient_NewListTablesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,7 +59,7 @@ func ExampleTableResourcesClient_NewListTablesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBTableGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBTableGet.json func ExampleTableResourcesClient_GetTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -95,7 +95,7 @@ func ExampleTableResourcesClient_GetTable() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBTableCreateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBTableCreateUpdate.json func ExampleTableResourcesClient_BeginCreateUpdateTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -139,7 +139,7 @@ func ExampleTableResourcesClient_BeginCreateUpdateTable() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBTableDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBTableDelete.json func ExampleTableResourcesClient_BeginDeleteTable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -160,7 +160,7 @@ func ExampleTableResourcesClient_BeginDeleteTable() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBTableThroughputGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBTableThroughputGet.json func ExampleTableResourcesClient_GetTableThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -200,7 +200,7 @@ func ExampleTableResourcesClient_GetTableThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBTableThroughputUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBTableThroughputUpdate.json func ExampleTableResourcesClient_BeginUpdateTableThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -250,7 +250,7 @@ func ExampleTableResourcesClient_BeginUpdateTableThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBTableMigrateToAutoscale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBTableMigrateToAutoscale.json func ExampleTableResourcesClient_BeginMigrateTableToAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -289,7 +289,7 @@ func ExampleTableResourcesClient_BeginMigrateTableToAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBTableMigrateToManualThroughput.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBTableMigrateToManualThroughput.json func ExampleTableResourcesClient_BeginMigrateTableToManualThroughput() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -325,7 +325,7 @@ func ExampleTableResourcesClient_BeginMigrateTableToManualThroughput() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/CosmosDBTableBackupInformation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/CosmosDBTableBackupInformation.json func ExampleTableResourcesClient_BeginRetrieveContinuousBackupInformation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/throughputpool_client.go b/sdk/resourcemanager/cosmos/armcosmos/throughputpool_client.go index a4e13c94e5c8..151145a9b388 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/throughputpool_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/throughputpool_client.go @@ -28,7 +28,7 @@ type ThroughputPoolClient struct { } // NewThroughputPoolClient creates a new instance of ThroughputPoolClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewThroughputPoolClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ThroughputPoolClient, error) { @@ -47,7 +47,7 @@ func NewThroughputPoolClient(subscriptionID string, credential azcore.TokenCrede // performing updates on an account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - throughputPoolName - Cosmos DB Throughput Pool name. // - body - The parameters to provide for the current ThroughputPool. @@ -75,7 +75,7 @@ func (client *ThroughputPoolClient) BeginCreateOrUpdate(ctx context.Context, res // updates on an account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *ThroughputPoolClient) createOrUpdate(ctx context.Context, resourceGroupName string, throughputPoolName string, body ThroughputPoolResource, options *ThroughputPoolClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ThroughputPoolClient.BeginCreateOrUpdate" @@ -117,7 +117,7 @@ func (client *ThroughputPoolClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -129,7 +129,7 @@ func (client *ThroughputPoolClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Deletes an existing Azure Cosmos DB Throughput Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - throughputPoolName - Cosmos DB Throughput Pool name. // - options - ThroughputPoolClientBeginDeleteOptions contains the optional parameters for the ThroughputPoolClient.BeginDelete @@ -154,7 +154,7 @@ func (client *ThroughputPoolClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes an existing Azure Cosmos DB Throughput Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *ThroughputPoolClient) deleteOperation(ctx context.Context, resourceGroupName string, throughputPoolName string, options *ThroughputPoolClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ThroughputPoolClient.BeginDelete" @@ -196,7 +196,7 @@ func (client *ThroughputPoolClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -205,7 +205,7 @@ func (client *ThroughputPoolClient) deleteCreateRequest(ctx context.Context, res // Get - Retrieves the properties of an existing Azure Cosmos DB Throughput Pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - throughputPoolName - Cosmos DB Throughput Pool name. // - options - ThroughputPoolClientGetOptions contains the optional parameters for the ThroughputPoolClient.Get method. @@ -251,7 +251,7 @@ func (client *ThroughputPoolClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,7 +269,7 @@ func (client *ThroughputPoolClient) getHandleResponse(resp *http.Response) (Thro // BeginUpdate - Updates the properties of an existing Azure Cosmos DB Throughput Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - throughputPoolName - Cosmos DB Throughput Pool name. // - options - ThroughputPoolClientBeginUpdateOptions contains the optional parameters for the ThroughputPoolClient.BeginUpdate @@ -295,7 +295,7 @@ func (client *ThroughputPoolClient) BeginUpdate(ctx context.Context, resourceGro // Update - Updates the properties of an existing Azure Cosmos DB Throughput Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *ThroughputPoolClient) update(ctx context.Context, resourceGroupName string, throughputPoolName string, options *ThroughputPoolClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ThroughputPoolClient.BeginUpdate" @@ -337,7 +337,7 @@ func (client *ThroughputPoolClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/throughputpool_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/throughputpool_client_example_test.go index 4aca0a2b001f..9c16359ed94d 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/throughputpool_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/throughputpool_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/throughputPool/CosmosDBThroughputPoolGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/throughputPool/CosmosDBThroughputPoolGet.json func ExampleThroughputPoolClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -52,7 +52,7 @@ func ExampleThroughputPoolClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/throughputPool/CosmosDBThroughputPoolCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/throughputPool/CosmosDBThroughputPoolCreate.json func ExampleThroughputPoolClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -97,7 +97,7 @@ func ExampleThroughputPoolClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/throughputPool/CosmosDBThroughputPoolUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/throughputPool/CosmosDBThroughputPoolUpdate.json func ExampleThroughputPoolClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -141,7 +141,7 @@ func ExampleThroughputPoolClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/throughputPool/CosmosDBThroughputPoolDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/throughputPool/CosmosDBThroughputPoolDelete.json func ExampleThroughputPoolClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccount_client.go b/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccount_client.go index 532420dd0d88..14f6f73a9ec4 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccount_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccount_client.go @@ -28,7 +28,7 @@ type ThroughputPoolAccountClient struct { } // NewThroughputPoolAccountClient creates a new instance of ThroughputPoolAccountClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewThroughputPoolAccountClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ThroughputPoolAccountClient, error) { @@ -47,7 +47,7 @@ func NewThroughputPoolAccountClient(subscriptionID string, credential azcore.Tok // updates on an account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - throughputPoolName - Cosmos DB Throughput Pool name. // - throughputPoolAccountName - Cosmos DB global database account in a Throughput Pool @@ -76,7 +76,7 @@ func (client *ThroughputPoolAccountClient) BeginCreate(ctx context.Context, reso // updates on an account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *ThroughputPoolAccountClient) create(ctx context.Context, resourceGroupName string, throughputPoolName string, throughputPoolAccountName string, body ThroughputPoolAccountResource, options *ThroughputPoolAccountClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "ThroughputPoolAccountClient.BeginCreate" @@ -122,7 +122,7 @@ func (client *ThroughputPoolAccountClient) createCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -134,7 +134,7 @@ func (client *ThroughputPoolAccountClient) createCreateRequest(ctx context.Conte // BeginDelete - Removes an existing Azure Cosmos DB database account from a throughput pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - throughputPoolName - Cosmos DB Throughput Pool name. // - throughputPoolAccountName - Cosmos DB global database account in a Throughput Pool @@ -160,7 +160,7 @@ func (client *ThroughputPoolAccountClient) BeginDelete(ctx context.Context, reso // Delete - Removes an existing Azure Cosmos DB database account from a throughput pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview func (client *ThroughputPoolAccountClient) deleteOperation(ctx context.Context, resourceGroupName string, throughputPoolName string, throughputPoolAccountName string, options *ThroughputPoolAccountClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ThroughputPoolAccountClient.BeginDelete" @@ -206,7 +206,7 @@ func (client *ThroughputPoolAccountClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -215,7 +215,7 @@ func (client *ThroughputPoolAccountClient) deleteCreateRequest(ctx context.Conte // Get - Retrieves the properties of an existing Azure Cosmos DB Throughput Pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - throughputPoolName - Cosmos DB Throughput Pool name. // - throughputPoolAccountName - Cosmos DB global database account in a Throughput Pool @@ -267,7 +267,7 @@ func (client *ThroughputPoolAccountClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccount_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccount_client_example_test.go index 68f01dc87640..4abaed2e7c1c 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccount_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccount_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/throughputPool/CosmosDBThroughputPoolAccountGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/throughputPool/CosmosDBThroughputPoolAccountGet.json func ExampleThroughputPoolAccountClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -47,7 +47,7 @@ func ExampleThroughputPoolAccountClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/throughputPool/CosmosDBThroughputPoolAccountCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/throughputPool/CosmosDBThroughputPoolAccountCreate.json func ExampleThroughputPoolAccountClient_BeginCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -85,7 +85,7 @@ func ExampleThroughputPoolAccountClient_BeginCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/throughputPool/CosmosDBThroughputPoolAccountDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/throughputPool/CosmosDBThroughputPoolAccountDelete.json func ExampleThroughputPoolAccountClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccounts_client.go b/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccounts_client.go index fef99de37bf4..cabaddb5f76e 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccounts_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccounts_client.go @@ -28,7 +28,7 @@ type ThroughputPoolAccountsClient struct { } // NewThroughputPoolAccountsClient creates a new instance of ThroughputPoolAccountsClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewThroughputPoolAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ThroughputPoolAccountsClient, error) { @@ -45,7 +45,7 @@ func NewThroughputPoolAccountsClient(subscriptionID string, credential azcore.To // NewListPager - Lists all the Azure Cosmos DB accounts available under the subscription. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - throughputPoolName - Cosmos DB Throughput Pool name. // - options - ThroughputPoolAccountsClientListOptions contains the optional parameters for the ThroughputPoolAccountsClient.NewListPager @@ -93,7 +93,7 @@ func (client *ThroughputPoolAccountsClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccounts_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccounts_client_example_test.go index e85602821520..526ad9c08008 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccounts_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/throughputpoolaccounts_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/throughputPool/CosmosDBThroughputPoolAccountsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/throughputPool/CosmosDBThroughputPoolAccountsList.json func ExampleThroughputPoolAccountsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/cosmos/armcosmos/throughputpools_client.go b/sdk/resourcemanager/cosmos/armcosmos/throughputpools_client.go index df1abf7a55d6..4e1a7c21dc39 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/throughputpools_client.go +++ b/sdk/resourcemanager/cosmos/armcosmos/throughputpools_client.go @@ -28,7 +28,7 @@ type ThroughputPoolsClient struct { } // NewThroughputPoolsClient creates a new instance of ThroughputPoolsClient with the specified values. -// - subscriptionID - The ID of the target subscription. +// - 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 NewThroughputPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ThroughputPoolsClient, error) { @@ -45,7 +45,7 @@ func NewThroughputPoolsClient(subscriptionID string, credential azcore.TokenCred // NewListPager - Lists all the Azure Cosmos DB Throughput Pools available under the subscription. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - options - ThroughputPoolsClientListOptions contains the optional parameters for the ThroughputPoolsClient.NewListPager // method. func (client *ThroughputPoolsClient) NewListPager(options *ThroughputPoolsClientListOptions) *runtime.Pager[ThroughputPoolsClientListResponse] { @@ -83,7 +83,7 @@ func (client *ThroughputPoolsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -100,7 +100,7 @@ func (client *ThroughputPoolsClient) listHandleResponse(resp *http.Response) (Th // NewListByResourceGroupPager - List all the ThroughputPools in a given resource group. // -// Generated from API version 2024-02-15-preview +// Generated from API version 2024-05-15-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ThroughputPoolsClientListByResourceGroupOptions contains the optional parameters for the ThroughputPoolsClient.NewListByResourceGroupPager // method. @@ -143,7 +143,7 @@ func (client *ThroughputPoolsClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-02-15-preview") + reqQP.Set("api-version", "2024-05-15-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/cosmos/armcosmos/throughputpools_client_example_test.go b/sdk/resourcemanager/cosmos/armcosmos/throughputpools_client_example_test.go index 8e1b2d1a7e1b..7cf70a15fbd5 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/throughputpools_client_example_test.go +++ b/sdk/resourcemanager/cosmos/armcosmos/throughputpools_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/examples/throughputPool/CosmosDBThroughputPoolList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/51cbd0e070cbbe29abbef09b29066f0bace78527/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-05-15-preview/examples/throughputPool/CosmosDBThroughputPoolList.json func ExampleThroughputPoolsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { From f097485fee02d9d725c7b53a6e81485d2b020d81 Mon Sep 17 00:00:00 2001 From: Alancere <804873052@qq.com> Date: Tue, 18 Jun 2024 14:33:36 +0800 Subject: [PATCH 2/3] add removeUnreferencedTypes flag --- .../cosmos/armcosmos/CHANGELOG.md | 26 +- sdk/resourcemanager/cosmos/armcosmos/build.go | 2 +- .../cosmos/armcosmos/constants.go | 16 - .../cosmos/armcosmos/models.go | 251 ------- .../cosmos/armcosmos/models_serde.go | 692 +----------------- 5 files changed, 25 insertions(+), 962 deletions(-) diff --git a/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md b/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md index 0328f88abe45..b00795b8d1aa 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md +++ b/sdk/resourcemanager/cosmos/armcosmos/CHANGELOG.md @@ -9,6 +9,7 @@ - Enum `CheckNameAvailabilityReason` has been removed - Enum `MongoClusterStatus` has been removed - Enum `NodeKind` has been removed +- Enum `NodeStatus` has been removed - Enum `ProvisioningState` has been removed - Function `*ClientFactory.NewMongoClustersClient` has been removed - Function `NewMongoClustersClient` has been removed @@ -24,13 +25,23 @@ - Function `*MongoClustersClient.NewListFirewallRulesPager` has been removed - Function `*MongoClustersClient.NewListPager` has been removed - Function `*MongoClustersClient.BeginUpdate` has been removed +- Struct `ARMProxyResource` has been removed +- Struct `ARMResourceProperties` has been removed - Struct `CheckNameAvailabilityRequest` has been removed - Struct `CheckNameAvailabilityResponse` has been removed - Struct `ConnectionString` has been removed +- Struct `DataTransferServiceResource` has been removed +- Struct `ErrorAdditionalInfo` has been removed +- Struct `ErrorDetail` has been removed +- Struct `ErrorResponse` has been removed +- Struct `ExtendedResourceProperties` has been removed - Struct `FirewallRule` has been removed - Struct `FirewallRuleListResult` has been removed - Struct `FirewallRuleProperties` has been removed +- Struct `GraphAPIComputeServiceResource` has been removed - Struct `ListConnectionStringsResult` has been removed +- Struct `ManagedCassandraARMResourceProperties` has been removed +- Struct `MaterializedViewsBuilderServiceResource` has been removed - Struct `MongoCluster` has been removed - Struct `MongoClusterListResult` has been removed - Struct `MongoClusterProperties` has been removed @@ -38,9 +49,18 @@ - Struct `MongoClusterUpdate` has been removed - Struct `NodeGroupProperties` has been removed - Struct `NodeGroupSpec` has been removed +- Struct `OptionsResource` has been removed +- Struct `PhysicalPartitionThroughputInfoProperties` has been removed +- Struct `ProxyResource` has been removed - Struct `ProxyResourceAutoGenerated` has been removed +- Struct `RegionalServiceResource` has been removed +- Struct `Resource` has been removed - Struct `ResourceAutoGenerated` has been removed -- Field `Code`, `Message` of struct `ErrorResponse` has been removed +- Struct `RestoreParametersBase` has been removed +- Struct `SQLDedicatedGatewayServiceResource` has been removed +- Struct `ThroughputPoolAccountCreateParameters` has been removed +- Struct `ThroughputPoolAccountCreateProperties` has been removed +- Struct `TrackedResource` has been removed - Field `Error` of struct `ErrorResponseAutoGenerated` has been removed ### Features Added @@ -58,6 +78,7 @@ - New function `*DataTransferServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` - New function `*GraphAPIComputeServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` - New function `*MaterializedViewsBuilderServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` +- New function `PossibleCapacityModeValues() []CapacityMode` - New function `*SQLDedicatedGatewayServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` - New function `*ServiceResourceCreateUpdateProperties.GetServiceResourceCreateUpdateProperties() *ServiceResourceCreateUpdateProperties` - New function `NewNetworkSecurityPerimeterConfigurationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationsClient, error)` @@ -83,11 +104,8 @@ - New field `CapacityMode` in struct `DatabaseAccountCreateUpdateProperties` - New field `CapacityMode`, `CapacityModeChangeTransitionState` in struct `DatabaseAccountGetProperties` - New field `CapacityMode` in struct `DatabaseAccountUpdateProperties` -- New field `Error` in struct `ErrorResponse` - New field `Code`, `Message` in struct `ErrorResponseAutoGenerated` - New field `SystemData` in struct `PrivateEndpointConnection` -- New field `SystemData` in struct `ProxyResource` -- New field `SystemData` in struct `Resource` - New field `DedicatedGatewayType` in struct `SQLDedicatedGatewayServiceResourceProperties` diff --git a/sdk/resourcemanager/cosmos/armcosmos/build.go b/sdk/resourcemanager/cosmos/armcosmos/build.go index ff1da43c0591..1664c00d00aa 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/build.go +++ b/sdk/resourcemanager/cosmos/armcosmos/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/cosmos/armcosmos +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -removeUnreferencedTypes resourcemanager/cosmos/armcosmos package armcosmos diff --git a/sdk/resourcemanager/cosmos/armcosmos/constants.go b/sdk/resourcemanager/cosmos/armcosmos/constants.go index dac677ae00a5..3d9230a074c7 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/constants.go +++ b/sdk/resourcemanager/cosmos/armcosmos/constants.go @@ -793,22 +793,6 @@ func PossibleNodeStateValues() []NodeState { } } -// NodeStatus - Indicates whether the node is functioning or not. -type NodeStatus string - -const ( - NodeStatusDown NodeStatus = "Down" - NodeStatusUp NodeStatus = "Up" -) - -// PossibleNodeStatusValues returns the possible values for the NodeStatus const type. -func PossibleNodeStatusValues() []NodeStatus { - return []NodeStatus{ - NodeStatusDown, - NodeStatusUp, - } -} - type NotebookWorkspaceName string const ( diff --git a/sdk/resourcemanager/cosmos/armcosmos/models.go b/sdk/resourcemanager/cosmos/armcosmos/models.go index 60fb4daf5af2..8af0bb1bdaef 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/models.go +++ b/sdk/resourcemanager/cosmos/armcosmos/models.go @@ -15,44 +15,6 @@ type APIProperties struct { ServerVersion *ServerVersion } -// ARMProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required -// location and tags -type ARMProxyResource struct { - // READ-ONLY; The unique resource identifier of the database account. - ID *string - - // READ-ONLY; The name of the database account. - Name *string - - // READ-ONLY; The type of Azure resource. - Type *string -} - -// ARMResourceProperties - The core properties of ARM resources. -type ARMResourceProperties struct { - // Identity for the resource. - Identity *ManagedServiceIdentity - - // The location of the resource group to which the resource belongs. - Location *string - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string - - // READ-ONLY; The unique resource identifier of the ARM resource. - ID *string - - // READ-ONLY; The name of the ARM resource. - Name *string - - // READ-ONLY; The type of Azure resource. - Type *string -} - // AccessRule - Access rule in a network security perimeter configuration profile type AccessRule struct { // Name of the access rule @@ -1403,12 +1365,6 @@ type DataTransferRegionalServiceResource struct { Status *ServiceStatus } -// DataTransferServiceResource - Describes the service response property. -type DataTransferServiceResource struct { - // Properties for DataTransferServiceResource. - Properties *DataTransferServiceResourceProperties -} - // DataTransferServiceResourceCreateUpdateProperties - Properties for Create or Update request for DataTransferServiceResource type DataTransferServiceResourceCreateUpdateProperties struct { // REQUIRED; ServiceType for the service. @@ -2030,40 +1986,6 @@ type DiagnosticLogSettings struct { EnableFullTextQuery *EnableFullTextQuery } -// ErrorAdditionalInfo - The resource management error additional info. -type ErrorAdditionalInfo struct { - // READ-ONLY; The additional info. - Info any - - // READ-ONLY; The additional info type. - Type *string -} - -// ErrorDetail - The error detail. -type ErrorDetail struct { - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo - - // READ-ONLY; The error code. - Code *string - - // READ-ONLY; The error details. - Details []*ErrorDetail - - // READ-ONLY; The error message. - Message *string - - // READ-ONLY; The error target. - Target *string -} - -// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. -// (This also follows the OData error response format.). -type ErrorResponse struct { - // The error object. - Error *ErrorDetail -} - // ErrorResponseAutoGenerated - Error Response. type ErrorResponseAutoGenerated struct { // Error code. @@ -2078,19 +2000,6 @@ type ExcludedPath struct { Path *string } -// ExtendedResourceProperties - The system generated resource properties associated with SQL databases, SQL containers, Gremlin -// databases and Gremlin graphs. -type ExtendedResourceProperties struct { - // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. - Etag *string - - // READ-ONLY; A system generated property. A unique identifier. - Rid *string - - // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. - Ts *float32 -} - // FailoverPolicies - The list of new failover policies for the failover priority change. type FailoverPolicies struct { // REQUIRED; List of failover policies. @@ -2126,12 +2035,6 @@ type GraphAPIComputeRegionalServiceResource struct { Status *ServiceStatus } -// GraphAPIComputeServiceResource - Describes the service response property for GraphAPICompute. -type GraphAPIComputeServiceResource struct { - // Properties for GraphAPIComputeServiceResource. - Properties *GraphAPIComputeServiceResourceProperties -} - // GraphAPIComputeServiceResourceCreateUpdateProperties - Properties for Create or Update request for GraphAPIComputeServiceResource type GraphAPIComputeServiceResourceCreateUpdateProperties struct { // REQUIRED; ServiceType for the service. @@ -2734,31 +2637,6 @@ type LocationProperties struct { SupportsAvailabilityZone *bool } -// ManagedCassandraARMResourceProperties - The core properties of ARM resources. -type ManagedCassandraARMResourceProperties struct { - // Identity for the resource. - Identity *ManagedCassandraManagedServiceIdentity - - // The location of the resource group to which the resource belongs. - Location *string - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string - - // READ-ONLY; The unique resource identifier of the ARM resource. - ID *string - - // READ-ONLY; The name of the ARM resource. - Name *string - - // READ-ONLY; The type of Azure resource. - Type *string -} - // ManagedCassandraManagedServiceIdentity - Identity for the resource. type ManagedCassandraManagedServiceIdentity struct { // The type of the resource. @@ -2826,12 +2704,6 @@ type MaterializedViewsBuilderRegionalServiceResource struct { Status *ServiceStatus } -// MaterializedViewsBuilderServiceResource - Describes the service response property for MaterializedViewsBuilder. -type MaterializedViewsBuilderServiceResource struct { - // Properties for MaterializedViewsBuilderServiceResource. - Properties *MaterializedViewsBuilderServiceResourceProperties -} - // MaterializedViewsBuilderServiceResourceCreateUpdateProperties - Properties for Create or Update request for MaterializedViewsBuilderServiceResource type MaterializedViewsBuilderServiceResourceCreateUpdateProperties struct { // REQUIRED; ServiceType for the service. @@ -3548,16 +3420,6 @@ type OperationListResult struct { Value []*Operation } -// OptionsResource - Cosmos DB options resource object -type OptionsResource struct { - // Specifies the Autoscale settings. - AutoscaleSettings *AutoscaleSettings - - // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer - // details. - Throughput *int32 -} - // PartitionMetric - The metric values for a single partition. type PartitionMetric struct { // READ-ONLY; The end time for the metric (ISO-8601 format). @@ -3752,13 +3614,6 @@ type PhysicalPartitionStorageInfoCollection struct { PhysicalPartitionStorageInfoCollection []*PhysicalPartitionStorageInfo } -// PhysicalPartitionThroughputInfoProperties - The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoProperties -// object -type PhysicalPartitionThroughputInfoProperties struct { - // Array of physical partition throughput info objects - PhysicalPartitionThroughputInfo []*PhysicalPartitionThroughputInfoResource -} - // PhysicalPartitionThroughputInfoResource - PhysicalPartitionThroughputInfo object type PhysicalPartitionThroughputInfoResource struct { // REQUIRED; Id of a physical partition @@ -3949,22 +3804,6 @@ type ProvisioningIssueProperties struct { SuggestedResourceIDs []*string } -// ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a -// location -type ProxyResource struct { - // 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 -} - // RedistributeThroughputParameters - Cosmos DB redistribute throughput parameters object type RedistributeThroughputParameters struct { // REQUIRED; Properties to redistribute throughput parameters object @@ -4017,33 +3856,6 @@ type RegionForOnlineOffline struct { Region *string } -// RegionalServiceResource - Resource for a regional service location. -type RegionalServiceResource struct { - // READ-ONLY; The location name. - Location *string - - // READ-ONLY; The regional service name. - Name *string - - // READ-ONLY; Describes the status of a service. - Status *ServiceStatus -} - -// Resource - Common fields that are returned in the response for all Azure Resource Manager resources -type Resource struct { - // 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 -} - // ResourceAssociation - Information about resource association type ResourceAssociation struct { // Access mode of the resource association @@ -4693,19 +4505,6 @@ type RestoreParameters struct { TablesToRestore []*string } -// RestoreParametersBase - Parameters to indicate the information about the restore. -type RestoreParametersBase struct { - // The id of the restorable database account from which the restore has to be initiated. For example: - // /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} - RestoreSource *string - - // Time to which the account has to be restored (ISO-8601 format). - RestoreTimestampInUTC *time.Time - - // Specifies whether the restored account will have Time-To-Live disabled upon the successful restore. - RestoreWithTTLDisabled *bool -} - // RetrieveThroughputParameters - Cosmos DB retrieve throughput parameters object type RetrieveThroughputParameters struct { // REQUIRED; Properties to retrieve throughput parameters object @@ -5097,12 +4896,6 @@ type SQLDedicatedGatewayRegionalServiceResource struct { Status *ServiceStatus } -// SQLDedicatedGatewayServiceResource - Describes the service response property for SqlDedicatedGateway. -type SQLDedicatedGatewayServiceResource struct { - // Properties for SqlDedicatedGatewayServiceResource. - Properties *SQLDedicatedGatewayServiceResourceProperties -} - // SQLDedicatedGatewayServiceResourceCreateUpdateProperties - Properties for Create or Update request for SqlDedicatedGatewayServiceResource type SQLDedicatedGatewayServiceResourceCreateUpdateProperties struct { // REQUIRED; ServiceType for the service. @@ -5807,28 +5600,6 @@ type ThroughputPolicyResource struct { IsEnabled *bool } -// ThroughputPoolAccountCreateParameters - Parameters for creating a Azure Cosmos DB throughput pool account. -type ThroughputPoolAccountCreateParameters struct { - // Properties to update Azure Cosmos DB throughput pool. - Properties *ThroughputPoolAccountCreateProperties - - // Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource - // (across resource groups). A maximum of 15 tags can be provided for a - // resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, - // the default experience for a template type is set with "defaultExperience": - // "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". - Tags map[string]*string -} - -// ThroughputPoolAccountCreateProperties - Properties to update Azure Cosmos DB throughput pool. -type ThroughputPoolAccountCreateProperties struct { - // The location of global database account in the throughputPool. - AccountLocation *string - - // The resource identifier of global database account in the throughputPool. - AccountResourceIdentifier *string -} - // ThroughputPoolAccountProperties - An Azure Cosmos DB Global Database Account which is part of a Throughputpool. type ThroughputPoolAccountProperties struct { // The location of global database account in the throughputPool. @@ -6037,28 +5808,6 @@ type ThroughputSettingsUpdateProperties struct { Resource *ThroughputSettingsResource } -// TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' -// and a 'location' -type TrackedResource struct { - // REQUIRED; The geo-location where the resource lives - Location *string - - // 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 -} - // UniqueKey - The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB // service. type UniqueKey struct { diff --git a/sdk/resourcemanager/cosmos/armcosmos/models_serde.go b/sdk/resourcemanager/cosmos/armcosmos/models_serde.go index 5a79c148557b..d3d8125534f1 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/models_serde.go +++ b/sdk/resourcemanager/cosmos/armcosmos/models_serde.go @@ -43,88 +43,6 @@ func (a *APIProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ARMProxyResource. -func (a ARMProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ARMProxyResource. -func (a *ARMProxyResource) 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 "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - 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 ARMResourceProperties. -func (a ARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ARMResourceProperties. -func (a *ARMResourceProperties) 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 "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &a.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - 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 AccessRule. func (a AccessRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3493,33 +3411,6 @@ func (d *DataTransferRegionalServiceResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResource. -func (d DataTransferServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferServiceResource. -func (d *DataTransferServiceResource) 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", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResourceCreateUpdateProperties. func (d DataTransferServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4602,107 +4493,6 @@ func (d *DiagnosticLogSettings) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. -func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateAny(objectMap, "info", e.Info) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. -func (e *ErrorAdditionalInfo) 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", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "info": - err = unpopulate(val, "Info", &e.Info) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. -func (e ErrorDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "additionalInfo", e.AdditionalInfo) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. -func (e *ErrorDetail) 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", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) - delete(rawMsg, key) - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &e.Details) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &e.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. -func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", e.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. -func (e *ErrorResponse) 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", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &e.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ErrorResponseAutoGenerated. func (e ErrorResponseAutoGenerated) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4761,41 +4551,6 @@ func (e *ExcludedPath) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ExtendedResourceProperties. -func (e ExtendedResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "_etag", e.Etag) - populate(objectMap, "_rid", e.Rid) - populate(objectMap, "_ts", e.Ts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedResourceProperties. -func (e *ExtendedResourceProperties) 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", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "_etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "_rid": - err = unpopulate(val, "Rid", &e.Rid) - delete(rawMsg, key) - case "_ts": - err = unpopulate(val, "Ts", &e.Ts) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type FailoverPolicies. func (f FailoverPolicies) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4897,33 +4652,6 @@ func (g *GraphAPIComputeRegionalServiceResource) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResource. -func (g GraphAPIComputeServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", g.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResource. -func (g *GraphAPIComputeServiceResource) 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", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResourceCreateUpdateProperties. func (g GraphAPIComputeServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6435,53 +6163,6 @@ func (l *LocationProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedCassandraARMResourceProperties. -func (m ManagedCassandraARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraARMResourceProperties. -func (m *ManagedCassandraARMResourceProperties) 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 "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - 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 ManagedCassandraManagedServiceIdentity. func (m ManagedCassandraManagedServiceIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6661,35 +6342,8 @@ func (m *MaterializedViewsBuilderRegionalServiceResource) UnmarshalJSON(data []b return nil } -// MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResource. -func (m MaterializedViewsBuilderServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", m.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderServiceResource. -func (m *MaterializedViewsBuilderServiceResource) 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 "properties": - err = unpopulate(val, "Properties", &m.Properties) - 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 MaterializedViewsBuilderServiceResourceCreateUpdateProperties. -func (m MaterializedViewsBuilderServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResourceCreateUpdateProperties. +func (m MaterializedViewsBuilderServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "instanceCount", m.InstanceCount) populate(objectMap, "instanceSize", m.InstanceSize) @@ -8560,37 +8214,6 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type OptionsResource. -func (o OptionsResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "autoscaleSettings", o.AutoscaleSettings) - populate(objectMap, "throughput", o.Throughput) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OptionsResource. -func (o *OptionsResource) 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 "autoscaleSettings": - err = unpopulate(val, "AutoscaleSettings", &o.AutoscaleSettings) - delete(rawMsg, key) - case "throughput": - err = unpopulate(val, "Throughput", &o.Throughput) - 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 PartitionMetric. func (p PartitionMetric) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -9086,33 +8709,6 @@ func (p *PhysicalPartitionStorageInfoCollection) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoProperties. -func (p PhysicalPartitionThroughputInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "physicalPartitionThroughputInfo", p.PhysicalPartitionThroughputInfo) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PhysicalPartitionThroughputInfoProperties. -func (p *PhysicalPartitionThroughputInfoProperties) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "physicalPartitionThroughputInfo": - err = unpopulate(val, "PhysicalPartitionThroughputInfo", &p.PhysicalPartitionThroughputInfo) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoResource. func (p PhysicalPartitionThroughputInfoResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -9657,45 +9253,6 @@ func (p *ProvisioningIssueProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProxyResource. -func (p ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. -func (p *ProxyResource) 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", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type RedistributeThroughputParameters. func (r RedistributeThroughputParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -9836,80 +9393,6 @@ func (r *RegionForOnlineOffline) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type RegionalServiceResource. -func (r RegionalServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "status", r.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RegionalServiceResource. -func (r *RegionalServiceResource) 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 "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &r.Status) - 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 Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. -func (r *Resource) 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 "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - 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 ResourceAssociation. func (r ResourceAssociation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -11621,41 +11104,6 @@ func (r *RestoreParameters) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type RestoreParametersBase. -func (r RestoreParametersBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "restoreSource", r.RestoreSource) - populateDateTimeRFC3339(objectMap, "restoreTimestampInUtc", r.RestoreTimestampInUTC) - populate(objectMap, "restoreWithTtlDisabled", r.RestoreWithTTLDisabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreParametersBase. -func (r *RestoreParametersBase) 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 "restoreSource": - err = unpopulate(val, "RestoreSource", &r.RestoreSource) - delete(rawMsg, key) - case "restoreTimestampInUtc": - err = unpopulateDateTimeRFC3339(val, "RestoreTimestampInUTC", &r.RestoreTimestampInUTC) - delete(rawMsg, key) - case "restoreWithTtlDisabled": - err = unpopulate(val, "RestoreWithTTLDisabled", &r.RestoreWithTTLDisabled) - 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 RetrieveThroughputParameters. func (r RetrieveThroughputParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -12558,33 +12006,6 @@ func (s *SQLDedicatedGatewayRegionalServiceResource) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type SQLDedicatedGatewayServiceResource. -func (s SQLDedicatedGatewayServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SQLDedicatedGatewayServiceResource. -func (s *SQLDedicatedGatewayServiceResource) 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 "properties": - err = unpopulate(val, "Properties", &s.Properties) - 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 SQLDedicatedGatewayServiceResourceCreateUpdateProperties. func (s SQLDedicatedGatewayServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -14379,68 +13800,6 @@ func (t *ThroughputPolicyResource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ThroughputPoolAccountCreateParameters. -func (t ThroughputPoolAccountCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", t.Properties) - populate(objectMap, "tags", t.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ThroughputPoolAccountCreateParameters. -func (t *ThroughputPoolAccountCreateParameters) 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", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &t.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ThroughputPoolAccountCreateProperties. -func (t ThroughputPoolAccountCreateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "accountLocation", t.AccountLocation) - populate(objectMap, "accountResourceIdentifier", t.AccountResourceIdentifier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ThroughputPoolAccountCreateProperties. -func (t *ThroughputPoolAccountCreateProperties) 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", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accountLocation": - err = unpopulate(val, "AccountLocation", &t.AccountLocation) - delete(rawMsg, key) - case "accountResourceIdentifier": - err = unpopulate(val, "AccountResourceIdentifier", &t.AccountResourceIdentifier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ThroughputPoolAccountProperties. func (t ThroughputPoolAccountProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -14956,53 +14315,6 @@ func (t *ThroughputSettingsUpdateProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type TrackedResource. -func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - populate(objectMap, "systemData", t.SystemData) - populate(objectMap, "tags", t.Tags) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. -func (t *TrackedResource) 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", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &t.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &t.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &t.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type UniqueKey. func (u UniqueKey) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) From 9a39d742cb55a4e546c037255c6de14299d8f706 Mon Sep 17 00:00:00 2001 From: Alancere <804873052@qq.com> Date: Tue, 18 Jun 2024 14:37:53 +0800 Subject: [PATCH 3/3] update assets --- sdk/resourcemanager/cosmos/armcosmos/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/cosmos/armcosmos/assets.json b/sdk/resourcemanager/cosmos/armcosmos/assets.json index 030b3dfd810c..9b0581179324 100644 --- a/sdk/resourcemanager/cosmos/armcosmos/assets.json +++ b/sdk/resourcemanager/cosmos/armcosmos/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/cosmos/armcosmos", - "Tag": "go/resourcemanager/cosmos/armcosmos_1b867a76a1" + "Tag": "go/resourcemanager/cosmos/armcosmos_ecc33ce33b" }