Documentation ¶
Index ¶
- type Account
- type AccountListResult
- type AccountProperties
- type AccountUpdate
- type AccountUpdateProperties
- type AccountsClient
- func (client *AccountsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, resource Account, ...) (*runtime.Poller[AccountsClientCreateOrUpdateResponse], error)
- func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[AccountsClientDeleteResponse], error)
- func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, name string, ...) (AccountsClientGetResponse, error)
- func (client *AccountsClient) NewListByResourceGroupPager(resourceGroupName string, options *AccountsClientListByResourceGroupOptions) *runtime.Pager[AccountsClientListByResourceGroupResponse]
- func (client *AccountsClient) NewListBySubscriptionPager(options *AccountsClientListBySubscriptionOptions) *runtime.Pager[AccountsClientListBySubscriptionResponse]
- func (client *AccountsClient) Update(ctx context.Context, resourceGroupName string, name string, ...) (AccountsClientUpdateResponse, error)
- type AccountsClientBeginCreateOrUpdateOptions
- type AccountsClientBeginDeleteOptions
- type AccountsClientCreateOrUpdateResponse
- type AccountsClientDeleteResponse
- type AccountsClientGetOptions
- type AccountsClientGetResponse
- type AccountsClientListByResourceGroupOptions
- type AccountsClientListByResourceGroupResponse
- type AccountsClientListBySubscriptionOptions
- type AccountsClientListBySubscriptionResponse
- type AccountsClientUpdateOptions
- type AccountsClientUpdateResponse
- type ActionType
- type ClientFactory
- type CreatedByType
- type EnablementStatus
- type FreeTrialProperties
- type FreeTrialState
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type ProvisioningState
- type Quota
- type QuotaListResult
- type QuotaNames
- type QuotaProperties
- type QuotasClient
- type QuotasClientGetOptions
- type QuotasClientGetResponse
- type QuotasClientListBySubscriptionOptions
- type QuotasClientListBySubscriptionResponse
- type SystemData
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // REQUIRED; The geo-location where the resource lives Location *string // The resource-specific properties for this resource. Properties *AccountProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Account - An account resource
func (Account) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Account.
func (*Account) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Account.
type AccountListResult ¶
type AccountListResult struct { // REQUIRED; The Account items on this page Value []*Account // The link to the next page of items NextLink *string }
AccountListResult - The response of a Account list operation.
func (AccountListResult) MarshalJSON ¶
func (a AccountListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountListResult.
func (*AccountListResult) UnmarshalJSON ¶
func (a *AccountListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountListResult.
type AccountProperties ¶
type AccountProperties struct { // This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect // to browsers in the closest Azure region, ensuring lower latency. If // disabled, workers connect to browsers in the Azure region in which the workspace was initially created. RegionalAffinity *EnablementStatus // When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and // screenshots, in the Playwright portal. This enables faster and more efficient // troubleshooting. Reporting *EnablementStatus // When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel // workers for a test run, significantly minimizing test completion durations. ScalableExecution *EnablementStatus // READ-ONLY; The Playwright testing dashboard URI for the account resource. DashboardURI *string // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState }
AccountProperties - Account properties
func (AccountProperties) MarshalJSON ¶
func (a AccountProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountProperties.
func (*AccountProperties) UnmarshalJSON ¶
func (a *AccountProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountProperties.
type AccountUpdate ¶
type AccountUpdate struct { // The updatable properties of the Account. Properties *AccountUpdateProperties // Resource tags. Tags map[string]*string }
AccountUpdate - The type used for update operations of the Account.
func (AccountUpdate) MarshalJSON ¶
func (a AccountUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountUpdate.
func (*AccountUpdate) UnmarshalJSON ¶
func (a *AccountUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountUpdate.
type AccountUpdateProperties ¶
type AccountUpdateProperties struct { // This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect // to browsers in the closest Azure region, ensuring lower latency. If // disabled, workers connect to browsers in the Azure region in which the workspace was initially created. RegionalAffinity *EnablementStatus // When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and // screenshots, in the Playwright portal. This enables faster and more efficient // troubleshooting. Reporting *EnablementStatus // When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel // workers for a test run, significantly minimizing test completion durations. ScalableExecution *EnablementStatus }
AccountUpdateProperties - The updatable properties of the Account.
func (AccountUpdateProperties) MarshalJSON ¶
func (a AccountUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountUpdateProperties.
func (*AccountUpdateProperties) UnmarshalJSON ¶
func (a *AccountUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountUpdateProperties.
type AccountsClient ¶
type AccountsClient struct {
// contains filtered or unexported fields
}
AccountsClient contains the methods for the Accounts group. Don't use this type directly, use NewAccountsClient() instead.
func NewAccountsClient ¶
func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error)
NewAccountsClient creates a new instance of AccountsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AccountsClient) BeginCreateOrUpdate ¶
func (client *AccountsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, resource Account, options *AccountsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AccountsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a Account If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- name - Name of account
- resource - Resource create parameters.
- options - AccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the AccountsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_CreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/playwrighttesting/armplaywrighttesting" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armplaywrighttesting.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreateOrUpdate(ctx, "dummyrg", "myPlaywrightAccount", armplaywrighttesting.Account{ Location: to.Ptr("westus"), Tags: map[string]*string{ "Team": to.Ptr("Dev Exp"), }, Properties: &armplaywrighttesting.AccountProperties{ RegionalAffinity: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), }, }, 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.Account = armplaywrighttesting.Account{ // Name: to.Ptr("myPlaywrightAccount"), // Type: to.Ptr("Microsoft.AzurePlaywrightService/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount"), // SystemData: &armplaywrighttesting.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // CreatedBy: to.Ptr("userId1001"), // CreatedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // LastModifiedBy: to.Ptr("userId1001"), // LastModifiedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // }, // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "Team": to.Ptr("Dev Exp"), // }, // Properties: &armplaywrighttesting.AccountProperties{ // DashboardURI: to.Ptr("https://dashboard.00000000-0000-0000-0000-000000000000.domain.com"), // ProvisioningState: to.Ptr(armplaywrighttesting.ProvisioningStateSucceeded), // RegionalAffinity: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // Reporting: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // ScalableExecution: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // }, // } }
Output:
func (*AccountsClient) BeginDelete ¶
func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *AccountsClientBeginDeleteOptions) (*runtime.Poller[AccountsClientDeleteResponse], error)
BeginDelete - Delete a Account If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- name - Name of account
- options - AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/playwrighttesting/armplaywrighttesting" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armplaywrighttesting.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginDelete(ctx, "dummyrg", "myPlaywrightAccount", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*AccountsClient) Get ¶
func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, name string, options *AccountsClientGetOptions) (AccountsClientGetResponse, error)
Get - Get a Account If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- name - Name of account
- options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/playwrighttesting/armplaywrighttesting" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armplaywrighttesting.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Get(ctx, "dummyrg", "myPlaywrightAccount", 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.Account = armplaywrighttesting.Account{ // Name: to.Ptr("myPlaywrightAccount"), // Type: to.Ptr("Microsoft.AzurePlaywrightService/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount"), // SystemData: &armplaywrighttesting.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // CreatedBy: to.Ptr("userId1001"), // CreatedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // LastModifiedBy: to.Ptr("userId1001"), // LastModifiedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // }, // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "Team": to.Ptr("Dev Exp"), // }, // Properties: &armplaywrighttesting.AccountProperties{ // DashboardURI: to.Ptr("https://dashboard.00000000-0000-0000-0000-000000000000.domain.com"), // ProvisioningState: to.Ptr(armplaywrighttesting.ProvisioningStateSucceeded), // RegionalAffinity: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // Reporting: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // ScalableExecution: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // }, // } }
Output:
func (*AccountsClient) NewListByResourceGroupPager ¶
func (client *AccountsClient) NewListByResourceGroupPager(resourceGroupName string, options *AccountsClientListByResourceGroupOptions) *runtime.Pager[AccountsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List Account resources by resource group
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/playwrighttesting/armplaywrighttesting" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armplaywrighttesting.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAccountsClient().NewListByResourceGroupPager("dummyrg", 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.AccountListResult = armplaywrighttesting.AccountListResult{ // Value: []*armplaywrighttesting.Account{ // { // Name: to.Ptr("myPlaywrightAccount"), // Type: to.Ptr("Microsoft.AzurePlaywrightService/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount"), // SystemData: &armplaywrighttesting.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // CreatedBy: to.Ptr("userId1001"), // CreatedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // LastModifiedBy: to.Ptr("userId1001"), // LastModifiedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // }, // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "Team": to.Ptr("Dev Exp"), // }, // Properties: &armplaywrighttesting.AccountProperties{ // DashboardURI: to.Ptr("https://dashboard.00000000-0000-0000-0000-000000000000.domain.com"), // ProvisioningState: to.Ptr(armplaywrighttesting.ProvisioningStateSucceeded), // RegionalAffinity: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // Reporting: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // ScalableExecution: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // }, // }}, // } } }
Output:
func (*AccountsClient) NewListBySubscriptionPager ¶
func (client *AccountsClient) NewListBySubscriptionPager(options *AccountsClientListBySubscriptionOptions) *runtime.Pager[AccountsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List Account resources by subscription ID
Generated from API version 2023-10-01-preview
- options - AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/playwrighttesting/armplaywrighttesting" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armplaywrighttesting.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAccountsClient().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.AccountListResult = armplaywrighttesting.AccountListResult{ // Value: []*armplaywrighttesting.Account{ // { // Name: to.Ptr("myPlaywrightAccount"), // Type: to.Ptr("Microsoft.AzurePlaywrightService/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount"), // SystemData: &armplaywrighttesting.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // CreatedBy: to.Ptr("userId1001"), // CreatedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // LastModifiedBy: to.Ptr("userId1001"), // LastModifiedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // }, // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "Team": to.Ptr("Dev Exp"), // }, // Properties: &armplaywrighttesting.AccountProperties{ // DashboardURI: to.Ptr("https://dashboard.00000000-0000-0000-0000-000000000000.domain.com"), // ProvisioningState: to.Ptr(armplaywrighttesting.ProvisioningStateSucceeded), // RegionalAffinity: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // Reporting: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // ScalableExecution: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // }, // }}, // } } }
Output:
func (*AccountsClient) Update ¶
func (client *AccountsClient) Update(ctx context.Context, resourceGroupName string, name string, properties AccountUpdate, options *AccountsClientUpdateOptions) (AccountsClientUpdateResponse, error)
Update - Update a Account If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- name - Name of account
- properties - The resource properties to be updated.
- options - AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/playwrighttesting/armplaywrighttesting" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armplaywrighttesting.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "dummyrg", "myPlaywrightAccount", armplaywrighttesting.AccountUpdate{ Properties: &armplaywrighttesting.AccountUpdateProperties{ RegionalAffinity: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), }, Tags: map[string]*string{ "Division": to.Ptr("LT"), "Team": to.Ptr("Dev Exp"), }, }, 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.Account = armplaywrighttesting.Account{ // Name: to.Ptr("myPlaywrightAccount"), // Type: to.Ptr("Microsoft.AzurePlaywrightService/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount"), // SystemData: &armplaywrighttesting.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // CreatedBy: to.Ptr("userId1001"), // CreatedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33.000Z"); return t}()), // LastModifiedBy: to.Ptr("userId1001"), // LastModifiedByType: to.Ptr(armplaywrighttesting.CreatedByTypeUser), // }, // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "Team": to.Ptr("Dev Exp"), // }, // Properties: &armplaywrighttesting.AccountProperties{ // DashboardURI: to.Ptr("https://dashboard.00000000-0000-0000-0000-000000000000.domain.com"), // ProvisioningState: to.Ptr(armplaywrighttesting.ProvisioningStateSucceeded), // RegionalAffinity: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // Reporting: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // ScalableExecution: to.Ptr(armplaywrighttesting.EnablementStatusEnabled), // }, // } }
Output:
type AccountsClientBeginCreateOrUpdateOptions ¶
type AccountsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the AccountsClient.BeginCreateOrUpdate method.
type AccountsClientBeginDeleteOptions ¶
type AccountsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method.
type AccountsClientCreateOrUpdateResponse ¶
type AccountsClientCreateOrUpdateResponse struct { // An account resource Account }
AccountsClientCreateOrUpdateResponse contains the response from method AccountsClient.BeginCreateOrUpdate.
type AccountsClientDeleteResponse ¶
type AccountsClientDeleteResponse struct { }
AccountsClientDeleteResponse contains the response from method AccountsClient.BeginDelete.
type AccountsClientGetOptions ¶
type AccountsClientGetOptions struct { }
AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.
type AccountsClientGetResponse ¶
type AccountsClientGetResponse struct { // An account resource Account }
AccountsClientGetResponse contains the response from method AccountsClient.Get.
type AccountsClientListByResourceGroupOptions ¶
type AccountsClientListByResourceGroupOptions struct { }
AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager method.
type AccountsClientListByResourceGroupResponse ¶
type AccountsClientListByResourceGroupResponse struct { // The response of a Account list operation. AccountListResult }
AccountsClientListByResourceGroupResponse contains the response from method AccountsClient.NewListByResourceGroupPager.
type AccountsClientListBySubscriptionOptions ¶
type AccountsClientListBySubscriptionOptions struct { }
AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager method.
type AccountsClientListBySubscriptionResponse ¶
type AccountsClientListBySubscriptionResponse struct { // The response of a Account list operation. AccountListResult }
AccountsClientListBySubscriptionResponse contains the response from method AccountsClient.NewListBySubscriptionPager.
type AccountsClientUpdateOptions ¶
type AccountsClientUpdateOptions struct { }
AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method.
type AccountsClientUpdateResponse ¶
type AccountsClientUpdateResponse struct { // An account resource Account }
AccountsClientUpdateResponse contains the response from method AccountsClient.Update.
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAccountsClient ¶
func (c *ClientFactory) NewAccountsClient() *AccountsClient
NewAccountsClient creates a new instance of AccountsClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewQuotasClient ¶
func (c *ClientFactory) NewQuotasClient() *QuotasClient
NewQuotasClient creates a new instance of QuotasClient.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type EnablementStatus ¶
type EnablementStatus string
EnablementStatus - The enablement status of a feature.
const ( // EnablementStatusDisabled - The feature is Disabled. EnablementStatusDisabled EnablementStatus = "Disabled" // EnablementStatusEnabled - The feature is Enabled. EnablementStatusEnabled EnablementStatus = "Enabled" )
func PossibleEnablementStatusValues ¶
func PossibleEnablementStatusValues() []EnablementStatus
PossibleEnablementStatusValues returns the possible values for the EnablementStatus const type.
type FreeTrialProperties ¶
type FreeTrialProperties struct { // READ-ONLY; The playwright account id. AccountID *string // READ-ONLY; The free-trial allocated limit value eg. allocated free minutes. AllocatedValue *int32 // READ-ONLY; The free-trial createdAt utcDateTime. CreatedAt *time.Time // READ-ONLY; The free-trial expiryAt utcDateTime. ExpiryAt *time.Time // READ-ONLY; The free-trial percentage used. PercentageUsed *float64 // READ-ONLY; The free-trial state. State *FreeTrialState // READ-ONLY; The free-trial used value eg. used free minutes. UsedValue *int32 }
FreeTrialProperties - The free-trial properties
func (FreeTrialProperties) MarshalJSON ¶
func (f FreeTrialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FreeTrialProperties.
func (*FreeTrialProperties) UnmarshalJSON ¶
func (f *FreeTrialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FreeTrialProperties.
type FreeTrialState ¶
type FreeTrialState string
FreeTrialState - The free-trial state.
const ( // FreeTrialStateActive - The free-trial is Active. FreeTrialStateActive FreeTrialState = "Active" // FreeTrialStateExpired - The free-trial is Expired. FreeTrialStateExpired FreeTrialState = "Expired" )
func PossibleFreeTrialStateValues ¶
func PossibleFreeTrialStateValues() []FreeTrialState
PossibleFreeTrialStateValues returns the possible values for the FreeTrialState const type.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - List the operations for the provider
Generated from API version 2023-10-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Operations_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/playwrighttesting/armplaywrighttesting" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armplaywrighttesting.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armplaywrighttesting.OperationListResult{ // Value: []*armplaywrighttesting.Operation{ // { // Name: to.Ptr("Microsoft.AzurePlaywrightService/accounts/Write"), // Display: &armplaywrighttesting.OperationDisplay{ // Description: to.Ptr("Set PlaywrightAccounts"), // Operation: to.Ptr("Creates or updates the PlaywrightAccounts"), // Provider: to.Ptr("Microsoft.AzurePlaywrightService"), // Resource: to.Ptr("accounts"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzurePlaywrightService/accounts/Delete"), // Display: &armplaywrighttesting.OperationDisplay{ // Description: to.Ptr("Delete PlaywrightAccounts"), // Operation: to.Ptr("Deletes the PlaywrightAccounts"), // Provider: to.Ptr("Microsoft.AzurePlaywrightService"), // Resource: to.Ptr("accounts"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzurePlaywrightService/accounts/Read"), // Display: &armplaywrighttesting.OperationDisplay{ // Description: to.Ptr("Read PlaywrightAccounts"), // Operation: to.Ptr("Reads the PlaywrightAccounts"), // Provider: to.Ptr("Microsoft.AzurePlaywrightService"), // Resource: to.Ptr("accounts"), // }, // IsDataAction: to.Ptr(false), // }}, // } } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The status of the current operation.
const ( // ProvisioningStateAccepted - Change accepted for processing ProvisioningStateAccepted ProvisioningState = "Accepted" // ProvisioningStateCanceled - Resource creation was canceled. ProvisioningStateCanceled ProvisioningState = "Canceled" // ProvisioningStateDeleting - Deletion in progress ProvisioningStateDeleting ProvisioningState = "Deleting" // ProvisioningStateFailed - Resource creation failed. ProvisioningStateFailed ProvisioningState = "Failed" // ProvisioningStateSucceeded - Resource has been created. ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type Quota ¶
type Quota struct { // The resource-specific properties for this resource. Properties *QuotaProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Quota - A quota resource
func (Quota) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Quota.
func (*Quota) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Quota.
type QuotaListResult ¶
type QuotaListResult struct { // REQUIRED; The Quota items on this page Value []*Quota // The link to the next page of items NextLink *string }
QuotaListResult - The response of a Quota list operation.
func (QuotaListResult) MarshalJSON ¶
func (q QuotaListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QuotaListResult.
func (*QuotaListResult) UnmarshalJSON ¶
func (q *QuotaListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QuotaListResult.
type QuotaNames ¶
type QuotaNames string
const ( // QuotaNamesScalableExecution - The quota details for scalable execution feature. When enabled, Playwright client workers // can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing // test completion durations. QuotaNamesScalableExecution QuotaNames = "ScalableExecution" )
func PossibleQuotaNamesValues ¶
func PossibleQuotaNamesValues() []QuotaNames
PossibleQuotaNamesValues returns the possible values for the QuotaNames const type.
type QuotaProperties ¶
type QuotaProperties struct { // The free-trial quota. FreeTrial *FreeTrialProperties // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState }
QuotaProperties - Quota properties
func (QuotaProperties) MarshalJSON ¶
func (q QuotaProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QuotaProperties.
func (*QuotaProperties) UnmarshalJSON ¶
func (q *QuotaProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QuotaProperties.
type QuotasClient ¶
type QuotasClient struct {
// contains filtered or unexported fields
}
QuotasClient contains the methods for the Quotas group. Don't use this type directly, use NewQuotasClient() instead.
func NewQuotasClient ¶
func NewQuotasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QuotasClient, error)
NewQuotasClient creates a new instance of QuotasClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*QuotasClient) Get ¶
func (client *QuotasClient) Get(ctx context.Context, location string, name QuotaNames, options *QuotasClientGetOptions) (QuotasClientGetResponse, error)
Get - Get quota by name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- location - The location of quota in ARM Normalized format like eastus, southeastasia etc.
- name - The quota name.
- options - QuotasClientGetOptions contains the optional parameters for the QuotasClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/playwrighttesting/armplaywrighttesting" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armplaywrighttesting.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewQuotasClient().Get(ctx, "eastus", armplaywrighttesting.QuotaNamesScalableExecution, 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.Quota = armplaywrighttesting.Quota{ // Name: to.Ptr("ScalableExecution"), // Type: to.Ptr("Microsoft.AzurePlaywrightService/Locations/Quotas"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution"), // Properties: &armplaywrighttesting.QuotaProperties{ // FreeTrial: &armplaywrighttesting.FreeTrialProperties{ // AccountID: to.Ptr("3fa85f64-5717-4562-b3fc-2c963f66afa6"), // AllocatedValue: to.Ptr[int32](0), // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-31T10:19:36.081Z"); return t}()), // ExpiryAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-31T10:19:36.081Z"); return t}()), // PercentageUsed: to.Ptr[float64](100), // State: to.Ptr(armplaywrighttesting.FreeTrialStateActive), // UsedValue: to.Ptr[int32](0), // }, // ProvisioningState: to.Ptr(armplaywrighttesting.ProvisioningStateSucceeded), // }, // } }
Output:
func (*QuotasClient) NewListBySubscriptionPager ¶
func (client *QuotasClient) NewListBySubscriptionPager(location string, options *QuotasClientListBySubscriptionOptions) *runtime.Pager[QuotasClientListBySubscriptionResponse]
NewListBySubscriptionPager - List quotas for a given subscription Id.
Generated from API version 2023-10-01-preview
- location - The location of quota in ARM Normalized format like eastus, southeastasia etc.
- options - QuotasClientListBySubscriptionOptions contains the optional parameters for the QuotasClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/playwrighttesting/armplaywrighttesting" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armplaywrighttesting.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewQuotasClient().NewListBySubscriptionPager("eastus", 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.QuotaListResult = armplaywrighttesting.QuotaListResult{ // Value: []*armplaywrighttesting.Quota{ // { // Name: to.Ptr("ScalableExecution"), // Type: to.Ptr("Microsoft.AzurePlaywrightService/Locations/Quotas"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution"), // Properties: &armplaywrighttesting.QuotaProperties{ // FreeTrial: &armplaywrighttesting.FreeTrialProperties{ // AccountID: to.Ptr("3fa85f64-5717-4562-b3fc-2c963f66afa6"), // AllocatedValue: to.Ptr[int32](0), // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-31T10:19:36.081Z"); return t}()), // ExpiryAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-31T10:19:36.081Z"); return t}()), // PercentageUsed: to.Ptr[float64](100), // State: to.Ptr(armplaywrighttesting.FreeTrialStateActive), // UsedValue: to.Ptr[int32](0), // }, // ProvisioningState: to.Ptr(armplaywrighttesting.ProvisioningStateSucceeded), // }, // }}, // } } }
Output:
type QuotasClientGetOptions ¶
type QuotasClientGetOptions struct { }
QuotasClientGetOptions contains the optional parameters for the QuotasClient.Get method.
type QuotasClientGetResponse ¶
type QuotasClientGetResponse struct { // A quota resource Quota }
QuotasClientGetResponse contains the response from method QuotasClient.Get.
type QuotasClientListBySubscriptionOptions ¶
type QuotasClientListBySubscriptionOptions struct { }
QuotasClientListBySubscriptionOptions contains the optional parameters for the QuotasClient.NewListBySubscriptionPager method.
type QuotasClientListBySubscriptionResponse ¶
type QuotasClientListBySubscriptionResponse struct { // The response of a Quota list operation. QuotaListResult }
QuotasClientListBySubscriptionResponse contains the response from method QuotasClient.NewListBySubscriptionPager.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.