diff --git a/sdk/resourcemanager/devcenter/armdevcenter/CHANGELOG.md b/sdk/resourcemanager/devcenter/armdevcenter/CHANGELOG.md index b6bc1287ee67..374ec883fe64 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/CHANGELOG.md +++ b/sdk/resourcemanager/devcenter/armdevcenter/CHANGELOG.md @@ -1,5 +1,36 @@ # Release History +## 1.0.0 (2023-05-26) +### Breaking Changes + +- Type of `ProjectEnvironmentTypeProperties.Status` has been changed from `*EnableStatus` to `*EnvironmentTypeEnableStatus` +- Type of `ProjectEnvironmentTypeUpdateProperties.Status` has been changed from `*EnableStatus` to `*EnvironmentTypeEnableStatus` +- Type of `ScheduleProperties.State` has been changed from `*EnableStatus` to `*ScheduleEnableStatus` +- Type of `ScheduleUpdateProperties.State` has been changed from `*EnableStatus` to `*ScheduleEnableStatus` +- Enum `EnableStatus` has been removed +- Field `Offer`, `Publisher`, `SKU` of struct `ImageReference` has been removed + +### Features Added + +- New enum type `EnvironmentTypeEnableStatus` with values `EnvironmentTypeEnableStatusDisabled`, `EnvironmentTypeEnableStatusEnabled` +- New enum type `HealthStatus` with values `HealthStatusHealthy`, `HealthStatusPending`, `HealthStatusUnhealthy`, `HealthStatusUnknown`, `HealthStatusWarning` +- New enum type `ScheduleEnableStatus` with values `ScheduleEnableStatusDisabled`, `ScheduleEnableStatusEnabled` +- New enum type `StopOnDisconnectEnableStatus` with values `StopOnDisconnectEnableStatusDisabled`, `StopOnDisconnectEnableStatusEnabled` +- New function `*PoolsClient.BeginRunHealthChecks(context.Context, string, string, string, *PoolsClientBeginRunHealthChecksOptions) (*runtime.Poller[PoolsClientRunHealthChecksResponse], error)` +- New function `*NetworkConnectionsClient.NewListOutboundNetworkDependenciesEndpointsPager(string, string, *NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse]` +- New struct `EndpointDependency` +- New struct `EndpointDetail` +- New struct `HealthStatusDetail` +- New struct `OutboundEnvironmentEndpoint` +- New struct `OutboundEnvironmentEndpointCollection` +- New struct `StopOnDisconnectConfiguration` +- New field `HibernateSupport` in struct `ImageProperties` +- New field `HealthStatus`, `HealthStatusDetails`, `StopOnDisconnect` in struct `PoolProperties` +- New field `StopOnDisconnect` in struct `PoolUpdateProperties` +- New field `MaxDevBoxesPerUser` in struct `ProjectProperties` +- New field `MaxDevBoxesPerUser` in struct `ProjectUpdateProperties` + + ## 0.5.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/devcenter/armdevcenter/attachednetworks_client.go b/sdk/resourcemanager/devcenter/armdevcenter/attachednetworks_client.go index 91843c04b127..9a1371533be2 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/attachednetworks_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/attachednetworks_client.go @@ -48,7 +48,7 @@ func NewAttachedNetworksClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates or updates an attached NetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - attachedNetworkConnectionName - The name of the attached NetworkConnection. @@ -72,7 +72,7 @@ func (client *AttachedNetworksClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Creates or updates an attached NetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *AttachedNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, attachedNetworkConnectionName string, body AttachedNetworkConnection, options *AttachedNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, devCenterName, attachedNetworkConnectionName, body, options) if err != nil { @@ -112,7 +112,7 @@ func (client *AttachedNetworksClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -121,7 +121,7 @@ func (client *AttachedNetworksClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Un-attach a NetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - attachedNetworkConnectionName - The name of the attached NetworkConnection. @@ -144,7 +144,7 @@ func (client *AttachedNetworksClient) BeginDelete(ctx context.Context, resourceG // Delete - Un-attach a NetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *AttachedNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, devCenterName string, attachedNetworkConnectionName string, options *AttachedNetworksClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, devCenterName, attachedNetworkConnectionName, options) if err != nil { @@ -184,7 +184,7 @@ func (client *AttachedNetworksClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +193,7 @@ func (client *AttachedNetworksClient) deleteCreateRequest(ctx context.Context, r // GetByDevCenter - Gets an attached NetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - attachedNetworkConnectionName - The name of the attached NetworkConnection. @@ -238,7 +238,7 @@ func (client *AttachedNetworksClient) getByDevCenterCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -256,7 +256,7 @@ func (client *AttachedNetworksClient) getByDevCenterHandleResponse(resp *http.Re // GetByProject - Gets an attached NetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - attachedNetworkConnectionName - The name of the attached NetworkConnection. @@ -301,7 +301,7 @@ func (client *AttachedNetworksClient) getByProjectCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -318,7 +318,7 @@ func (client *AttachedNetworksClient) getByProjectHandleResponse(resp *http.Resp // NewListByDevCenterPager - Lists the attached NetworkConnections for a DevCenter. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - options - AttachedNetworksClientListByDevCenterOptions contains the optional parameters for the AttachedNetworksClient.NewListByDevCenterPager @@ -371,7 +371,7 @@ func (client *AttachedNetworksClient) listByDevCenterCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -391,7 +391,7 @@ func (client *AttachedNetworksClient) listByDevCenterHandleResponse(resp *http.R // NewListByProjectPager - Lists the attached NetworkConnections for a Project. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - options - AttachedNetworksClientListByProjectOptions contains the optional parameters for the AttachedNetworksClient.NewListByProjectPager @@ -444,7 +444,7 @@ func (client *AttachedNetworksClient) listByProjectCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/devcenter/armdevcenter/attachednetworks_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/attachednetworks_client_example_test.go index e982d8873c29..8647db9ccf31 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/attachednetworks_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/attachednetworks_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_ListByProject.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_ListByProject.json func ExampleAttachedNetworksClient_NewListByProjectPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -84,7 +84,7 @@ func ExampleAttachedNetworksClient_NewListByProjectPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_GetByProject.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByProject.json func ExampleAttachedNetworksClient_GetByProject() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -123,7 +123,7 @@ func ExampleAttachedNetworksClient_GetByProject() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_ListByDevCenter.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_ListByDevCenter.json func ExampleAttachedNetworksClient_NewListByDevCenterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -180,7 +180,7 @@ func ExampleAttachedNetworksClient_NewListByDevCenterPager() { // }, // Properties: &armdevcenter.AttachedNetworkConnectionProperties{ // HealthCheckStatus: to.Ptr(armdevcenter.HealthCheckStatus("Healthy")), - // NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkSettings/network-uswest3"), + // NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/networkconnections/network-uswest3"), // NetworkConnectionLocation: to.Ptr("centralus"), // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), // }, @@ -189,7 +189,7 @@ func ExampleAttachedNetworksClient_NewListByDevCenterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_GetByDevCenter.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByDevCenter.json func ExampleAttachedNetworksClient_GetByDevCenter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -228,7 +228,7 @@ func ExampleAttachedNetworksClient_GetByDevCenter() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_Create.json func ExampleAttachedNetworksClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -253,7 +253,7 @@ func ExampleAttachedNetworksClient_BeginCreateOrUpdate() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_Delete.json func ExampleAttachedNetworksClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/autorest.md b/sdk/resourcemanager/devcenter/armdevcenter/autorest.md index 80daa89be24d..02ae57097129 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/autorest.md +++ b/sdk/resourcemanager/devcenter/armdevcenter/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.5.1 - +module-version: 1.0.0 +tag: package-2023-04 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/devcenter/armdevcenter/catalogs_client.go b/sdk/resourcemanager/devcenter/armdevcenter/catalogs_client.go index f2ef75ada3c5..a2bdf785fd38 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/catalogs_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/catalogs_client.go @@ -48,7 +48,7 @@ func NewCatalogsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Creates or updates a catalog. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - catalogName - The name of the Catalog. @@ -72,7 +72,7 @@ func (client *CatalogsClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Creates or updates a catalog. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *CatalogsClient) createOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, body Catalog, options *CatalogsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, devCenterName, catalogName, body, options) if err != nil { @@ -112,7 +112,7 @@ func (client *CatalogsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -121,7 +121,7 @@ func (client *CatalogsClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Deletes a catalog resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - catalogName - The name of the Catalog. @@ -143,7 +143,7 @@ func (client *CatalogsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes a catalog resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *CatalogsClient) deleteOperation(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, options *CatalogsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, devCenterName, catalogName, options) if err != nil { @@ -183,7 +183,7 @@ func (client *CatalogsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -192,7 +192,7 @@ func (client *CatalogsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets a catalog // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - catalogName - The name of the Catalog. @@ -236,7 +236,7 @@ func (client *CatalogsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,7 +253,7 @@ func (client *CatalogsClient) getHandleResponse(resp *http.Response) (CatalogsCl // NewListByDevCenterPager - Lists catalogs for a devcenter. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - options - CatalogsClientListByDevCenterOptions contains the optional parameters for the CatalogsClient.NewListByDevCenterPager @@ -306,7 +306,7 @@ func (client *CatalogsClient) listByDevCenterCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -327,7 +327,7 @@ func (client *CatalogsClient) listByDevCenterHandleResponse(resp *http.Response) // BeginSync - Syncs templates for a template source. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - catalogName - The name of the Catalog. @@ -349,7 +349,7 @@ func (client *CatalogsClient) BeginSync(ctx context.Context, resourceGroupName s // Sync - Syncs templates for a template source. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *CatalogsClient) syncOperation(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, options *CatalogsClientBeginSyncOptions) (*http.Response, error) { req, err := client.syncCreateRequest(ctx, resourceGroupName, devCenterName, catalogName, options) if err != nil { @@ -389,7 +389,7 @@ func (client *CatalogsClient) syncCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -398,7 +398,7 @@ func (client *CatalogsClient) syncCreateRequest(ctx context.Context, resourceGro // BeginUpdate - Partially updates a catalog. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - catalogName - The name of the Catalog. @@ -421,7 +421,7 @@ func (client *CatalogsClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Partially updates a catalog. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *CatalogsClient) update(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, body CatalogUpdate, options *CatalogsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, devCenterName, catalogName, body, options) if err != nil { @@ -461,7 +461,7 @@ func (client *CatalogsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/catalogs_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/catalogs_client_example_test.go index b473b9188924..cf781d3575d7 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/catalogs_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/catalogs_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_List.json func ExampleCatalogsClient_NewListByDevCenterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -70,7 +70,7 @@ func ExampleCatalogsClient_NewListByDevCenterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json func ExampleCatalogsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -114,7 +114,7 @@ func ExampleCatalogsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_CreateAdo.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_CreateAdo.json func ExampleCatalogsClient_BeginCreateOrUpdate_catalogsCreateOrUpdateAdo() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -144,7 +144,7 @@ func ExampleCatalogsClient_BeginCreateOrUpdate_catalogsCreateOrUpdateAdo() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_CreateGitHub.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_CreateGitHub.json func ExampleCatalogsClient_BeginCreateOrUpdate_catalogsCreateOrUpdateGitHub() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -174,7 +174,7 @@ func ExampleCatalogsClient_BeginCreateOrUpdate_catalogsCreateOrUpdateGitHub() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Patch.json func ExampleCatalogsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -228,7 +228,7 @@ func ExampleCatalogsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Delete.json func ExampleCatalogsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -249,7 +249,7 @@ func ExampleCatalogsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Sync.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Sync.json func ExampleCatalogsClient_BeginSync() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/checknameavailability_client.go b/sdk/resourcemanager/devcenter/armdevcenter/checknameavailability_client.go index f2d8305a878e..f35200779f3f 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/checknameavailability_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/checknameavailability_client.go @@ -47,7 +47,7 @@ func NewCheckNameAvailabilityClient(subscriptionID string, credential azcore.Tok // Execute - Check the availability of name for resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - nameAvailabilityRequest - The required parameters for checking if resource name is available. // - options - CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute // method. @@ -78,7 +78,7 @@ func (client *CheckNameAvailabilityClient) executeCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, nameAvailabilityRequest) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/checknameavailability_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/checknameavailability_client_example_test.go index 9415784c99a3..791eef0b35ce 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/checknameavailability_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/checknameavailability_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/CheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/CheckNameAvailability.json func ExampleCheckNameAvailabilityClient_Execute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/constants.go b/sdk/resourcemanager/devcenter/armdevcenter/constants.go index a5ee5ecf30bf..70186aa159fb 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/constants.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/constants.go @@ -11,7 +11,7 @@ package armdevcenter const ( moduleName = "armdevcenter" - moduleVersion = "v0.5.1" + moduleVersion = "v1.0.0" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. @@ -100,19 +100,19 @@ func PossibleDomainJoinTypeValues() []DomainJoinType { } } -// EnableStatus - Enable or disable status. Indicates whether the property applied to is either enabled or disabled. -type EnableStatus string +// EnvironmentTypeEnableStatus - Indicates whether the environment type is either enabled or disabled. +type EnvironmentTypeEnableStatus string const ( - EnableStatusDisabled EnableStatus = "Disabled" - EnableStatusEnabled EnableStatus = "Enabled" + EnvironmentTypeEnableStatusDisabled EnvironmentTypeEnableStatus = "Disabled" + EnvironmentTypeEnableStatusEnabled EnvironmentTypeEnableStatus = "Enabled" ) -// PossibleEnableStatusValues returns the possible values for the EnableStatus const type. -func PossibleEnableStatusValues() []EnableStatus { - return []EnableStatus{ - EnableStatusDisabled, - EnableStatusEnabled, +// PossibleEnvironmentTypeEnableStatusValues returns the possible values for the EnvironmentTypeEnableStatus const type. +func PossibleEnvironmentTypeEnableStatusValues() []EnvironmentTypeEnableStatus { + return []EnvironmentTypeEnableStatus{ + EnvironmentTypeEnableStatusDisabled, + EnvironmentTypeEnableStatusEnabled, } } @@ -140,6 +140,28 @@ func PossibleHealthCheckStatusValues() []HealthCheckStatus { } } +// HealthStatus - Health status indicating whether a pool is available to create Dev Boxes. +type HealthStatus string + +const ( + HealthStatusHealthy HealthStatus = "Healthy" + HealthStatusPending HealthStatus = "Pending" + HealthStatusUnhealthy HealthStatus = "Unhealthy" + HealthStatusUnknown HealthStatus = "Unknown" + HealthStatusWarning HealthStatus = "Warning" +) + +// PossibleHealthStatusValues returns the possible values for the HealthStatus const type. +func PossibleHealthStatusValues() []HealthStatus { + return []HealthStatus{ + HealthStatusHealthy, + HealthStatusPending, + HealthStatusUnhealthy, + HealthStatusUnknown, + HealthStatusWarning, + } +} + // HibernateSupport - Indicates whether hibernate is enabled/disabled. type HibernateSupport string @@ -311,6 +333,23 @@ func PossibleSKUTierValues() []SKUTier { } } +// ScheduleEnableStatus - Schedule enable or disable status. Indicates whether the schedule applied to is either enabled or +// disabled. +type ScheduleEnableStatus string + +const ( + ScheduleEnableStatusDisabled ScheduleEnableStatus = "Disabled" + ScheduleEnableStatusEnabled ScheduleEnableStatus = "Enabled" +) + +// PossibleScheduleEnableStatusValues returns the possible values for the ScheduleEnableStatus const type. +func PossibleScheduleEnableStatusValues() []ScheduleEnableStatus { + return []ScheduleEnableStatus{ + ScheduleEnableStatusDisabled, + ScheduleEnableStatusEnabled, + } +} + // ScheduledFrequency - The frequency of task execution. type ScheduledFrequency string @@ -339,6 +378,23 @@ func PossibleScheduledTypeValues() []ScheduledType { } } +// StopOnDisconnectEnableStatus - Stop on disconnect enable or disable status. Indicates whether stop on disconnect to is +// either enabled or disabled. +type StopOnDisconnectEnableStatus string + +const ( + StopOnDisconnectEnableStatusDisabled StopOnDisconnectEnableStatus = "Disabled" + StopOnDisconnectEnableStatusEnabled StopOnDisconnectEnableStatus = "Enabled" +) + +// PossibleStopOnDisconnectEnableStatusValues returns the possible values for the StopOnDisconnectEnableStatus const type. +func PossibleStopOnDisconnectEnableStatusValues() []StopOnDisconnectEnableStatus { + return []StopOnDisconnectEnableStatus{ + StopOnDisconnectEnableStatusDisabled, + StopOnDisconnectEnableStatusEnabled, + } +} + // UsageUnit - The unit details. type UsageUnit string diff --git a/sdk/resourcemanager/devcenter/armdevcenter/devboxdefinitions_client.go b/sdk/resourcemanager/devcenter/armdevcenter/devboxdefinitions_client.go index be580751b7e1..0161059bdcd5 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/devboxdefinitions_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/devboxdefinitions_client.go @@ -48,7 +48,7 @@ func NewDevBoxDefinitionsClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Creates or updates a Dev Box definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - devBoxDefinitionName - The name of the Dev Box definition. @@ -72,7 +72,7 @@ func (client *DevBoxDefinitionsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates a Dev Box definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *DevBoxDefinitionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, devBoxDefinitionName string, body DevBoxDefinition, options *DevBoxDefinitionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, devCenterName, devBoxDefinitionName, body, options) if err != nil { @@ -112,7 +112,7 @@ func (client *DevBoxDefinitionsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -121,7 +121,7 @@ func (client *DevBoxDefinitionsClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Deletes a Dev Box definition // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - devBoxDefinitionName - The name of the Dev Box definition. @@ -144,7 +144,7 @@ func (client *DevBoxDefinitionsClient) BeginDelete(ctx context.Context, resource // Delete - Deletes a Dev Box definition // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *DevBoxDefinitionsClient) deleteOperation(ctx context.Context, resourceGroupName string, devCenterName string, devBoxDefinitionName string, options *DevBoxDefinitionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, devCenterName, devBoxDefinitionName, options) if err != nil { @@ -184,7 +184,7 @@ func (client *DevBoxDefinitionsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +193,7 @@ func (client *DevBoxDefinitionsClient) deleteCreateRequest(ctx context.Context, // Get - Gets a Dev Box definition // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - devBoxDefinitionName - The name of the Dev Box definition. @@ -237,7 +237,7 @@ func (client *DevBoxDefinitionsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,7 +255,7 @@ func (client *DevBoxDefinitionsClient) getHandleResponse(resp *http.Response) (D // GetByProject - Gets a Dev Box definition configured for a project // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - devBoxDefinitionName - The name of the Dev Box definition. @@ -300,7 +300,7 @@ func (client *DevBoxDefinitionsClient) getByProjectCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,7 +317,7 @@ func (client *DevBoxDefinitionsClient) getByProjectHandleResponse(resp *http.Res // NewListByDevCenterPager - List Dev Box definitions for a devcenter. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - options - DevBoxDefinitionsClientListByDevCenterOptions contains the optional parameters for the DevBoxDefinitionsClient.NewListByDevCenterPager @@ -370,7 +370,7 @@ func (client *DevBoxDefinitionsClient) listByDevCenterCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -390,7 +390,7 @@ func (client *DevBoxDefinitionsClient) listByDevCenterHandleResponse(resp *http. // NewListByProjectPager - List Dev Box definitions configured for a project. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - options - DevBoxDefinitionsClientListByProjectOptions contains the optional parameters for the DevBoxDefinitionsClient.NewListByProjectPager @@ -443,7 +443,7 @@ func (client *DevBoxDefinitionsClient) listByProjectCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -464,7 +464,7 @@ func (client *DevBoxDefinitionsClient) listByProjectHandleResponse(resp *http.Re // BeginUpdate - Partially updates a Dev Box definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - devBoxDefinitionName - The name of the Dev Box definition. @@ -488,7 +488,7 @@ func (client *DevBoxDefinitionsClient) BeginUpdate(ctx context.Context, resource // Update - Partially updates a Dev Box definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *DevBoxDefinitionsClient) update(ctx context.Context, resourceGroupName string, devCenterName string, devBoxDefinitionName string, body DevBoxDefinitionUpdate, options *DevBoxDefinitionsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, devCenterName, devBoxDefinitionName, body, options) if err != nil { @@ -528,7 +528,7 @@ func (client *DevBoxDefinitionsClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/devboxdefinitions_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/devboxdefinitions_client_example_test.go index 4bb3fa1f2d20..4bddaadeeb17 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/devboxdefinitions_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/devboxdefinitions_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_ListByDevCenter.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_ListByDevCenter.json func ExampleDevBoxDefinitionsClient_NewListByDevCenterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -60,7 +60,6 @@ func ExampleDevBoxDefinitionsClient_NewListByDevCenterPager() { // ImageReference: &armdevcenter.ImageReference{ // ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"), // }, - // OSStorageType: to.Ptr("SSD_1024"), // SKU: &armdevcenter.SKU{ // Name: to.Ptr("Preview"), // }, @@ -71,7 +70,7 @@ func ExampleDevBoxDefinitionsClient_NewListByDevCenterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Get.json func ExampleDevBoxDefinitionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -107,7 +106,6 @@ func ExampleDevBoxDefinitionsClient_Get() { // ImageReference: &armdevcenter.ImageReference{ // ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"), // }, - // OSStorageType: to.Ptr("SSD_1024"), // SKU: &armdevcenter.SKU{ // Name: to.Ptr("Preview"), // }, @@ -116,7 +114,7 @@ func ExampleDevBoxDefinitionsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Create.json func ExampleDevBoxDefinitionsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -134,7 +132,6 @@ func ExampleDevBoxDefinitionsClient_BeginCreateOrUpdate() { ImageReference: &armdevcenter.ImageReference{ ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"), }, - OSStorageType: to.Ptr("SSD_1024"), SKU: &armdevcenter.SKU{ Name: to.Ptr("Preview"), }, @@ -168,7 +165,6 @@ func ExampleDevBoxDefinitionsClient_BeginCreateOrUpdate() { // ImageReference: &armdevcenter.ImageReference{ // ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"), // }, - // OSStorageType: to.Ptr("SSD_1024"), // SKU: &armdevcenter.SKU{ // Name: to.Ptr("Preview"), // }, @@ -177,7 +173,7 @@ func ExampleDevBoxDefinitionsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Patch.json func ExampleDevBoxDefinitionsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -223,7 +219,6 @@ func ExampleDevBoxDefinitionsClient_BeginUpdate() { // ImageReference: &armdevcenter.ImageReference{ // ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/2.0.0"), // }, - // OSStorageType: to.Ptr("SSD_1024"), // SKU: &armdevcenter.SKU{ // Name: to.Ptr("Preview"), // }, @@ -232,7 +227,7 @@ func ExampleDevBoxDefinitionsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Delete.json func ExampleDevBoxDefinitionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -253,7 +248,7 @@ func ExampleDevBoxDefinitionsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_ListByProject.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_ListByProject.json func ExampleDevBoxDefinitionsClient_NewListByProjectPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -295,7 +290,6 @@ func ExampleDevBoxDefinitionsClient_NewListByProjectPager() { // ImageReference: &armdevcenter.ImageReference{ // ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"), // }, - // OSStorageType: to.Ptr("SSD_1024"), // SKU: &armdevcenter.SKU{ // Name: to.Ptr("Preview"), // }, @@ -306,7 +300,7 @@ func ExampleDevBoxDefinitionsClient_NewListByProjectPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_GetByProject.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_GetByProject.json func ExampleDevBoxDefinitionsClient_GetByProject() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -342,7 +336,6 @@ func ExampleDevBoxDefinitionsClient_GetByProject() { // ImageReference: &armdevcenter.ImageReference{ // ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"), // }, - // OSStorageType: to.Ptr("SSD_1024"), // SKU: &armdevcenter.SKU{ // Name: to.Ptr("Preview"), // }, diff --git a/sdk/resourcemanager/devcenter/armdevcenter/devcenters_client.go b/sdk/resourcemanager/devcenter/armdevcenter/devcenters_client.go index 37bed20f893f..394f58a1d62a 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/devcenters_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/devcenters_client.go @@ -48,7 +48,7 @@ func NewDevCentersClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates a devcenter resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - body - Represents a devcenter. @@ -71,7 +71,7 @@ func (client *DevCentersClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates a devcenter resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *DevCentersClient) createOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, body DevCenter, options *DevCentersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, devCenterName, body, options) if err != nil { @@ -107,7 +107,7 @@ func (client *DevCentersClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -116,7 +116,7 @@ func (client *DevCentersClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a devcenter // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - options - DevCentersClientBeginDeleteOptions contains the optional parameters for the DevCentersClient.BeginDelete method. @@ -137,7 +137,7 @@ func (client *DevCentersClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes a devcenter // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *DevCentersClient) deleteOperation(ctx context.Context, resourceGroupName string, devCenterName string, options *DevCentersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, devCenterName, options) if err != nil { @@ -173,7 +173,7 @@ func (client *DevCentersClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +182,7 @@ func (client *DevCentersClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets a devcenter. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - options - DevCentersClientGetOptions contains the optional parameters for the DevCentersClient.Get method. @@ -221,7 +221,7 @@ func (client *DevCentersClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,7 +238,7 @@ func (client *DevCentersClient) getHandleResponse(resp *http.Response) (DevCente // NewListByResourceGroupPager - Lists all devcenters in a resource group. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - DevCentersClientListByResourceGroupOptions contains the optional parameters for the DevCentersClient.NewListByResourceGroupPager // method. @@ -286,7 +286,7 @@ func (client *DevCentersClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -306,7 +306,7 @@ func (client *DevCentersClient) listByResourceGroupHandleResponse(resp *http.Res // NewListBySubscriptionPager - Lists all devcenters in a subscription. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - options - DevCentersClientListBySubscriptionOptions contains the optional parameters for the DevCentersClient.NewListBySubscriptionPager // method. func (client *DevCentersClient) NewListBySubscriptionPager(options *DevCentersClientListBySubscriptionOptions) *runtime.Pager[DevCentersClientListBySubscriptionResponse] { @@ -349,7 +349,7 @@ func (client *DevCentersClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -370,7 +370,7 @@ func (client *DevCentersClient) listBySubscriptionHandleResponse(resp *http.Resp // BeginUpdate - Partially updates a devcenter. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - body - Updatable devcenter properties. @@ -392,7 +392,7 @@ func (client *DevCentersClient) BeginUpdate(ctx context.Context, resourceGroupNa // Update - Partially updates a devcenter. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *DevCentersClient) update(ctx context.Context, resourceGroupName string, devCenterName string, body Update, options *DevCentersClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, devCenterName, body, options) if err != nil { @@ -428,7 +428,7 @@ func (client *DevCentersClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/devcenters_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/devcenters_client_example_test.go index c8e6bc8672f9..a029208f972b 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/devcenters_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/devcenters_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_ListBySubscription.json func ExampleDevCentersClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -67,7 +67,7 @@ func ExampleDevCentersClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_ListByResourceGroup.json func ExampleDevCentersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -116,7 +116,7 @@ func ExampleDevCentersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Get.json func ExampleDevCentersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -157,7 +157,7 @@ func ExampleDevCentersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Create.json func ExampleDevCentersClient_BeginCreateOrUpdate_devCentersCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -208,7 +208,7 @@ func ExampleDevCentersClient_BeginCreateOrUpdate_devCentersCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_CreateWithUserIdentity.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_CreateWithUserIdentity.json func ExampleDevCentersClient_BeginCreateOrUpdate_devCentersCreateWithUserIdentity() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -274,7 +274,7 @@ func ExampleDevCentersClient_BeginCreateOrUpdate_devCentersCreateWithUserIdentit // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Patch.json func ExampleDevCentersClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -323,7 +323,7 @@ func ExampleDevCentersClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Delete.json func ExampleDevCentersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/environmenttypes_client.go b/sdk/resourcemanager/devcenter/armdevcenter/environmenttypes_client.go index 3c33f56ddef8..5f554ce17e90 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/environmenttypes_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/environmenttypes_client.go @@ -48,7 +48,7 @@ func NewEnvironmentTypesClient(subscriptionID string, credential azcore.TokenCre // CreateOrUpdate - Creates or updates an environment type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - environmentTypeName - The name of the environment type. @@ -94,7 +94,7 @@ func (client *EnvironmentTypesClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -112,7 +112,7 @@ func (client *EnvironmentTypesClient) createOrUpdateHandleResponse(resp *http.Re // Delete - Deletes an environment type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - environmentTypeName - The name of the environment type. @@ -156,7 +156,7 @@ func (client *EnvironmentTypesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,7 +165,7 @@ func (client *EnvironmentTypesClient) deleteCreateRequest(ctx context.Context, r // Get - Gets an environment type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - environmentTypeName - The name of the environment type. @@ -209,7 +209,7 @@ func (client *EnvironmentTypesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -226,7 +226,7 @@ func (client *EnvironmentTypesClient) getHandleResponse(resp *http.Response) (En // NewListByDevCenterPager - Lists environment types for the devcenter. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - options - EnvironmentTypesClientListByDevCenterOptions contains the optional parameters for the EnvironmentTypesClient.NewListByDevCenterPager @@ -279,7 +279,7 @@ func (client *EnvironmentTypesClient) listByDevCenterCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -300,7 +300,7 @@ func (client *EnvironmentTypesClient) listByDevCenterHandleResponse(resp *http.R // Update - Partially updates an environment type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - environmentTypeName - The name of the environment type. @@ -345,7 +345,7 @@ func (client *EnvironmentTypesClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/environmenttypes_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/environmenttypes_client_example_test.go index 84a282137bd8..7c4cd436328d 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/environmenttypes_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/environmenttypes_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_List.json func ExampleEnvironmentTypesClient_NewListByDevCenterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -62,7 +62,7 @@ func ExampleEnvironmentTypesClient_NewListByDevCenterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Get.json func ExampleEnvironmentTypesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,7 +98,7 @@ func ExampleEnvironmentTypesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Put.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Put.json func ExampleEnvironmentTypesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -138,7 +138,7 @@ func ExampleEnvironmentTypesClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Patch.json func ExampleEnvironmentTypesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -178,7 +178,7 @@ func ExampleEnvironmentTypesClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Delete.json func ExampleEnvironmentTypesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/galleries_client.go b/sdk/resourcemanager/devcenter/armdevcenter/galleries_client.go index 78cf06f5457d..f9f43fc3932c 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/galleries_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/galleries_client.go @@ -48,7 +48,7 @@ func NewGalleriesClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Creates or updates a gallery. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - galleryName - The name of the gallery. @@ -72,7 +72,7 @@ func (client *GalleriesClient) BeginCreateOrUpdate(ctx context.Context, resource // CreateOrUpdate - Creates or updates a gallery. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *GalleriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, galleryName string, body Gallery, options *GalleriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, devCenterName, galleryName, body, options) if err != nil { @@ -112,7 +112,7 @@ func (client *GalleriesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -121,7 +121,7 @@ func (client *GalleriesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a gallery resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - galleryName - The name of the gallery. @@ -143,7 +143,7 @@ func (client *GalleriesClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Deletes a gallery resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *GalleriesClient) deleteOperation(ctx context.Context, resourceGroupName string, devCenterName string, galleryName string, options *GalleriesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, devCenterName, galleryName, options) if err != nil { @@ -183,7 +183,7 @@ func (client *GalleriesClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -192,7 +192,7 @@ func (client *GalleriesClient) deleteCreateRequest(ctx context.Context, resource // Get - Gets a gallery // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - galleryName - The name of the gallery. @@ -236,7 +236,7 @@ func (client *GalleriesClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,7 +253,7 @@ func (client *GalleriesClient) getHandleResponse(resp *http.Response) (Galleries // NewListByDevCenterPager - Lists galleries for a devcenter. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - options - GalleriesClientListByDevCenterOptions contains the optional parameters for the GalleriesClient.NewListByDevCenterPager @@ -306,7 +306,7 @@ func (client *GalleriesClient) listByDevCenterCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/devcenter/armdevcenter/galleries_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/galleries_client_example_test.go index cfcf044a0532..887205c53f96 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/galleries_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/galleries_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_List.json func ExampleGalleriesClient_NewListByDevCenterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,7 +80,7 @@ func ExampleGalleriesClient_NewListByDevCenterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Get.json func ExampleGalleriesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -117,7 +117,7 @@ func ExampleGalleriesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Create.json func ExampleGalleriesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -142,7 +142,7 @@ func ExampleGalleriesClient_BeginCreateOrUpdate() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Delete.json func ExampleGalleriesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/images_client.go b/sdk/resourcemanager/devcenter/armdevcenter/images_client.go index 6aa4a49e391f..43c264b670e6 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/images_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/images_client.go @@ -48,7 +48,7 @@ func NewImagesClient(subscriptionID string, credential azcore.TokenCredential, o // Get - Gets a gallery image. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - galleryName - The name of the gallery. @@ -97,7 +97,7 @@ func (client *ImagesClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +114,7 @@ func (client *ImagesClient) getHandleResponse(resp *http.Response) (ImagesClient // NewListByDevCenterPager - Lists images for a devcenter. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - options - ImagesClientListByDevCenterOptions contains the optional parameters for the ImagesClient.NewListByDevCenterPager @@ -167,7 +167,7 @@ func (client *ImagesClient) listByDevCenterCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -187,7 +187,7 @@ func (client *ImagesClient) listByDevCenterHandleResponse(resp *http.Response) ( // NewListByGalleryPager - Lists images for a gallery. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - galleryName - The name of the gallery. @@ -245,7 +245,7 @@ func (client *ImagesClient) listByGalleryCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/devcenter/armdevcenter/images_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/images_client_example_test.go index 9fadd735d1ca..19c982385b05 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/images_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/images_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Images_ListByDevCenter.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_ListByDevCenter.json func ExampleImagesClient_NewListByDevCenterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,7 +104,7 @@ func ExampleImagesClient_NewListByDevCenterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Images_ListByGallery.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_ListByGallery.json func ExampleImagesClient_NewListByGalleryPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -191,7 +191,7 @@ func ExampleImagesClient_NewListByGalleryPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Images_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_Get.json func ExampleImagesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/imageversions_client.go b/sdk/resourcemanager/devcenter/armdevcenter/imageversions_client.go index ab2a8140d204..b8c7c0a5a195 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/imageversions_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/imageversions_client.go @@ -47,7 +47,7 @@ func NewImageVersionsClient(subscriptionID string, credential azcore.TokenCreden // Get - Gets an image version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - galleryName - The name of the gallery. @@ -101,7 +101,7 @@ func (client *ImageVersionsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +118,7 @@ func (client *ImageVersionsClient) getHandleResponse(resp *http.Response) (Image // NewListByImagePager - Lists versions for an image. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - devCenterName - The name of the devcenter. // - galleryName - The name of the gallery. @@ -181,7 +181,7 @@ func (client *ImageVersionsClient) listByImageCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/devcenter/armdevcenter/imageversions_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/imageversions_client_example_test.go index 918c5d76ddb6..c82a7de54787 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/imageversions_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/imageversions_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ImageVersions_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_List.json func ExampleImageVersionsClient_NewListByImagePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -64,7 +64,7 @@ func ExampleImageVersionsClient_NewListByImagePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ImageVersions_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_Get.json func ExampleImageVersionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/models.go b/sdk/resourcemanager/devcenter/armdevcenter/models.go index 5060daae99bf..10fcebe7b297 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/models.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/models.go @@ -464,6 +464,24 @@ type DevCentersClientListBySubscriptionOptions struct { Top *int32 } +// EndpointDependency - A domain name and connection details used to access a dependency. +type EndpointDependency struct { + // READ-ONLY; Human-readable supplemental information about the dependency and when it is applicable. + Description *string + + // READ-ONLY; The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard. + DomainName *string + + // READ-ONLY; The list of connection details for this endpoint. + EndpointDetails []*EndpointDetail +} + +// EndpointDetail - Details about the connection between the Batch service and the endpoint. +type EndpointDetail struct { + // READ-ONLY; The port an endpoint is connected to. + Port *int32 +} + // EnvironmentRole - A role that can be assigned to a user. type EnvironmentRole struct { // READ-ONLY; This is a description of the Role Assignment. @@ -710,6 +728,15 @@ type HealthCheckStatusDetailsProperties struct { StartDateTime *time.Time } +// HealthStatusDetail - Pool health status detail. +type HealthStatusDetail struct { + // READ-ONLY; An identifier for the issue. + Code *string + + // READ-ONLY; A message describing the issue, intended to be suitable for display in a user interface + Message *string +} + // Image - Represents an image. type Image struct { // Image properties. @@ -742,6 +769,10 @@ type ImageProperties struct { // READ-ONLY; The description of the image. Description *string + // READ-ONLY; Indicates whether this image has hibernate enabled. Not all images are capable of supporting hibernation. To + // find out more see https://aka.ms/devbox/hibernate + HibernateSupport *HibernateSupport + // READ-ONLY; The name of the image offer. Offer *string @@ -763,15 +794,6 @@ type ImageReference struct { // Image ID, or Image version ID. When Image ID is provided, its latest version will be used. ID *string - // The image offer. - Offer *string - - // The image publisher. - Publisher *string - - // The image sku. - SKU *string - // READ-ONLY; The actual version of the image after use. When id references a gallery image latest version, this will indicate // the actual version in use. ExactVersion *string @@ -1023,6 +1045,13 @@ type NetworkConnectionsClientListHealthDetailsOptions struct { Top *int32 } +// NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the NetworkConnectionsClient.NewListOutboundNetworkDependenciesEndpointsPager +// method. +type NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions struct { + // The maximum number of resources to return from the operation. Example: '$top=10'. + Top *int32 +} + // NetworkProperties - Network properties type NetworkProperties struct { // REQUIRED; AAD Join type. @@ -1174,6 +1203,25 @@ type OperationsClientListOptions struct { // placeholder for future optional parameters } +// OutboundEnvironmentEndpoint - A collection of related endpoints from the same service for which the agent requires outbound +// access. +type OutboundEnvironmentEndpoint struct { + // READ-ONLY; The type of service that the agent connects to. + Category *string + + // READ-ONLY; The endpoints for this service for which the agent requires outbound access. + Endpoints []*EndpointDependency +} + +// OutboundEnvironmentEndpointCollection - Values returned by the List operation. +type OutboundEnvironmentEndpointCollection struct { + // The continuation token. + NextLink *string + + // READ-ONLY; The collection of outbound network dependency endpoints returned by the listing operation. + Value []*OutboundEnvironmentEndpoint +} + // Pool - A pool of Virtual Machines. type Pool struct { // REQUIRED; The geo-location where the resource lives @@ -1221,6 +1269,16 @@ type PoolProperties struct { // Name of a Network Connection in parent Project of this Pool NetworkConnectionName *string + // Stop on disconnect configuration settings for Dev Boxes created in this pool. + StopOnDisconnect *StopOnDisconnectConfiguration + + // READ-ONLY; Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + HealthStatus *HealthStatus + + // READ-ONLY; Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates + // the pool is in a non-healthy state + HealthStatusDetails []*HealthStatusDetail + // READ-ONLY; The provisioning state of the resource. ProvisioningState *ProvisioningState } @@ -1250,6 +1308,9 @@ type PoolUpdateProperties struct { // Name of a Network Connection in parent Project of this Pool NetworkConnectionName *string + + // Stop on disconnect configuration settings for Dev Boxes created in this pool. + StopOnDisconnect *StopOnDisconnectConfiguration } // PoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the PoolsClient.BeginCreateOrUpdate method. @@ -1264,6 +1325,12 @@ type PoolsClientBeginDeleteOptions struct { ResumeToken string } +// PoolsClientBeginRunHealthChecksOptions contains the optional parameters for the PoolsClient.BeginRunHealthChecks method. +type PoolsClientBeginRunHealthChecksOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // PoolsClientBeginUpdateOptions contains the optional parameters for the PoolsClient.BeginUpdate method. type PoolsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. @@ -1364,7 +1431,7 @@ type ProjectEnvironmentTypeProperties struct { DeploymentTargetID *string // Defines whether this Environment Type can be used in this Project. - Status *EnableStatus + Status *EnvironmentTypeEnableStatus // Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role // definition IDs. @@ -1398,7 +1465,7 @@ type ProjectEnvironmentTypeUpdateProperties struct { DeploymentTargetID *string // Defines whether this Environment Type can be used in this Project. - Status *EnableStatus + Status *EnvironmentTypeEnableStatus // Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role // definition IDs. @@ -1459,7 +1526,11 @@ type ProjectProperties struct { // Resource Id of an associated DevCenter DevCenterID *string - // READ-ONLY; The URI of the resource. + // When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will + // have no effect on existing Dev Boxes when reduced. + MaxDevBoxesPerUser *int32 + + // READ-ONLY; The URI of the Dev Center resource this project is associated with. DevCenterURI *string // READ-ONLY; The provisioning state of the resource. @@ -1485,6 +1556,10 @@ type ProjectUpdateProperties struct { // Resource Id of an associated DevCenter DevCenterID *string + + // When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will + // have no effect on existing Dev Boxes when reduced. + MaxDevBoxesPerUser *int32 } // ProjectsClientBeginCreateOrUpdateOptions contains the optional parameters for the ProjectsClient.BeginCreateOrUpdate method. @@ -1526,7 +1601,7 @@ type ProjectsClientListBySubscriptionOptions struct { // Properties of the devcenter. type Properties struct { - // READ-ONLY; The URI of the resource. + // READ-ONLY; The URI of the Dev Center. DevCenterURI *string // READ-ONLY; The provisioning state of the resource. @@ -1648,7 +1723,7 @@ type ScheduleProperties struct { Frequency *ScheduledFrequency // Indicates whether or not this scheduled task is enabled. - State *EnableStatus + State *ScheduleEnableStatus // The target time to trigger the action. The format is HH:MM. Time *string @@ -1682,7 +1757,7 @@ type ScheduleUpdateProperties struct { Frequency *ScheduledFrequency // Indicates whether or not this scheduled task is enabled. - State *EnableStatus + State *ScheduleEnableStatus // The target time to trigger the action. The format is HH:MM. Time *string @@ -1731,6 +1806,15 @@ type SchedulesClientListByPoolOptions struct { Top *int32 } +// StopOnDisconnectConfiguration - Stop on disconnect configuration settings for Dev Boxes created in this pool. +type StopOnDisconnectConfiguration struct { + // The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + GracePeriodMinutes *int32 + + // Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + Status *StopOnDisconnectEnableStatus +} + // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). diff --git a/sdk/resourcemanager/devcenter/armdevcenter/models_serde.go b/sdk/resourcemanager/devcenter/armdevcenter/models_serde.go index bce1619bd016..044e37caa8fe 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/models_serde.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/models_serde.go @@ -776,6 +776,68 @@ func (d *DevCenter) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EndpointDependency. +func (e EndpointDependency) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", e.Description) + populate(objectMap, "domainName", e.DomainName) + populate(objectMap, "endpointDetails", e.EndpointDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency. +func (e *EndpointDependency) 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 "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "domainName": + err = unpopulate(val, "DomainName", &e.DomainName) + delete(rawMsg, key) + case "endpointDetails": + err = unpopulate(val, "EndpointDetails", &e.EndpointDetails) + 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 EndpointDetail. +func (e EndpointDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "port", e.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail. +func (e *EndpointDetail) 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 "port": + err = unpopulate(val, "Port", &e.Port) + 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 EnvironmentRole. func (e EnvironmentRole) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1317,6 +1379,37 @@ func (h *HealthCheckStatusDetailsProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type HealthStatusDetail. +func (h HealthStatusDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", h.Code) + populate(objectMap, "message", h.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HealthStatusDetail. +func (h *HealthStatusDetail) 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", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &h.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &h.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Image. func (i Image) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1395,6 +1488,7 @@ func (i *ImageListResult) UnmarshalJSON(data []byte) error { func (i ImageProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "description", i.Description) + populate(objectMap, "hibernateSupport", i.HibernateSupport) populate(objectMap, "offer", i.Offer) populate(objectMap, "provisioningState", i.ProvisioningState) populate(objectMap, "publisher", i.Publisher) @@ -1415,6 +1509,9 @@ func (i *ImageProperties) UnmarshalJSON(data []byte) error { case "description": err = unpopulate(val, "Description", &i.Description) delete(rawMsg, key) + case "hibernateSupport": + err = unpopulate(val, "HibernateSupport", &i.HibernateSupport) + delete(rawMsg, key) case "offer": err = unpopulate(val, "Offer", &i.Offer) delete(rawMsg, key) @@ -1443,9 +1540,6 @@ func (i ImageReference) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "exactVersion", i.ExactVersion) populate(objectMap, "id", i.ID) - populate(objectMap, "offer", i.Offer) - populate(objectMap, "publisher", i.Publisher) - populate(objectMap, "sku", i.SKU) return json.Marshal(objectMap) } @@ -1464,15 +1558,6 @@ func (i *ImageReference) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &i.ID) delete(rawMsg, key) - case "offer": - err = unpopulate(val, "Offer", &i.Offer) - delete(rawMsg, key) - case "publisher": - err = unpopulate(val, "Publisher", &i.Publisher) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &i.SKU) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", i, err) @@ -2180,6 +2265,68 @@ func (o *OperationStatusResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint. +func (o OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "category", o.Category) + populate(objectMap, "endpoints", o.Endpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpoint. +func (o *OutboundEnvironmentEndpoint) 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 "category": + err = unpopulate(val, "Category", &o.Category) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &o.Endpoints) + 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 OutboundEnvironmentEndpointCollection. +func (o OutboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointCollection. +func (o *OutboundEnvironmentEndpointCollection) 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 "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + 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 Pool. func (p Pool) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2266,10 +2413,13 @@ func (p *PoolListResult) UnmarshalJSON(data []byte) error { func (p PoolProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "devBoxDefinitionName", p.DevBoxDefinitionName) + populate(objectMap, "healthStatus", p.HealthStatus) + populate(objectMap, "healthStatusDetails", p.HealthStatusDetails) populate(objectMap, "licenseType", p.LicenseType) populate(objectMap, "localAdministrator", p.LocalAdministrator) populate(objectMap, "networkConnectionName", p.NetworkConnectionName) populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "stopOnDisconnect", p.StopOnDisconnect) return json.Marshal(objectMap) } @@ -2285,6 +2435,12 @@ func (p *PoolProperties) UnmarshalJSON(data []byte) error { case "devBoxDefinitionName": err = unpopulate(val, "DevBoxDefinitionName", &p.DevBoxDefinitionName) delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &p.HealthStatus) + delete(rawMsg, key) + case "healthStatusDetails": + err = unpopulate(val, "HealthStatusDetails", &p.HealthStatusDetails) + delete(rawMsg, key) case "licenseType": err = unpopulate(val, "LicenseType", &p.LicenseType) delete(rawMsg, key) @@ -2297,6 +2453,9 @@ func (p *PoolProperties) UnmarshalJSON(data []byte) error { case "provisioningState": err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) delete(rawMsg, key) + case "stopOnDisconnect": + err = unpopulate(val, "StopOnDisconnect", &p.StopOnDisconnect) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", p, err) @@ -2347,6 +2506,7 @@ func (p PoolUpdateProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "licenseType", p.LicenseType) populate(objectMap, "localAdministrator", p.LocalAdministrator) populate(objectMap, "networkConnectionName", p.NetworkConnectionName) + populate(objectMap, "stopOnDisconnect", p.StopOnDisconnect) return json.Marshal(objectMap) } @@ -2371,6 +2531,9 @@ func (p *PoolUpdateProperties) UnmarshalJSON(data []byte) error { case "networkConnectionName": err = unpopulate(val, "NetworkConnectionName", &p.NetworkConnectionName) delete(rawMsg, key) + case "stopOnDisconnect": + err = unpopulate(val, "StopOnDisconnect", &p.StopOnDisconnect) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", p, err) @@ -2697,6 +2860,7 @@ func (p ProjectProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "description", p.Description) populate(objectMap, "devCenterId", p.DevCenterID) populate(objectMap, "devCenterUri", p.DevCenterURI) + populate(objectMap, "maxDevBoxesPerUser", p.MaxDevBoxesPerUser) populate(objectMap, "provisioningState", p.ProvisioningState) return json.Marshal(objectMap) } @@ -2719,6 +2883,9 @@ func (p *ProjectProperties) UnmarshalJSON(data []byte) error { case "devCenterUri": err = unpopulate(val, "DevCenterURI", &p.DevCenterURI) delete(rawMsg, key) + case "maxDevBoxesPerUser": + err = unpopulate(val, "MaxDevBoxesPerUser", &p.MaxDevBoxesPerUser) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) delete(rawMsg, key) @@ -2770,6 +2937,7 @@ func (p ProjectUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "description", p.Description) populate(objectMap, "devCenterId", p.DevCenterID) + populate(objectMap, "maxDevBoxesPerUser", p.MaxDevBoxesPerUser) return json.Marshal(objectMap) } @@ -2788,6 +2956,9 @@ func (p *ProjectUpdateProperties) UnmarshalJSON(data []byte) error { case "devCenterId": err = unpopulate(val, "DevCenterID", &p.DevCenterID) delete(rawMsg, key) + case "maxDevBoxesPerUser": + err = unpopulate(val, "MaxDevBoxesPerUser", &p.MaxDevBoxesPerUser) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", p, err) @@ -3217,6 +3388,37 @@ func (s *ScheduleUpdateProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type StopOnDisconnectConfiguration. +func (s StopOnDisconnectConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gracePeriodMinutes", s.GracePeriodMinutes) + populate(objectMap, "status", s.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StopOnDisconnectConfiguration. +func (s *StopOnDisconnectConfiguration) 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 "gracePeriodMinutes": + err = unpopulate(val, "GracePeriodMinutes", &s.GracePeriodMinutes) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/networkconnections_client.go b/sdk/resourcemanager/devcenter/armdevcenter/networkconnections_client.go index 513793da872f..7000f140284b 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/networkconnections_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/networkconnections_client.go @@ -48,7 +48,7 @@ func NewNetworkConnectionsClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Creates or updates a Network Connections resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - networkConnectionName - Name of the Network Connection that can be applied to a Pool. // - body - Represents network connection @@ -71,7 +71,7 @@ func (client *NetworkConnectionsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates a Network Connections resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *NetworkConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkConnectionName string, body NetworkConnection, options *NetworkConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkConnectionName, body, options) if err != nil { @@ -107,7 +107,7 @@ func (client *NetworkConnectionsClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -116,7 +116,7 @@ func (client *NetworkConnectionsClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Deletes a Network Connections resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - networkConnectionName - Name of the Network Connection that can be applied to a Pool. // - options - NetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the NetworkConnectionsClient.BeginDelete @@ -138,7 +138,7 @@ func (client *NetworkConnectionsClient) BeginDelete(ctx context.Context, resourc // Delete - Deletes a Network Connections resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *NetworkConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkConnectionName string, options *NetworkConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkConnectionName, options) if err != nil { @@ -174,7 +174,7 @@ func (client *NetworkConnectionsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +183,7 @@ func (client *NetworkConnectionsClient) deleteCreateRequest(ctx context.Context, // Get - Gets a network connection resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - networkConnectionName - Name of the Network Connection that can be applied to a Pool. // - options - NetworkConnectionsClientGetOptions contains the optional parameters for the NetworkConnectionsClient.Get method. @@ -222,7 +222,7 @@ func (client *NetworkConnectionsClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -240,7 +240,7 @@ func (client *NetworkConnectionsClient) getHandleResponse(resp *http.Response) ( // GetHealthDetails - Gets health check status details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - networkConnectionName - Name of the Network Connection that can be applied to a Pool. // - options - NetworkConnectionsClientGetHealthDetailsOptions contains the optional parameters for the NetworkConnectionsClient.GetHealthDetails @@ -280,7 +280,7 @@ func (client *NetworkConnectionsClient) getHealthDetailsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,7 +297,7 @@ func (client *NetworkConnectionsClient) getHealthDetailsHandleResponse(resp *htt // NewListByResourceGroupPager - Lists network connections in a resource group // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - NetworkConnectionsClientListByResourceGroupOptions contains the optional parameters for the NetworkConnectionsClient.NewListByResourceGroupPager // method. @@ -345,7 +345,7 @@ func (client *NetworkConnectionsClient) listByResourceGroupCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -365,7 +365,7 @@ func (client *NetworkConnectionsClient) listByResourceGroupHandleResponse(resp * // NewListBySubscriptionPager - Lists network connections in a subscription // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - options - NetworkConnectionsClientListBySubscriptionOptions contains the optional parameters for the NetworkConnectionsClient.NewListBySubscriptionPager // method. func (client *NetworkConnectionsClient) NewListBySubscriptionPager(options *NetworkConnectionsClientListBySubscriptionOptions) *runtime.Pager[NetworkConnectionsClientListBySubscriptionResponse] { @@ -408,7 +408,7 @@ func (client *NetworkConnectionsClient) listBySubscriptionCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -428,7 +428,7 @@ func (client *NetworkConnectionsClient) listBySubscriptionHandleResponse(resp *h // NewListHealthDetailsPager - Lists health check status details // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - networkConnectionName - Name of the Network Connection that can be applied to a Pool. // - options - NetworkConnectionsClientListHealthDetailsOptions contains the optional parameters for the NetworkConnectionsClient.NewListHealthDetailsPager @@ -481,7 +481,7 @@ func (client *NetworkConnectionsClient) listHealthDetailsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -499,11 +499,85 @@ func (client *NetworkConnectionsClient) listHealthDetailsHandleResponse(resp *ht return result, nil } +// NewListOutboundNetworkDependenciesEndpointsPager - Lists the endpoints that agents may call as part of Dev Box service +// administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. +// +// Generated from API version 2023-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkConnectionName - Name of the Network Connection that can be applied to a Pool. +// - options - NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for +// the NetworkConnectionsClient.NewListOutboundNetworkDependenciesEndpointsPager method. +func (client *NetworkConnectionsClient) NewListOutboundNetworkDependenciesEndpointsPager(resourceGroupName string, networkConnectionName string, options *NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse] { + return runtime.NewPager(runtime.PagingHandler[NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse]{ + More: func(page NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse) (NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, networkConnectionName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse{}, runtime.NewResponseError(resp) + } + return client.listOutboundNetworkDependenciesEndpointsHandleResponse(resp) + }, + }) +} + +// listOutboundNetworkDependenciesEndpointsCreateRequest creates the ListOutboundNetworkDependenciesEndpoints request. +func (client *NetworkConnectionsClient) listOutboundNetworkDependenciesEndpointsCreateRequest(ctx context.Context, resourceGroupName string, networkConnectionName string, options *NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints" + 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 networkConnectionName == "" { + return nil, errors.New("parameter networkConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkConnectionName}", url.PathEscape(networkConnectionName)) + 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", "2023-04-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listOutboundNetworkDependenciesEndpointsHandleResponse handles the ListOutboundNetworkDependenciesEndpoints response. +func (client *NetworkConnectionsClient) listOutboundNetworkDependenciesEndpointsHandleResponse(resp *http.Response) (NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse, error) { + result := NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OutboundEnvironmentEndpointCollection); err != nil { + return NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse{}, err + } + return result, nil +} + // BeginRunHealthChecks - Triggers a new health check run. The execution and health check result can be tracked via the network // Connection health check details // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - networkConnectionName - Name of the Network Connection that can be applied to a Pool. // - options - NetworkConnectionsClientBeginRunHealthChecksOptions contains the optional parameters for the NetworkConnectionsClient.BeginRunHealthChecks @@ -526,7 +600,7 @@ func (client *NetworkConnectionsClient) BeginRunHealthChecks(ctx context.Context // Connection health check details // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *NetworkConnectionsClient) runHealthChecks(ctx context.Context, resourceGroupName string, networkConnectionName string, options *NetworkConnectionsClientBeginRunHealthChecksOptions) (*http.Response, error) { req, err := client.runHealthChecksCreateRequest(ctx, resourceGroupName, networkConnectionName, options) if err != nil { @@ -562,7 +636,7 @@ func (client *NetworkConnectionsClient) runHealthChecksCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -571,7 +645,7 @@ func (client *NetworkConnectionsClient) runHealthChecksCreateRequest(ctx context // BeginUpdate - Partially updates a Network Connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - networkConnectionName - Name of the Network Connection that can be applied to a Pool. // - body - Represents network connection @@ -594,7 +668,7 @@ func (client *NetworkConnectionsClient) BeginUpdate(ctx context.Context, resourc // Update - Partially updates a Network Connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *NetworkConnectionsClient) update(ctx context.Context, resourceGroupName string, networkConnectionName string, body NetworkConnectionUpdate, options *NetworkConnectionsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, networkConnectionName, body, options) if err != nil { @@ -630,7 +704,7 @@ func (client *NetworkConnectionsClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/networkconnections_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/networkconnections_client_example_test.go index a3aec4a2953e..3446adf929e8 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/networkconnections_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/networkconnections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListBySubscription.json func ExampleNetworkConnectionsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -68,7 +68,7 @@ func ExampleNetworkConnectionsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListByResourceGroup.json func ExampleNetworkConnectionsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -118,7 +118,7 @@ func ExampleNetworkConnectionsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Get.json func ExampleNetworkConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -161,7 +161,7 @@ func ExampleNetworkConnectionsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Put.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Put.json func ExampleNetworkConnectionsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -217,7 +217,7 @@ func ExampleNetworkConnectionsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Patch.json func ExampleNetworkConnectionsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -267,7 +267,7 @@ func ExampleNetworkConnectionsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Delete.json func ExampleNetworkConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -288,7 +288,7 @@ func ExampleNetworkConnectionsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_ListHealthDetails.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListHealthDetails.json func ExampleNetworkConnectionsClient_NewListHealthDetailsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -340,7 +340,7 @@ func ExampleNetworkConnectionsClient_NewListHealthDetailsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_GetHealthDetails.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_GetHealthDetails.json func ExampleNetworkConnectionsClient_GetHealthDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -384,7 +384,7 @@ func ExampleNetworkConnectionsClient_GetHealthDetails() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_RunHealthChecks.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_RunHealthChecks.json func ExampleNetworkConnectionsClient_BeginRunHealthChecks() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -404,3 +404,64 @@ func ExampleNetworkConnectionsClient_BeginRunHealthChecks() { log.Fatalf("failed to pull the result: %v", err) } } + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json +func ExampleNetworkConnectionsClient_NewListOutboundNetworkDependenciesEndpointsPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armdevcenter.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewNetworkConnectionsClient().NewListOutboundNetworkDependenciesEndpointsPager("rg1", "uswest3network", &armdevcenter.NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions{Top: 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.OutboundEnvironmentEndpointCollection = armdevcenter.OutboundEnvironmentEndpointCollection{ + // Value: []*armdevcenter.OutboundEnvironmentEndpoint{ + // { + // Category: to.Ptr("Dev Box Service"), + // Endpoints: []*armdevcenter.EndpointDependency{ + // { + // DomainName: to.Ptr("devbox.azure.com"), + // EndpointDetails: []*armdevcenter.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }}, + // }, + // { + // Category: to.Ptr("Intune"), + // Endpoints: []*armdevcenter.EndpointDependency{ + // { + // DomainName: to.Ptr("login.microsoftonline.com"), + // EndpointDetails: []*armdevcenter.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }}, + // }, + // { + // Category: to.Ptr("Cloud PC"), + // Endpoints: []*armdevcenter.EndpointDependency{ + // { + // DomainName: to.Ptr("rdweb.wvd.microsoft.com"), + // EndpointDetails: []*armdevcenter.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }}, + // }}, + // } + } +} diff --git a/sdk/resourcemanager/devcenter/armdevcenter/operations_client.go b/sdk/resourcemanager/devcenter/armdevcenter/operations_client.go index 4dfe76f96204..1162712fea76 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/operations_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available resource provider operations. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - 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]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/devcenter/armdevcenter/operations_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/operations_client_example_test.go index 77074cc54945..d370473068d3 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/operations_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Operations_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Operations_Get.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/operationstatuses_client.go b/sdk/resourcemanager/devcenter/armdevcenter/operationstatuses_client.go index faceb949236f..eac946932c37 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/operationstatuses_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/operationstatuses_client.go @@ -47,7 +47,7 @@ func NewOperationStatusesClient(subscriptionID string, credential azcore.TokenCr // Get - Gets the current status of an async operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - location - The Azure region // - operationID - The ID of an ongoing async operation // - options - OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method. @@ -86,7 +86,7 @@ func (client *OperationStatusesClient) getCreateRequest(ctx context.Context, loc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/devcenter/armdevcenter/operationstatuses_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/operationstatuses_client_example_test.go index 6d28627542d2..fddbd67b8f8b 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/operationstatuses_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/operationstatuses_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/OperationStatus_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/OperationStatus_Get.json func ExampleOperationStatusesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/pools_client.go b/sdk/resourcemanager/devcenter/armdevcenter/pools_client.go index 2e7d77b39e44..612400d1b93b 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/pools_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/pools_client.go @@ -48,7 +48,7 @@ func NewPoolsClient(subscriptionID string, credential azcore.TokenCredential, op // BeginCreateOrUpdate - Creates or updates a machine pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - poolName - Name of the pool. @@ -72,7 +72,7 @@ func (client *PoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou // CreateOrUpdate - Creates or updates a machine pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *PoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, projectName string, poolName string, body Pool, options *PoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, projectName, poolName, body, options) if err != nil { @@ -112,7 +112,7 @@ func (client *PoolsClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -121,7 +121,7 @@ func (client *PoolsClient) createOrUpdateCreateRequest(ctx context.Context, reso // BeginDelete - Deletes a machine pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - poolName - Name of the pool. @@ -143,7 +143,7 @@ func (client *PoolsClient) BeginDelete(ctx context.Context, resourceGroupName st // Delete - Deletes a machine pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *PoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, projectName string, poolName string, options *PoolsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, projectName, poolName, options) if err != nil { @@ -183,7 +183,7 @@ func (client *PoolsClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -192,7 +192,7 @@ func (client *PoolsClient) deleteCreateRequest(ctx context.Context, resourceGrou // Get - Gets a machine pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - poolName - Name of the pool. @@ -236,7 +236,7 @@ func (client *PoolsClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,7 +253,7 @@ func (client *PoolsClient) getHandleResponse(resp *http.Response) (PoolsClientGe // NewListByProjectPager - Lists pools for a project // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - options - PoolsClientListByProjectOptions contains the optional parameters for the PoolsClient.NewListByProjectPager method. @@ -305,7 +305,7 @@ func (client *PoolsClient) listByProjectCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -323,10 +323,82 @@ func (client *PoolsClient) listByProjectHandleResponse(resp *http.Response) (Poo return result, nil } +// BeginRunHealthChecks - Triggers a refresh of the pool status. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - projectName - The name of the project. +// - poolName - Name of the pool. +// - options - PoolsClientBeginRunHealthChecksOptions contains the optional parameters for the PoolsClient.BeginRunHealthChecks +// method. +func (client *PoolsClient) BeginRunHealthChecks(ctx context.Context, resourceGroupName string, projectName string, poolName string, options *PoolsClientBeginRunHealthChecksOptions) (*runtime.Poller[PoolsClientRunHealthChecksResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.runHealthChecks(ctx, resourceGroupName, projectName, poolName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PoolsClientRunHealthChecksResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + } else { + return runtime.NewPollerFromResumeToken[PoolsClientRunHealthChecksResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// RunHealthChecks - Triggers a refresh of the pool status. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-04-01 +func (client *PoolsClient) runHealthChecks(ctx context.Context, resourceGroupName string, projectName string, poolName string, options *PoolsClientBeginRunHealthChecksOptions) (*http.Response, error) { + req, err := client.runHealthChecksCreateRequest(ctx, resourceGroupName, projectName, poolName, options) + if err != nil { + return nil, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// runHealthChecksCreateRequest creates the RunHealthChecks request. +func (client *PoolsClient) runHealthChecksCreateRequest(ctx context.Context, resourceGroupName string, projectName string, poolName string, options *PoolsClientBeginRunHealthChecksOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks" + 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 projectName == "" { + return nil, errors.New("parameter projectName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{projectName}", url.PathEscape(projectName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + 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", "2023-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // BeginUpdate - Partially updates a machine pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - poolName - Name of the pool. @@ -349,7 +421,7 @@ func (client *PoolsClient) BeginUpdate(ctx context.Context, resourceGroupName st // Update - Partially updates a machine pool // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *PoolsClient) update(ctx context.Context, resourceGroupName string, projectName string, poolName string, body PoolUpdate, options *PoolsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, projectName, poolName, body, options) if err != nil { @@ -389,7 +461,7 @@ func (client *PoolsClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/pools_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/pools_client_example_test.go index 20ad4b1c744a..950a27b3dee4 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/pools_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/pools_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_List.json func ExamplePoolsClient_NewListByProjectPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -60,6 +60,11 @@ func ExamplePoolsClient_NewListByProjectPager() { // LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient), // LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled), // NetworkConnectionName: to.Ptr("Network1-westus2"), + // StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{ + // GracePeriodMinutes: to.Ptr[int32](60), + // Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled), + // }, + // HealthStatus: to.Ptr(armdevcenter.HealthStatusHealthy), // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), // }, // }}, @@ -67,8 +72,8 @@ func ExamplePoolsClient_NewListByProjectPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Get.json -func ExamplePoolsClient_Get() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json +func ExamplePoolsClient_Get_poolsGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -103,12 +108,76 @@ func ExamplePoolsClient_Get() { // LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient), // LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled), // NetworkConnectionName: to.Ptr("Network1-westus2"), + // StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{ + // GracePeriodMinutes: to.Ptr[int32](60), + // Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled), + // }, + // HealthStatus: to.Ptr(armdevcenter.HealthStatusHealthy), // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Put.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_GetUnhealthyStatus.json +func ExamplePoolsClient_Get_poolsGetUnhealthyStatus() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armdevcenter.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewPoolsClient().Get(ctx, "rg1", "DevProject", "DevPool", 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.Pool = armdevcenter.Pool{ + // Name: to.Ptr("DevPool"), + // Type: to.Ptr("Microsoft.DevCenter/pools"), + // ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/pools/DevPool"), + // SystemData: &armdevcenter.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()), + // CreatedBy: to.Ptr("user1"), + // CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()), + // LastModifiedBy: to.Ptr("user1"), + // LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser), + // }, + // Location: to.Ptr("centralus"), + // Properties: &armdevcenter.PoolProperties{ + // DevBoxDefinitionName: to.Ptr("WebDevBox"), + // LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient), + // LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled), + // NetworkConnectionName: to.Ptr("Network1-westus2"), + // StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{ + // GracePeriodMinutes: to.Ptr[int32](60), + // Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled), + // }, + // HealthStatus: to.Ptr(armdevcenter.HealthStatusUnhealthy), + // HealthStatusDetails: []*armdevcenter.HealthStatusDetail{ + // { + // Code: to.Ptr("NetworkConnectionUnhealthy"), + // Message: to.Ptr("The Pool's Network Connection is in an unhealthy state. Check the Network Connection's health status for more details."), + // }, + // { + // Code: to.Ptr("ImageValidationFailed"), + // Message: to.Ptr("Image validation has failed. Check the Dev Box Definition's image validation status for more details."), + // }, + // { + // Code: to.Ptr("IntuneValidationFailed"), + // Message: to.Ptr("Intune license validation has failed. The tenant does not have a valid Intune license."), + // }}, + // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Put.json func ExamplePoolsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,6 +195,10 @@ func ExamplePoolsClient_BeginCreateOrUpdate() { LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient), LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled), NetworkConnectionName: to.Ptr("Network1-westus2"), + StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{ + GracePeriodMinutes: to.Ptr[int32](60), + Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled), + }, }, }, nil) if err != nil { @@ -156,12 +229,17 @@ func ExamplePoolsClient_BeginCreateOrUpdate() { // LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient), // LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled), // NetworkConnectionName: to.Ptr("Network1-westus2"), + // StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{ + // GracePeriodMinutes: to.Ptr[int32](60), + // Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled), + // }, + // HealthStatus: to.Ptr(armdevcenter.HealthStatusHealthy), // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Patch.json func ExamplePoolsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -205,12 +283,17 @@ func ExamplePoolsClient_BeginUpdate() { // LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient), // LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled), // NetworkConnectionName: to.Ptr("Network1-westus2"), + // StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{ + // GracePeriodMinutes: to.Ptr[int32](60), + // Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled), + // }, + // HealthStatus: to.Ptr(armdevcenter.HealthStatusHealthy), // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Delete.json func ExamplePoolsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -230,3 +313,24 @@ func ExamplePoolsClient_BeginDelete() { log.Fatalf("failed to pull the result: %v", err) } } + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_RunHealthChecks.json +func ExamplePoolsClient_BeginRunHealthChecks() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armdevcenter.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewPoolsClient().BeginRunHealthChecks(ctx, "rg1", "DevProject", "DevPool", 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/devcenter/armdevcenter/projectallowedenvironmenttypes_client.go b/sdk/resourcemanager/devcenter/armdevcenter/projectallowedenvironmenttypes_client.go index 106443ecc60c..d19e79c9aaea 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/projectallowedenvironmenttypes_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/projectallowedenvironmenttypes_client.go @@ -48,7 +48,7 @@ func NewProjectAllowedEnvironmentTypesClient(subscriptionID string, credential a // Get - Gets an allowed environment type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - environmentTypeName - The name of the environment type. @@ -93,7 +93,7 @@ func (client *ProjectAllowedEnvironmentTypesClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,7 +110,7 @@ func (client *ProjectAllowedEnvironmentTypesClient) getHandleResponse(resp *http // NewListPager - Lists allowed environment types for a project. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - options - ProjectAllowedEnvironmentTypesClientListOptions contains the optional parameters for the ProjectAllowedEnvironmentTypesClient.NewListPager @@ -163,7 +163,7 @@ func (client *ProjectAllowedEnvironmentTypesClient) listCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/devcenter/armdevcenter/projectallowedenvironmenttypes_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/projectallowedenvironmenttypes_client_example_test.go index b8f3ef1c81d2..4f07d88c332c 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/projectallowedenvironmenttypes_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/projectallowedenvironmenttypes_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectAllowedEnvironmentTypes_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_List.json func ExampleProjectAllowedEnvironmentTypesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -58,7 +58,7 @@ func ExampleProjectAllowedEnvironmentTypesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectAllowedEnvironmentTypes_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_Get.json func ExampleProjectAllowedEnvironmentTypesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/projectenvironmenttypes_client.go b/sdk/resourcemanager/devcenter/armdevcenter/projectenvironmenttypes_client.go index 7dfa3c356368..a7c1d68fa36c 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/projectenvironmenttypes_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/projectenvironmenttypes_client.go @@ -48,7 +48,7 @@ func NewProjectEnvironmentTypesClient(subscriptionID string, credential azcore.T // CreateOrUpdate - Creates or updates a project environment type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - environmentTypeName - The name of the environment type. @@ -94,7 +94,7 @@ func (client *ProjectEnvironmentTypesClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -112,7 +112,7 @@ func (client *ProjectEnvironmentTypesClient) createOrUpdateHandleResponse(resp * // Delete - Deletes a project environment type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - environmentTypeName - The name of the environment type. @@ -157,7 +157,7 @@ func (client *ProjectEnvironmentTypesClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,7 +166,7 @@ func (client *ProjectEnvironmentTypesClient) deleteCreateRequest(ctx context.Con // Get - Gets a project environment type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - environmentTypeName - The name of the environment type. @@ -211,7 +211,7 @@ func (client *ProjectEnvironmentTypesClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,7 +228,7 @@ func (client *ProjectEnvironmentTypesClient) getHandleResponse(resp *http.Respon // NewListPager - Lists environment types for a project. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - options - ProjectEnvironmentTypesClientListOptions contains the optional parameters for the ProjectEnvironmentTypesClient.NewListPager @@ -281,7 +281,7 @@ func (client *ProjectEnvironmentTypesClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -302,7 +302,7 @@ func (client *ProjectEnvironmentTypesClient) listHandleResponse(resp *http.Respo // Update - Partially updates a project environment type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - environmentTypeName - The name of the environment type. @@ -348,7 +348,7 @@ func (client *ProjectEnvironmentTypesClient) updateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/projectenvironmenttypes_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/projectenvironmenttypes_client_example_test.go index 474ee695c99e..260dbeca352c 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/projectenvironmenttypes_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/projectenvironmenttypes_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_List.json func ExampleProjectEnvironmentTypesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -74,7 +74,7 @@ func ExampleProjectEnvironmentTypesClient_NewListPager() { // }, // }, // DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"), - // Status: to.Ptr(armdevcenter.EnableStatusEnabled), + // Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled), // UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{ // "e45e3m7c-176e-416a-b466-0c5ec8298f8a": &armdevcenter.UserRoleAssignmentValue{ // Roles: map[string]*armdevcenter.EnvironmentRole{ @@ -95,7 +95,7 @@ func ExampleProjectEnvironmentTypesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Get.json func ExampleProjectEnvironmentTypesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -145,7 +145,7 @@ func ExampleProjectEnvironmentTypesClient_Get() { // }, // }, // DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"), - // Status: to.Ptr(armdevcenter.EnableStatusEnabled), + // Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled), // UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{ // "e45e3m7c-176e-416a-b466-0c5ec8298f8a": &armdevcenter.UserRoleAssignmentValue{ // Roles: map[string]*armdevcenter.EnvironmentRole{ @@ -164,7 +164,7 @@ func ExampleProjectEnvironmentTypesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Put.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Put.json func ExampleProjectEnvironmentTypesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -189,7 +189,7 @@ func ExampleProjectEnvironmentTypesClient_CreateOrUpdate() { }, }, DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"), - Status: to.Ptr(armdevcenter.EnableStatusEnabled), + Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled), UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{ "e45e3m7c-176e-416a-b466-0c5ec8298f8a": { Roles: map[string]*armdevcenter.EnvironmentRole{ @@ -240,7 +240,7 @@ func ExampleProjectEnvironmentTypesClient_CreateOrUpdate() { // }, // }, // DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"), - // Status: to.Ptr(armdevcenter.EnableStatusEnabled), + // Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled), // UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{ // "e45e3m7c-176e-416a-b466-0c5ec8298f8a": &armdevcenter.UserRoleAssignmentValue{ // Roles: map[string]*armdevcenter.EnvironmentRole{ @@ -259,7 +259,7 @@ func ExampleProjectEnvironmentTypesClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Patch.json func ExampleProjectEnvironmentTypesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -279,7 +279,7 @@ func ExampleProjectEnvironmentTypesClient_Update() { }, Properties: &armdevcenter.ProjectEnvironmentTypeUpdateProperties{ DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"), - Status: to.Ptr(armdevcenter.EnableStatusEnabled), + Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled), UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{ "e45e3m7c-176e-416a-b466-0c5ec8298f8a": { Roles: map[string]*armdevcenter.EnvironmentRole{ @@ -330,7 +330,7 @@ func ExampleProjectEnvironmentTypesClient_Update() { // }, // }, // DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"), - // Status: to.Ptr(armdevcenter.EnableStatusEnabled), + // Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled), // UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{ // "e45e3m7c-176e-416a-b466-0c5ec8298f8a": &armdevcenter.UserRoleAssignmentValue{ // Roles: map[string]*armdevcenter.EnvironmentRole{ @@ -349,7 +349,7 @@ func ExampleProjectEnvironmentTypesClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Delete.json func ExampleProjectEnvironmentTypesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/projects_client.go b/sdk/resourcemanager/devcenter/armdevcenter/projects_client.go index 2fe593e6d924..ac3fbefe4019 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/projects_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/projects_client.go @@ -48,7 +48,7 @@ func NewProjectsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Creates or updates a project. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - body - Represents a project. @@ -71,7 +71,7 @@ func (client *ProjectsClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Creates or updates a project. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *ProjectsClient) createOrUpdate(ctx context.Context, resourceGroupName string, projectName string, body Project, options *ProjectsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, projectName, body, options) if err != nil { @@ -107,7 +107,7 @@ func (client *ProjectsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -116,7 +116,7 @@ func (client *ProjectsClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Deletes a project resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - options - ProjectsClientBeginDeleteOptions contains the optional parameters for the ProjectsClient.BeginDelete method. @@ -137,7 +137,7 @@ func (client *ProjectsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes a project resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *ProjectsClient) deleteOperation(ctx context.Context, resourceGroupName string, projectName string, options *ProjectsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, projectName, options) if err != nil { @@ -173,7 +173,7 @@ func (client *ProjectsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +182,7 @@ func (client *ProjectsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets a specific project. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - options - ProjectsClientGetOptions contains the optional parameters for the ProjectsClient.Get method. @@ -221,7 +221,7 @@ func (client *ProjectsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,7 +238,7 @@ func (client *ProjectsClient) getHandleResponse(resp *http.Response) (ProjectsCl // NewListByResourceGroupPager - Lists all projects in the resource group. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ProjectsClientListByResourceGroupOptions contains the optional parameters for the ProjectsClient.NewListByResourceGroupPager // method. @@ -286,7 +286,7 @@ func (client *ProjectsClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -306,7 +306,7 @@ func (client *ProjectsClient) listByResourceGroupHandleResponse(resp *http.Respo // NewListBySubscriptionPager - Lists all projects in the subscription. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - options - ProjectsClientListBySubscriptionOptions contains the optional parameters for the ProjectsClient.NewListBySubscriptionPager // method. func (client *ProjectsClient) NewListBySubscriptionPager(options *ProjectsClientListBySubscriptionOptions) *runtime.Pager[ProjectsClientListBySubscriptionResponse] { @@ -349,7 +349,7 @@ func (client *ProjectsClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -370,7 +370,7 @@ func (client *ProjectsClient) listBySubscriptionHandleResponse(resp *http.Respon // BeginUpdate - Partially updates a project. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - body - Updatable project properties. @@ -392,7 +392,7 @@ func (client *ProjectsClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Partially updates a project. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *ProjectsClient) update(ctx context.Context, resourceGroupName string, projectName string, body ProjectUpdate, options *ProjectsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, projectName, body, options) if err != nil { @@ -428,7 +428,7 @@ func (client *ProjectsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/devcenter/armdevcenter/projects_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/projects_client_example_test.go index aeee44801b58..786f94900a69 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/projects_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/projects_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListBySubscription.json func ExampleProjectsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -69,7 +69,7 @@ func ExampleProjectsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListByResourceGroup.json func ExampleProjectsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -120,7 +120,7 @@ func ExampleProjectsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json func ExampleProjectsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -162,8 +162,8 @@ func ExampleProjectsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Put.json -func ExampleProjectsClient_BeginCreateOrUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Put.json +func ExampleProjectsClient_BeginCreateOrUpdate_projectsCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -218,7 +218,65 @@ func ExampleProjectsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_PutWithMaxDevBoxPerUser.json +func ExampleProjectsClient_BeginCreateOrUpdate_projectsCreateOrUpdateWithLimitsPerDev() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armdevcenter.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewProjectsClient().BeginCreateOrUpdate(ctx, "rg1", "DevProject", armdevcenter.Project{ + Location: to.Ptr("centralus"), + Tags: map[string]*string{ + "CostCenter": to.Ptr("R&D"), + }, + Properties: &armdevcenter.ProjectProperties{ + Description: to.Ptr("This is my first project."), + DevCenterID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"), + MaxDevBoxesPerUser: to.Ptr[int32](3), + }, + }, 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.Project = armdevcenter.Project{ + // Name: to.Ptr("DevProject"), + // Type: to.Ptr("Microsoft.DevCenter/projects"), + // ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject"), + // SystemData: &armdevcenter.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()), + // CreatedBy: to.Ptr("user1"), + // CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()), + // LastModifiedBy: to.Ptr("user1"), + // LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser), + // }, + // Location: to.Ptr("centralus"), + // Tags: map[string]*string{ + // "CostCenter": to.Ptr("R&D"), + // }, + // Properties: &armdevcenter.ProjectProperties{ + // Description: to.Ptr("This is my first project."), + // DevCenterID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"), + // MaxDevBoxesPerUser: to.Ptr[int32](3), + // DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"), + // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Patch.json func ExampleProjectsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -272,7 +330,7 @@ func ExampleProjectsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Delete.json func ExampleProjectsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/response_types.go b/sdk/resourcemanager/devcenter/armdevcenter/response_types.go index 74bdf2e8ebd5..a6b621629ca7 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/response_types.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/response_types.go @@ -244,6 +244,11 @@ type NetworkConnectionsClientListHealthDetailsResponse struct { HealthCheckStatusDetailsListResult } +// NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method NetworkConnectionsClient.NewListOutboundNetworkDependenciesEndpointsPager. +type NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse struct { + OutboundEnvironmentEndpointCollection +} + // NetworkConnectionsClientRunHealthChecksResponse contains the response from method NetworkConnectionsClient.BeginRunHealthChecks. type NetworkConnectionsClientRunHealthChecksResponse struct { // placeholder for future response values @@ -284,6 +289,11 @@ type PoolsClientListByProjectResponse struct { PoolListResult } +// PoolsClientRunHealthChecksResponse contains the response from method PoolsClient.BeginRunHealthChecks. +type PoolsClientRunHealthChecksResponse struct { + // placeholder for future response values +} + // PoolsClientUpdateResponse contains the response from method PoolsClient.BeginUpdate. type PoolsClientUpdateResponse struct { Pool diff --git a/sdk/resourcemanager/devcenter/armdevcenter/schedules_client.go b/sdk/resourcemanager/devcenter/armdevcenter/schedules_client.go index 26c46763ad30..461a35bd41a1 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/schedules_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/schedules_client.go @@ -48,7 +48,7 @@ func NewSchedulesClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Creates or updates a Schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - poolName - Name of the pool. @@ -73,7 +73,7 @@ func (client *SchedulesClient) BeginCreateOrUpdate(ctx context.Context, resource // CreateOrUpdate - Creates or updates a Schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *SchedulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, projectName string, poolName string, scheduleName string, body Schedule, options *SchedulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, projectName, poolName, scheduleName, body, options) if err != nil { @@ -117,7 +117,7 @@ func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -129,7 +129,7 @@ func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a Scheduled. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - poolName - Name of the pool. @@ -152,7 +152,7 @@ func (client *SchedulesClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Deletes a Scheduled. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *SchedulesClient) deleteOperation(ctx context.Context, resourceGroupName string, projectName string, poolName string, scheduleName string, options *SchedulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, projectName, poolName, scheduleName, options) if err != nil { @@ -196,7 +196,7 @@ func (client *SchedulesClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -208,7 +208,7 @@ func (client *SchedulesClient) deleteCreateRequest(ctx context.Context, resource // Get - Gets a schedule resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - poolName - Name of the pool. @@ -257,7 +257,7 @@ func (client *SchedulesClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -277,7 +277,7 @@ func (client *SchedulesClient) getHandleResponse(resp *http.Response) (Schedules // NewListByPoolPager - Lists schedules for a pool // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - poolName - Name of the pool. @@ -335,7 +335,7 @@ func (client *SchedulesClient) listByPoolCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -356,7 +356,7 @@ func (client *SchedulesClient) listByPoolHandleResponse(resp *http.Response) (Sc // BeginUpdate - Partially updates a Scheduled. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - projectName - The name of the project. // - poolName - Name of the pool. @@ -380,7 +380,7 @@ func (client *SchedulesClient) BeginUpdate(ctx context.Context, resourceGroupNam // Update - Partially updates a Scheduled. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 func (client *SchedulesClient) update(ctx context.Context, resourceGroupName string, projectName string, poolName string, scheduleName string, body ScheduleUpdate, options *SchedulesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, projectName, poolName, scheduleName, body, options) if err != nil { @@ -424,7 +424,7 @@ func (client *SchedulesClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/devcenter/armdevcenter/schedules_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/schedules_client_example_test.go index 0bba07970857..a387eac3553a 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/schedules_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/schedules_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_ListByPool.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_ListByPool.json func ExampleSchedulesClient_NewListByPoolPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -57,7 +57,7 @@ func ExampleSchedulesClient_NewListByPoolPager() { // Properties: &armdevcenter.ScheduleProperties{ // Type: to.Ptr(armdevcenter.ScheduledTypeStopDevBox), // Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily), - // State: to.Ptr(armdevcenter.EnableStatusEnabled), + // State: to.Ptr(armdevcenter.ScheduleEnableStatusEnabled), // Time: to.Ptr("17:30"), // TimeZone: to.Ptr("America/Los_Angeles"), // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), @@ -67,7 +67,7 @@ func ExampleSchedulesClient_NewListByPoolPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json func ExampleSchedulesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -100,7 +100,7 @@ func ExampleSchedulesClient_Get() { // Properties: &armdevcenter.ScheduleProperties{ // Type: to.Ptr(armdevcenter.ScheduledTypeStopDevBox), // Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily), - // State: to.Ptr(armdevcenter.EnableStatusEnabled), + // State: to.Ptr(armdevcenter.ScheduleEnableStatusEnabled), // Time: to.Ptr("17:30"), // TimeZone: to.Ptr("America/Los_Angeles"), // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), @@ -108,7 +108,7 @@ func ExampleSchedulesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_CreateDailyShutdownPoolSchedule.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_CreateDailyShutdownPoolSchedule.json func ExampleSchedulesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -123,7 +123,7 @@ func ExampleSchedulesClient_BeginCreateOrUpdate() { Properties: &armdevcenter.ScheduleProperties{ Type: to.Ptr(armdevcenter.ScheduledTypeStopDevBox), Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily), - State: to.Ptr(armdevcenter.EnableStatusEnabled), + State: to.Ptr(armdevcenter.ScheduleEnableStatusEnabled), Time: to.Ptr("17:30"), TimeZone: to.Ptr("America/Los_Angeles"), }, @@ -153,7 +153,7 @@ func ExampleSchedulesClient_BeginCreateOrUpdate() { // Properties: &armdevcenter.ScheduleProperties{ // Type: to.Ptr(armdevcenter.ScheduledTypeStopDevBox), // Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily), - // State: to.Ptr(armdevcenter.EnableStatusEnabled), + // State: to.Ptr(armdevcenter.ScheduleEnableStatusEnabled), // Time: to.Ptr("17:30"), // TimeZone: to.Ptr("America/Los_Angeles"), // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), @@ -161,7 +161,7 @@ func ExampleSchedulesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Patch.json func ExampleSchedulesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -202,7 +202,7 @@ func ExampleSchedulesClient_BeginUpdate() { // Properties: &armdevcenter.ScheduleProperties{ // Type: to.Ptr(armdevcenter.ScheduledTypeStopDevBox), // Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily), - // State: to.Ptr(armdevcenter.EnableStatusEnabled), + // State: to.Ptr(armdevcenter.ScheduleEnableStatusEnabled), // Time: to.Ptr("17:30"), // TimeZone: to.Ptr("America/Los_Angeles"), // ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded), @@ -210,7 +210,7 @@ func ExampleSchedulesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Delete.json func ExampleSchedulesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/skus_client.go b/sdk/resourcemanager/devcenter/armdevcenter/skus_client.go index 95a7085be162..18d609ed8f51 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/skus_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/skus_client.go @@ -47,7 +47,7 @@ func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, opt // NewListBySubscriptionPager - Lists the Microsoft.DevCenter SKUs available in a subscription // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - options - SKUsClientListBySubscriptionOptions contains the optional parameters for the SKUsClient.NewListBySubscriptionPager // method. func (client *SKUsClient) NewListBySubscriptionPager(options *SKUsClientListBySubscriptionOptions) *runtime.Pager[SKUsClientListBySubscriptionResponse] { @@ -90,7 +90,7 @@ func (client *SKUsClient) listBySubscriptionCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/devcenter/armdevcenter/skus_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/skus_client_example_test.go index 6fe4b896e4fc..8a1f9a030233 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/skus_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/skus_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Skus_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Skus_ListBySubscription.json func ExampleSKUsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/devcenter/armdevcenter/usages_client.go b/sdk/resourcemanager/devcenter/armdevcenter/usages_client.go index 117a8722ab00..6bbc48be4fba 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/usages_client.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/usages_client.go @@ -46,7 +46,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListByLocationPager - Lists the current usages and limits in this location for the provided subscription. // -// Generated from API version 2022-11-11-preview +// Generated from API version 2023-04-01 // - location - The Azure region // - options - UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager // method. @@ -94,7 +94,7 @@ func (client *UsagesClient) listByLocationCreateRequest(ctx context.Context, loc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-11-preview") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/devcenter/armdevcenter/usages_client_example_test.go b/sdk/resourcemanager/devcenter/armdevcenter/usages_client_example_test.go index 36133bfe56d9..57b2232c7a8f 100644 --- a/sdk/resourcemanager/devcenter/armdevcenter/usages_client_example_test.go +++ b/sdk/resourcemanager/devcenter/armdevcenter/usages_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c583b05741fadfdca116be3b9ccb1c4be8a73258/specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Usages_ListByLocation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Usages_ListByLocation.json func ExampleUsagesClient_NewListByLocationPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {