[Release] sdk/resourcemanager/fabric/armfabric/1.0.0 (#23630)
* [Release] sdk/resourcemanager/fabric/armfabric/1.0.0 generation from spec commit: 366aaa13cdd218b9adac716680e49473673410c8 * update changelog
This commit is contained in:
Родитель
e236888b07
Коммит
c7e3486427
|
@ -1,5 +1,10 @@
|
|||
# Release History
|
||||
|
||||
## 1.0.0 (2024-10-22)
|
||||
### Other Changes
|
||||
|
||||
Release stable version.
|
||||
|
||||
## 0.1.0 (2024-09-26)
|
||||
### Other Changes
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
### AutoRest Configuration
|
||||
|
||||
> see https://aka.ms/autorest
|
||||
|
||||
``` yaml
|
||||
azure-arm: true
|
||||
require:
|
||||
- https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/readme.md
|
||||
- https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/readme.go.md
|
||||
license-header: MICROSOFT_MIT_NO_VERSION
|
||||
module-version: 0.1.0
|
||||
tag: package-2023-11-01
|
||||
```
|
|
@ -1,7 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
// This file enables 'go generate' to regenerate this specific SDK
|
||||
//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -alwaysSetBodyParamRequired -removeUnreferencedTypes resourcemanager/fabric/armfabric
|
||||
|
||||
package armfabric
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric
|
||||
|
||||
|
@ -20,7 +16,7 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
// CapacitiesClient contains the methods for the FabricCapacities group.
|
||||
// CapacitiesClient contains the methods for the Capacities group.
|
||||
// Don't use this type directly, use NewCapacitiesClient() instead.
|
||||
type CapacitiesClient struct {
|
||||
internal *arm.Client
|
||||
|
@ -47,7 +43,7 @@ func NewCapacitiesClient(subscriptionID string, credential azcore.TokenCredentia
|
|||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-11-01
|
||||
// - location - The name of the Azure region.
|
||||
// - location - The location name.
|
||||
// - body - The CheckAvailability request
|
||||
// - options - CapacitiesClientCheckNameAvailabilityOptions contains the optional parameters for the CapacitiesClient.CheckNameAvailability
|
||||
// method.
|
||||
|
@ -74,7 +70,7 @@ func (client *CapacitiesClient) CheckNameAvailability(ctx context.Context, locat
|
|||
}
|
||||
|
||||
// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request.
|
||||
func (client *CapacitiesClient) checkNameAvailabilityCreateRequest(ctx context.Context, location string, body CheckNameAvailabilityRequest, options *CapacitiesClientCheckNameAvailabilityOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) checkNameAvailabilityCreateRequest(ctx context.Context, location string, body CheckNameAvailabilityRequest, _ *CapacitiesClientCheckNameAvailabilityOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/checkNameAvailability"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -92,6 +88,7 @@ func (client *CapacitiesClient) checkNameAvailabilityCreateRequest(ctx context.C
|
|||
reqQP.Set("api-version", "2023-11-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
req.Raw().Header["Content-Type"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, body); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -123,8 +120,7 @@ func (client *CapacitiesClient) BeginCreateOrUpdate(ctx context.Context, resourc
|
|||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacitiesClientCreateOrUpdateResponse]{
|
||||
FinalStateVia: runtime.FinalStateViaAzureAsyncOp,
|
||||
Tracer: client.internal.Tracer(),
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
|
@ -160,7 +156,7 @@ func (client *CapacitiesClient) createOrUpdate(ctx context.Context, resourceGrou
|
|||
}
|
||||
|
||||
// createOrUpdateCreateRequest creates the CreateOrUpdate request.
|
||||
func (client *CapacitiesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, resource Capacity, options *CapacitiesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, resource Capacity, _ *CapacitiesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -182,6 +178,7 @@ func (client *CapacitiesClient) createOrUpdateCreateRequest(ctx context.Context,
|
|||
reqQP.Set("api-version", "2023-11-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
req.Raw().Header["Content-Type"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, resource); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -202,8 +199,7 @@ func (client *CapacitiesClient) BeginDelete(ctx context.Context, resourceGroupNa
|
|||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacitiesClientDeleteResponse]{
|
||||
FinalStateVia: runtime.FinalStateViaLocation,
|
||||
Tracer: client.internal.Tracer(),
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
|
@ -239,7 +235,7 @@ func (client *CapacitiesClient) deleteOperation(ctx context.Context, resourceGro
|
|||
}
|
||||
|
||||
// deleteCreateRequest creates the Delete request.
|
||||
func (client *CapacitiesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, options *CapacitiesClientBeginDeleteOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, _ *CapacitiesClientBeginDeleteOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -294,7 +290,7 @@ func (client *CapacitiesClient) Get(ctx context.Context, resourceGroupName strin
|
|||
}
|
||||
|
||||
// getCreateRequest creates the Get request.
|
||||
func (client *CapacitiesClient) getCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, options *CapacitiesClientGetOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) getCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, _ *CapacitiesClientGetOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -358,7 +354,7 @@ func (client *CapacitiesClient) NewListByResourceGroupPager(resourceGroupName st
|
|||
}
|
||||
|
||||
// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
|
||||
func (client *CapacitiesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *CapacitiesClientListByResourceGroupOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *CapacitiesClientListByResourceGroupOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -417,7 +413,7 @@ func (client *CapacitiesClient) NewListBySubscriptionPager(options *CapacitiesCl
|
|||
}
|
||||
|
||||
// listBySubscriptionCreateRequest creates the ListBySubscription request.
|
||||
func (client *CapacitiesClient) listBySubscriptionCreateRequest(ctx context.Context, options *CapacitiesClientListBySubscriptionOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) listBySubscriptionCreateRequest(ctx context.Context, _ *CapacitiesClientListBySubscriptionOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Fabric/capacities"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -471,7 +467,7 @@ func (client *CapacitiesClient) NewListSKUsPager(options *CapacitiesClientListSK
|
|||
}
|
||||
|
||||
// listSKUsCreateRequest creates the ListSKUs request.
|
||||
func (client *CapacitiesClient) listSKUsCreateRequest(ctx context.Context, options *CapacitiesClientListSKUsOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) listSKUsCreateRequest(ctx context.Context, _ *CapacitiesClientListSKUsOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Fabric/skus"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -528,7 +524,7 @@ func (client *CapacitiesClient) NewListSKUsForCapacityPager(resourceGroupName st
|
|||
}
|
||||
|
||||
// listSKUsForCapacityCreateRequest creates the ListSKUsForCapacity request.
|
||||
func (client *CapacitiesClient) listSKUsForCapacityCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, options *CapacitiesClientListSKUsForCapacityOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) listSKUsForCapacityCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, _ *CapacitiesClientListSKUsForCapacityOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}/skus"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -576,8 +572,7 @@ func (client *CapacitiesClient) BeginResume(ctx context.Context, resourceGroupNa
|
|||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacitiesClientResumeResponse]{
|
||||
FinalStateVia: runtime.FinalStateViaLocation,
|
||||
Tracer: client.internal.Tracer(),
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
|
@ -613,7 +608,7 @@ func (client *CapacitiesClient) resume(ctx context.Context, resourceGroupName st
|
|||
}
|
||||
|
||||
// resumeCreateRequest creates the Resume request.
|
||||
func (client *CapacitiesClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, options *CapacitiesClientBeginResumeOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, _ *CapacitiesClientBeginResumeOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}/resume"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -652,8 +647,7 @@ func (client *CapacitiesClient) BeginSuspend(ctx context.Context, resourceGroupN
|
|||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacitiesClientSuspendResponse]{
|
||||
FinalStateVia: runtime.FinalStateViaLocation,
|
||||
Tracer: client.internal.Tracer(),
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
|
@ -689,7 +683,7 @@ func (client *CapacitiesClient) suspend(ctx context.Context, resourceGroupName s
|
|||
}
|
||||
|
||||
// suspendCreateRequest creates the Suspend request.
|
||||
func (client *CapacitiesClient) suspendCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, options *CapacitiesClientBeginSuspendOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) suspendCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, _ *CapacitiesClientBeginSuspendOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}/suspend"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -729,8 +723,7 @@ func (client *CapacitiesClient) BeginUpdate(ctx context.Context, resourceGroupNa
|
|||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacitiesClientUpdateResponse]{
|
||||
FinalStateVia: runtime.FinalStateViaLocation,
|
||||
Tracer: client.internal.Tracer(),
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
|
@ -766,7 +759,7 @@ func (client *CapacitiesClient) update(ctx context.Context, resourceGroupName st
|
|||
}
|
||||
|
||||
// updateCreateRequest creates the Update request.
|
||||
func (client *CapacitiesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, properties CapacityUpdate, options *CapacitiesClientBeginUpdateOptions) (*policy.Request, error) {
|
||||
func (client *CapacitiesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, capacityName string, properties CapacityUpdate, _ *CapacitiesClientBeginUpdateOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}"
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
|
@ -788,6 +781,7 @@ func (client *CapacitiesClient) updateCreateRequest(ctx context.Context, resourc
|
|||
reqQP.Set("api-version", "2023-11-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
req.Raw().Header["Content-Type"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, properties); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -1,100 +1,25 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// DO NOT EDIT.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
|
||||
"log"
|
||||
)
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_ListBySubscription.json
|
||||
func ExampleCapacitiesClient_NewListBySubscriptionPager() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
pager := clientFactory.NewCapacitiesClient().NewListBySubscriptionPager(nil)
|
||||
for pager.More() {
|
||||
page, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
}
|
||||
for _, v := range page.Value {
|
||||
// You could use page here. We use blank identifier for just demo purposes.
|
||||
_ = v
|
||||
}
|
||||
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
|
||||
// page.CapacityListResult = armfabric.CapacityListResult{
|
||||
// Value: []*armfabric.Capacity{
|
||||
// {
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// Tags: map[string]*string{
|
||||
// },
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com")},
|
||||
// },
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
|
||||
// State: to.Ptr(armfabric.ResourceStateActive),
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("azsdktest2"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest2"),
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// Tags: map[string]*string{
|
||||
// "testKey": to.Ptr("testValue"),
|
||||
// },
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com")},
|
||||
// },
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
|
||||
// State: to.Ptr(armfabric.ResourceStateProvisioning),
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F4"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// }},
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_CheckNameAvailability.json
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_CheckNameAvailability.json
|
||||
func ExampleCapacitiesClient_CheckNameAvailability() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
|
@ -108,71 +33,149 @@ func ExampleCapacitiesClient_CheckNameAvailability() {
|
|||
// You could use response here. We use blank identifier for just demo purposes.
|
||||
_ = res
|
||||
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
|
||||
// res.CheckNameAvailabilityResponse = armfabric.CheckNameAvailabilityResponse{
|
||||
// NameAvailable: to.Ptr(true),
|
||||
// res = armfabric.CapacitiesClientCheckNameAvailabilityResponse{
|
||||
// CheckNameAvailabilityResponse: &armfabric.CheckNameAvailabilityResponse{
|
||||
// NameAvailable: to.Ptr(true),
|
||||
// },
|
||||
// }
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_ListSkus.json
|
||||
func ExampleCapacitiesClient_NewListSKUsPager() {
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_CreateOrUpdate.json
|
||||
func ExampleCapacitiesClient_BeginCreateOrUpdate() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
pager := clientFactory.NewCapacitiesClient().NewListSKUsPager(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.RpSKUEnumerationForNewResourceResult = armfabric.RpSKUEnumerationForNewResourceResult{
|
||||
// Value: []*armfabric.RpSKUDetailsForNewResource{
|
||||
// {
|
||||
// Name: to.Ptr("F8"),
|
||||
// Locations: []*string{
|
||||
// to.Ptr("West Europe")},
|
||||
// ResourceType: to.Ptr("Capacities"),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("F64"),
|
||||
// Locations: []*string{
|
||||
// to.Ptr("West Europe")},
|
||||
// ResourceType: to.Ptr("Capacities"),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("F128"),
|
||||
// Locations: []*string{
|
||||
// to.Ptr("West Europe")},
|
||||
// ResourceType: to.Ptr("Capacities"),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("F512"),
|
||||
// Locations: []*string{
|
||||
// to.Ptr("West Europe")},
|
||||
// ResourceType: to.Ptr("Capacities"),
|
||||
// }},
|
||||
// }
|
||||
poller, err := clientFactory.NewCapacitiesClient().BeginCreateOrUpdate(ctx, "TestRG", "azsdktest", armfabric.Capacity{
|
||||
Properties: &armfabric.CapacityProperties{
|
||||
Administration: &armfabric.CapacityAdministration{
|
||||
Members: []*string{
|
||||
to.Ptr("azsdktest@microsoft.com"),
|
||||
to.Ptr("azsdktest2@microsoft.com"),
|
||||
},
|
||||
},
|
||||
},
|
||||
SKU: &armfabric.RpSKU{
|
||||
Name: to.Ptr("F2"),
|
||||
Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
},
|
||||
Location: to.Ptr("westcentralus"),
|
||||
}, 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 = armfabric.CapacitiesClientCreateOrUpdateResponse{
|
||||
// Capacity: &armfabric.Capacity{
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateUpdating),
|
||||
// State: to.Ptr(armfabric.ResourceStatePreparing),
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com"),
|
||||
// to.Ptr("azsdktest2@microsoft.com"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// Tags: map[string]*string{
|
||||
// "testKey": to.Ptr("testValue"),
|
||||
// },
|
||||
// Location: to.Ptr("westcentralus"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// },
|
||||
// }
|
||||
}
|
||||
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Delete.json
|
||||
func ExampleCapacitiesClient_BeginDelete() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
poller, err := clientFactory.NewCapacitiesClient().BeginDelete(ctx, "TestRG", "azsdktest", nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
}
|
||||
_, err = poller.PollUntilDone(ctx, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to pull the result: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_ListByResourceGroup.json
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Get.json
|
||||
func ExampleCapacitiesClient_Get() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
res, err := clientFactory.NewCapacitiesClient().Get(ctx, "TestRG", "azsdktest", 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 = armfabric.CapacitiesClientGetResponse{
|
||||
// Capacity: &armfabric.Capacity{
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
|
||||
// State: to.Ptr(armfabric.ResourceStateActive),
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com"),
|
||||
// to.Ptr("azsdktest2@microsoft.com"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// Tags: map[string]*string{
|
||||
// },
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// },
|
||||
// }
|
||||
}
|
||||
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_ListByResourceGroup.json
|
||||
func ExampleCapacitiesClient_NewListByResourceGroupPager() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
|
@ -187,262 +190,199 @@ func ExampleCapacitiesClient_NewListByResourceGroupPager() {
|
|||
_ = 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.CapacityListResult = armfabric.CapacityListResult{
|
||||
// Value: []*armfabric.Capacity{
|
||||
// {
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// Tags: map[string]*string{
|
||||
// },
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com")},
|
||||
// },
|
||||
// page = armfabric.CapacitiesClientListByResourceGroupResponse{
|
||||
// CapacityListResult: armfabric.CapacityListResult{
|
||||
// Value: []*armfabric.Capacity{
|
||||
// {
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
|
||||
// State: to.Ptr(armfabric.ResourceStateActive),
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// Tags: map[string]*string{
|
||||
// },
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("azsdktest2"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest2"),
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateProvisioning),
|
||||
// State: to.Ptr(armfabric.ResourceStateProvisioning),
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F4"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// Tags: map[string]*string{
|
||||
// "testKey": to.Ptr("testValue"),
|
||||
// },
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest2"),
|
||||
// Name: to.Ptr("azsdktest2"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_ListBySubscription.json
|
||||
func ExampleCapacitiesClient_NewListBySubscriptionPager() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
pager := clientFactory.NewCapacitiesClient().NewListBySubscriptionPager(nil)
|
||||
for pager.More() {
|
||||
page, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
}
|
||||
for _, v := range page.Value {
|
||||
// You could use page here. We use blank identifier for just demo purposes.
|
||||
_ = v
|
||||
}
|
||||
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
|
||||
// page = armfabric.CapacitiesClientListBySubscriptionResponse{
|
||||
// CapacityListResult: armfabric.CapacityListResult{
|
||||
// Value: []*armfabric.Capacity{
|
||||
// {
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
|
||||
// State: to.Ptr(armfabric.ResourceStateActive),
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com")},
|
||||
// to.Ptr("azsdktest@microsoft.com"),
|
||||
// },
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
|
||||
// State: to.Ptr(armfabric.ResourceStateProvisioning),
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F4"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// Tags: map[string]*string{
|
||||
// },
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// },
|
||||
// {
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateProvisioning),
|
||||
// State: to.Ptr(armfabric.ResourceStateProvisioning),
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com"),
|
||||
// },
|
||||
// },
|
||||
// }},
|
||||
// }
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F4"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// Tags: map[string]*string{
|
||||
// "testKey": to.Ptr("testValue"),
|
||||
// },
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest2"),
|
||||
// Name: to.Ptr("azsdktest2"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_Get.json
|
||||
func ExampleCapacitiesClient_Get() {
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_ListSkus.json
|
||||
func ExampleCapacitiesClient_NewListSKUsPager() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
res, err := clientFactory.NewCapacitiesClient().Get(ctx, "TestRG", "azsdktest", 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.Capacity = armfabric.Capacity{
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Location: to.Ptr("West Central US"),
|
||||
// Tags: map[string]*string{
|
||||
// },
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com"),
|
||||
// to.Ptr("azsdktest2@microsoft.com")},
|
||||
// },
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
|
||||
// State: to.Ptr(armfabric.ResourceStateActive),
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// }
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_CreateOrUpdate.json
|
||||
func ExampleCapacitiesClient_BeginCreateOrUpdate() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
poller, err := clientFactory.NewCapacitiesClient().BeginCreateOrUpdate(ctx, "TestRG", "azsdktest", armfabric.Capacity{
|
||||
Location: to.Ptr("westcentralus"),
|
||||
Properties: &armfabric.CapacityProperties{
|
||||
Administration: &armfabric.CapacityAdministration{
|
||||
Members: []*string{
|
||||
to.Ptr("azsdktest@microsoft.com"),
|
||||
to.Ptr("azsdktest2@microsoft.com")},
|
||||
},
|
||||
},
|
||||
SKU: &armfabric.RpSKU{
|
||||
Name: to.Ptr("F2"),
|
||||
Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
},
|
||||
}, 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.Capacity = armfabric.Capacity{
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Location: to.Ptr("westcentralus"),
|
||||
// Tags: map[string]*string{
|
||||
// "testKey": to.Ptr("testValue"),
|
||||
// },
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest@microsoft.com"),
|
||||
// to.Ptr("azsdktest2@microsoft.com")},
|
||||
// },
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
|
||||
// State: to.Ptr(armfabric.ResourceStatePreparing),
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// }
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_Update.json
|
||||
func ExampleCapacitiesClient_BeginUpdate() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
poller, err := clientFactory.NewCapacitiesClient().BeginUpdate(ctx, "TestRG", "azsdktest", armfabric.CapacityUpdate{
|
||||
Properties: &armfabric.CapacityUpdateProperties{
|
||||
Administration: &armfabric.CapacityAdministration{
|
||||
Members: []*string{
|
||||
to.Ptr("azsdktest2@microsoft.com")},
|
||||
},
|
||||
},
|
||||
SKU: &armfabric.RpSKU{
|
||||
Name: to.Ptr("F8"),
|
||||
Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
},
|
||||
Tags: map[string]*string{
|
||||
"testKey": to.Ptr("testValue"),
|
||||
},
|
||||
}, 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.Capacity = armfabric.Capacity{
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Location: to.Ptr("westcentralus"),
|
||||
// Tags: map[string]*string{
|
||||
// "testKey": to.Ptr("testValue"),
|
||||
// },
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest2@microsoft.com")},
|
||||
// },
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
|
||||
// State: to.Ptr(armfabric.ResourceStatePreparing),
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F8"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// }
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_Delete.json
|
||||
func ExampleCapacitiesClient_BeginDelete() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
poller, err := clientFactory.NewCapacitiesClient().BeginDelete(ctx, "TestRG", "azsdktest", 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)
|
||||
pager := clientFactory.NewCapacitiesClient().NewListSKUsPager(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 = armfabric.CapacitiesClientListSKUsResponse{
|
||||
// RpSKUEnumerationForNewResourceResult: armfabric.RpSKUEnumerationForNewResourceResult{
|
||||
// Value: []*armfabric.RpSKUDetailsForNewResource{
|
||||
// {
|
||||
// Name: to.Ptr("F8"),
|
||||
// Locations: []*string{
|
||||
// to.Ptr("West Europe"),
|
||||
// },
|
||||
// ResourceType: to.Ptr("Capacities"),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("F64"),
|
||||
// Locations: []*string{
|
||||
// to.Ptr("West Europe"),
|
||||
// },
|
||||
// ResourceType: to.Ptr("Capacities"),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("F128"),
|
||||
// Locations: []*string{
|
||||
// to.Ptr("West Europe"),
|
||||
// },
|
||||
// ResourceType: to.Ptr("Capacities"),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("F512"),
|
||||
// Locations: []*string{
|
||||
// to.Ptr("West Europe"),
|
||||
// },
|
||||
// ResourceType: to.Ptr("Capacities"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_Resume.json
|
||||
func ExampleCapacitiesClient_BeginResume() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
poller, err := clientFactory.NewCapacitiesClient().BeginResume(ctx, "TestRG", "azsdktest", nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
}
|
||||
_, err = poller.PollUntilDone(ctx, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to pull the result: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_ListSkusForCapacity.json
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_ListSkusForCapacity.json
|
||||
func ExampleCapacitiesClient_NewListSKUsForCapacityPager() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
|
@ -457,97 +397,126 @@ func ExampleCapacitiesClient_NewListSKUsForCapacityPager() {
|
|||
_ = 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.RpSKUEnumerationForExistingResourceResult = armfabric.RpSKUEnumerationForExistingResourceResult{
|
||||
// Value: []*armfabric.RpSKUDetailsForExistingResource{
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F16"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// page = armfabric.CapacitiesClientListSKUsForCapacityResponse{
|
||||
// RpSKUEnumerationForExistingResourceResult: armfabric.RpSKUEnumerationForExistingResourceResult{
|
||||
// Value: []*armfabric.RpSKUDetailsForExistingResource{
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F16"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F8"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F64"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F1024"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F128"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F256"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F32"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F4"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F512"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2048"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F8"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F64"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F1024"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F128"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F256"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F32"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F4"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F512"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F2048"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// }},
|
||||
// },
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/FabricCapacities_Suspend.json
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Resume.json
|
||||
func ExampleCapacitiesClient_BeginResume() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
poller, err := clientFactory.NewCapacitiesClient().BeginResume(ctx, "TestRG", "azsdktest", 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 = armfabric.CapacitiesClientResumeResponse{
|
||||
// }
|
||||
}
|
||||
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Suspend.json
|
||||
func ExampleCapacitiesClient_BeginSuspend() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
|
@ -555,8 +524,76 @@ func ExampleCapacitiesClient_BeginSuspend() {
|
|||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
}
|
||||
_, err = poller.PollUntilDone(ctx, nil)
|
||||
res, err := poller.PollUntilDone(ctx, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to pull the result: %v", err)
|
||||
}
|
||||
// You could use response here. We use blank identifier for just demo purposes.
|
||||
_ = res
|
||||
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
|
||||
// res = armfabric.CapacitiesClientSuspendResponse{
|
||||
// }
|
||||
}
|
||||
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Update.json
|
||||
func ExampleCapacitiesClient_BeginUpdate() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
poller, err := clientFactory.NewCapacitiesClient().BeginUpdate(ctx, "TestRG", "azsdktest", armfabric.CapacityUpdate{
|
||||
SKU: &armfabric.RpSKU{
|
||||
Name: to.Ptr("F8"),
|
||||
Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
},
|
||||
Tags: map[string]*string{
|
||||
"testKey": to.Ptr("testValue"),
|
||||
},
|
||||
Properties: &armfabric.CapacityUpdateProperties{
|
||||
Administration: &armfabric.CapacityAdministration{
|
||||
Members: []*string{
|
||||
to.Ptr("azsdktest2@microsoft.com"),
|
||||
},
|
||||
},
|
||||
},
|
||||
}, 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 = armfabric.CapacitiesClientUpdateResponse{
|
||||
// Capacity: &armfabric.Capacity{
|
||||
// Properties: &armfabric.CapacityProperties{
|
||||
// ProvisioningState: to.Ptr(armfabric.ProvisioningStateUpdating),
|
||||
// State: to.Ptr(armfabric.ResourceStatePreparing),
|
||||
// Administration: &armfabric.CapacityAdministration{
|
||||
// Members: []*string{
|
||||
// to.Ptr("azsdktest2@microsoft.com"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// SKU: &armfabric.RpSKU{
|
||||
// Name: to.Ptr("F8"),
|
||||
// Tier: to.Ptr(armfabric.RpSKUTierFabric),
|
||||
// },
|
||||
// Tags: map[string]*string{
|
||||
// "testKey": to.Ptr("testValue"),
|
||||
// },
|
||||
// Location: to.Ptr("westcentralus"),
|
||||
// ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
|
||||
// Name: to.Ptr("azsdktest"),
|
||||
// Type: to.Ptr("Microsoft.Fabric/capacities"),
|
||||
// },
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric
|
||||
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric
|
||||
|
||||
const (
|
||||
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
|
||||
moduleVersion = "v0.1.0"
|
||||
moduleVersion = "v1.0.0"
|
||||
)
|
||||
|
||||
// ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
|
||||
// ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
|
||||
type ActionType string
|
||||
|
||||
const (
|
||||
// ActionTypeInternal - Actions are for internal-only APIs.
|
||||
ActionTypeInternal ActionType = "Internal"
|
||||
)
|
||||
|
||||
|
@ -27,12 +24,14 @@ func PossibleActionTypeValues() []ActionType {
|
|||
}
|
||||
}
|
||||
|
||||
// CheckNameAvailabilityReason - The reason why the given name is not available.
|
||||
// CheckNameAvailabilityReason - Possible reasons for a name not being available.
|
||||
type CheckNameAvailabilityReason string
|
||||
|
||||
const (
|
||||
// CheckNameAvailabilityReasonAlreadyExists - Name already exists.
|
||||
CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists"
|
||||
CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid"
|
||||
// CheckNameAvailabilityReasonInvalid - Name is invalid.
|
||||
CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid"
|
||||
)
|
||||
|
||||
// PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.
|
||||
|
@ -43,14 +42,18 @@ func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason {
|
|||
}
|
||||
}
|
||||
|
||||
// CreatedByType - The type of identity that created the resource.
|
||||
// CreatedByType - The kind of entity that created the resource.
|
||||
type CreatedByType string
|
||||
|
||||
const (
|
||||
CreatedByTypeApplication CreatedByType = "Application"
|
||||
CreatedByTypeKey CreatedByType = "Key"
|
||||
// CreatedByTypeApplication - The entity was created by an application.
|
||||
CreatedByTypeApplication CreatedByType = "Application"
|
||||
// CreatedByTypeKey - The entity was created by a key.
|
||||
CreatedByTypeKey CreatedByType = "Key"
|
||||
// CreatedByTypeManagedIdentity - The entity was created by a managed identity.
|
||||
CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
|
||||
CreatedByTypeUser CreatedByType = "User"
|
||||
// CreatedByTypeUser - The entity was created by a user.
|
||||
CreatedByTypeUser CreatedByType = "User"
|
||||
)
|
||||
|
||||
// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
|
||||
|
@ -68,8 +71,11 @@ func PossibleCreatedByTypeValues() []CreatedByType {
|
|||
type Origin string
|
||||
|
||||
const (
|
||||
OriginSystem Origin = "system"
|
||||
OriginUser Origin = "user"
|
||||
// OriginSystem - Indicates the operation is initiated by a system.
|
||||
OriginSystem Origin = "system"
|
||||
// OriginUser - Indicates the operation is initiated by a user.
|
||||
OriginUser Origin = "user"
|
||||
// OriginUserSystem - Indicates the operation is initiated by a user or system.
|
||||
OriginUserSystem Origin = "user,system"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
|
@ -110,6 +106,10 @@ func (c *CapacitiesServerTransport) Do(req *http.Request) (*http.Response, error
|
|||
return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
|
||||
}
|
||||
|
||||
return c.dispatchToMethodFake(req, method)
|
||||
}
|
||||
|
||||
func (c *CapacitiesServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) {
|
||||
var resp *http.Response
|
||||
var err error
|
||||
|
||||
|
@ -140,11 +140,7 @@ func (c *CapacitiesServerTransport) Do(req *http.Request) (*http.Response, error
|
|||
err = fmt.Errorf("unhandled API %s", method)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CapacitiesServerTransport) dispatchCheckNameAvailability(req *http.Request) (*http.Response, error) {
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
|
@ -51,6 +47,10 @@ func (o *OperationsServerTransport) Do(req *http.Request) (*http.Response, error
|
|||
return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
|
||||
}
|
||||
|
||||
return o.dispatchToMethodFake(req, method)
|
||||
}
|
||||
|
||||
func (o *OperationsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) {
|
||||
var resp *http.Response
|
||||
var err error
|
||||
|
||||
|
@ -61,11 +61,7 @@ func (o *OperationsServerTransport) Do(req *http.Request) (*http.Response, error
|
|||
err = fmt.Errorf("unhandled API %s", method)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) {
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
|
@ -19,7 +15,10 @@ import (
|
|||
|
||||
// ServerFactory is a fake server for instances of the armfabric.ClientFactory type.
|
||||
type ServerFactory struct {
|
||||
// CapacitiesServer contains the fakes for client CapacitiesClient
|
||||
CapacitiesServer CapacitiesServer
|
||||
|
||||
// OperationsServer contains the fakes for client OperationsClient
|
||||
OperationsServer OperationsServer
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
|
@ -60,6 +56,9 @@ func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error {
|
|||
}
|
||||
|
||||
func (t *dateTimeRFC3339) UnmarshalText(data []byte) error {
|
||||
if len(data) == 0 {
|
||||
return nil
|
||||
}
|
||||
tzOffset := tzOffsetRegex.Match(data)
|
||||
hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t")
|
||||
var layout string
|
||||
|
|
|
@ -3,19 +3,19 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric
|
|||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/kylelemons/godebug v1.1.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
|
||||
golang.org/x/crypto v0.24.0 // indirect
|
||||
golang.org/x/net v0.26.0 // indirect
|
||||
golang.org/x/sys v0.21.0 // indirect
|
||||
golang.org/x/crypto v0.25.0 // indirect
|
||||
golang.org/x/net v0.27.0 // indirect
|
||||
golang.org/x/sys v0.22.0 // indirect
|
||||
golang.org/x/text v0.16.0 // indirect
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 h1:jBQA3cKT4L2rWMpgE7Yt3Hwh2aUj8KXjIGLxjHeYNNo=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0/go.mod h1:4OG6tQ9EOP/MT0NMjDlRzWoVFxfu9rN9B2X+tlSVktg=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
|
@ -17,13 +17,13 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmd
|
|||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
|
||||
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
|
||||
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
|
||||
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
|
||||
golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
|
||||
golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
|
||||
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
|
||||
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
|
||||
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric
|
||||
|
||||
|
@ -24,12 +20,12 @@ type Capacity struct {
|
|||
// Resource tags.
|
||||
Tags map[string]*string
|
||||
|
||||
// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
||||
ID *string
|
||||
|
||||
// READ-ONLY; The name of the resource
|
||||
// READ-ONLY; The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
|
||||
Name *string
|
||||
|
||||
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
||||
ID *string
|
||||
|
||||
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
|
||||
SystemData *SystemData
|
||||
|
||||
|
@ -94,7 +90,7 @@ type CheckNameAvailabilityRequest struct {
|
|||
|
||||
// CheckNameAvailabilityResponse - The check availability result.
|
||||
type CheckNameAvailabilityResponse struct {
|
||||
// Detailed reason why the given name is available.
|
||||
// Detailed reason why the given name is not available.
|
||||
Message *string
|
||||
|
||||
// Indicates if the resource name is available.
|
||||
|
@ -106,14 +102,14 @@ type CheckNameAvailabilityResponse struct {
|
|||
|
||||
// Operation - Details of a REST API operation, returned from the Resource Provider Operations API
|
||||
type Operation struct {
|
||||
// Localized display information for this particular operation.
|
||||
Display *OperationDisplay
|
||||
|
||||
// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
|
||||
// Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
|
||||
ActionType *ActionType
|
||||
|
||||
// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
|
||||
// operations.
|
||||
// READ-ONLY; Localized display information for this particular operation.
|
||||
Display *OperationDisplay
|
||||
|
||||
// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
|
||||
// Resource Manager/control-plane operations.
|
||||
IsDataAction *bool
|
||||
|
||||
// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
|
||||
|
@ -125,7 +121,7 @@ type Operation struct {
|
|||
Origin *Origin
|
||||
}
|
||||
|
||||
// OperationDisplay - Localized display information for this particular operation.
|
||||
// OperationDisplay - Localized display information for and operation.
|
||||
type OperationDisplay struct {
|
||||
// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
|
||||
Description *string
|
||||
|
@ -146,11 +142,11 @@ type OperationDisplay struct {
|
|||
// OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to
|
||||
// get the next set of results.
|
||||
type OperationListResult struct {
|
||||
// READ-ONLY; URL to get the next set of operation list results (if there are any).
|
||||
NextLink *string
|
||||
|
||||
// READ-ONLY; List of operations supported by the resource provider
|
||||
// REQUIRED; The Operation items on this page
|
||||
Value []*Operation
|
||||
|
||||
// The link to the next page of items
|
||||
NextLink *string
|
||||
}
|
||||
|
||||
// RpSKU - Represents the SKU name and Azure pricing tier for Microsoft Fabric capacity resource.
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric
|
||||
|
||||
|
@ -65,7 +61,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption
|
|||
}
|
||||
|
||||
// listCreateRequest creates the List request.
|
||||
func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) {
|
||||
func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *OperationsClientListOptions) (*policy.Request, error) {
|
||||
urlPath := "/providers/Microsoft.Fabric/operations"
|
||||
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
|
||||
if err != nil {
|
||||
|
|
|
@ -1,30 +1,24 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// DO NOT EDIT.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
|
||||
"log"
|
||||
)
|
||||
|
||||
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/fabric/resource-manager/Microsoft.Fabric/stable/2023-11-01/examples/Operations_List.json
|
||||
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/Operations_List.json
|
||||
func ExampleOperationsClient_NewListPager() {
|
||||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
}
|
||||
ctx := context.Background()
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscription-id>", cred, nil)
|
||||
clientFactory, err := armfabric.NewClientFactory("<subscriptionID>", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
|
@ -39,58 +33,61 @@ func ExampleOperationsClient_NewListPager() {
|
|||
_ = v
|
||||
}
|
||||
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
|
||||
// page.OperationListResult = armfabric.OperationListResult{
|
||||
// Value: []*armfabric.Operation{
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/read"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Description: to.Ptr("Retrieves the information of the specified Fabric Capacity."),
|
||||
// Operation: to.Ptr("Read Fabric Capacity"),
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// page = armfabric.OperationsClientListResponse{
|
||||
// OperationListResult: armfabric.OperationListResult{
|
||||
// Value: []*armfabric.Operation{
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/read"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// Operation: to.Ptr("Read Fabric Capacity"),
|
||||
// Description: to.Ptr("Retrieves the information of the specified Fabric Capacity."),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/write"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// Operation: to.Ptr("Create/Update Fabric Capacity"),
|
||||
// Description: to.Ptr("Creates or updates the specified Fabric Capacity."),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/delete"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// Operation: to.Ptr("Delete the Fabric Capacity"),
|
||||
// Description: to.Ptr("Deletes the Fabric Capacity."),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/suspend/action"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// Operation: to.Ptr("Suspend the specified Fabric capacity"),
|
||||
// Description: to.Ptr("Suspend the specified Fabric capacity"),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/resume/action"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// Operation: to.Ptr("Resume the specified Fabric capacity"),
|
||||
// Description: to.Ptr("Resume the specified Fabric capacity"),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/write"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Description: to.Ptr("Creates or updates the specified Fabric Capacity."),
|
||||
// Operation: to.Ptr("Create/Update Fabric Capacity"),
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/delete"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Description: to.Ptr("Deletes the Fabric Capacity."),
|
||||
// Operation: to.Ptr("Delete the Fabric Capacity"),
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/suspend/action"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Description: to.Ptr("Suspend the specified Fabric capacity"),
|
||||
// Operation: to.Ptr("Suspend the specified Fabric capacity"),
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// },
|
||||
// {
|
||||
// Name: to.Ptr("Microsoft.Fabric/capacities/resume/action"),
|
||||
// Display: &armfabric.OperationDisplay{
|
||||
// Description: to.Ptr("Resume the specified Fabric capacity"),
|
||||
// Operation: to.Ptr("Resume the specified Fabric capacity"),
|
||||
// Provider: to.Ptr("Microsoft Fabric"),
|
||||
// Resource: to.Ptr("capacities"),
|
||||
// },
|
||||
// Origin: to.Ptr(armfabric.OriginUserSystem),
|
||||
// }},
|
||||
// },
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,41 +1,37 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric
|
||||
|
||||
// CapacitiesClientBeginCreateOrUpdateOptions contains the optional parameters for the CapacitiesClient.BeginCreateOrUpdate
|
||||
// method.
|
||||
type CapacitiesClientBeginCreateOrUpdateOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
// Resumes the long-running operation from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
||||
// CapacitiesClientBeginDeleteOptions contains the optional parameters for the CapacitiesClient.BeginDelete method.
|
||||
type CapacitiesClientBeginDeleteOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
// Resumes the long-running operation from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
||||
// CapacitiesClientBeginResumeOptions contains the optional parameters for the CapacitiesClient.BeginResume method.
|
||||
type CapacitiesClientBeginResumeOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
// Resumes the long-running operation from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
||||
// CapacitiesClientBeginSuspendOptions contains the optional parameters for the CapacitiesClient.BeginSuspend method.
|
||||
type CapacitiesClientBeginSuspendOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
// Resumes the long-running operation from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
||||
// CapacitiesClientBeginUpdateOptions contains the optional parameters for the CapacitiesClient.BeginUpdate method.
|
||||
type CapacitiesClientBeginUpdateOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
// Resumes the long-running operation from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
|
||||
|
||||
package armfabric
|
||||
|
||||
|
@ -60,6 +56,9 @@ func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error {
|
|||
}
|
||||
|
||||
func (t *dateTimeRFC3339) UnmarshalText(data []byte) error {
|
||||
if len(data) == 0 {
|
||||
return nil
|
||||
}
|
||||
tzOffset := tzOffsetRegex.Match(data)
|
||||
hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t")
|
||||
var layout string
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
directory: specification/fabric/Microsoft.Fabric.Management
|
||||
commit: 366aaa13cdd218b9adac716680e49473673410c8
|
||||
repo: Azure/azure-rest-api-specs
|
||||
additionalDirectories:
|
Загрузка…
Ссылка в новой задаче