Documentation ¶
Index ¶
- type ActionType
- type CreatedByType
- type EncryptionProperties
- type EncryptionPropertiesIdentity
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type LoadTestProperties
- type LoadTestResource
- type LoadTestResourcePageList
- type LoadTestResourcePatchRequestBody
- type LoadTestResourcePatchRequestBodyProperties
- type LoadTestsClient
- func (client *LoadTestsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadTestName string, ...) (*armruntime.Poller[LoadTestsClientCreateOrUpdateResponse], error)
- func (client *LoadTestsClient) BeginDelete(ctx context.Context, resourceGroupName string, loadTestName string, ...) (*armruntime.Poller[LoadTestsClientDeleteResponse], error)
- func (client *LoadTestsClient) BeginUpdate(ctx context.Context, resourceGroupName string, loadTestName string, ...) (*armruntime.Poller[LoadTestsClientUpdateResponse], error)
- func (client *LoadTestsClient) Get(ctx context.Context, resourceGroupName string, loadTestName string, ...) (LoadTestsClientGetResponse, error)
- func (client *LoadTestsClient) ListByResourceGroup(resourceGroupName string, options *LoadTestsClientListByResourceGroupOptions) *runtime.Pager[LoadTestsClientListByResourceGroupResponse]
- func (client *LoadTestsClient) ListBySubscription(options *LoadTestsClientListBySubscriptionOptions) *runtime.Pager[LoadTestsClientListBySubscriptionResponse]
- type LoadTestsClientBeginCreateOrUpdateOptions
- type LoadTestsClientBeginDeleteOptions
- type LoadTestsClientBeginUpdateOptions
- type LoadTestsClientCreateOrUpdateResponse
- type LoadTestsClientDeleteResponse
- type LoadTestsClientGetOptions
- type LoadTestsClientGetResponse
- type LoadTestsClientListByResourceGroupOptions
- type LoadTestsClientListByResourceGroupResponse
- type LoadTestsClientListBySubscriptionOptions
- type LoadTestsClientListBySubscriptionResponse
- type LoadTestsClientUpdateResponse
- type ManagedServiceIdentity
- type ManagedServiceIdentityType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type Resource
- type ResourceState
- type SystemData
- type TrackedResource
- type Type
- type UserAssignedIdentity
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 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 EncryptionProperties ¶ added in v0.3.0
type EncryptionProperties struct { // All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. Identity *EncryptionPropertiesIdentity `json:"identity,omitempty"` // key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 // or https://contosovault.vault.azure.net/keys/contosokek. KeyURL *string `json:"keyUrl,omitempty"` }
EncryptionProperties - Key and identity details for Customer Managed Key encryption of load test resource
type EncryptionPropertiesIdentity ¶ added in v0.3.0
type EncryptionPropertiesIdentity struct { // user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/ // /providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId ResourceID *string `json:"resourceId,omitempty"` // Managed identity type to use for accessing encryption key Url Type *Type `json:"type,omitempty"` }
EncryptionPropertiesIdentity - All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info interface{} `json:"info,omitempty" azure:"ro"` // READ-ONLY; The additional info type. Type *string `json:"type,omitempty" azure:"ro"` }
ErrorAdditionalInfo - The resource management error additional info.
type ErrorDetail ¶
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` // READ-ONLY; The error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The error details. Details []*ErrorDetail `json:"details,omitempty" azure:"ro"` // READ-ONLY; The error message. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The error target. Target *string `json:"target,omitempty" azure:"ro"` }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
type ErrorResponse ¶
type ErrorResponse struct { // The error object. Error *ErrorDetail `json:"error,omitempty"` }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
type LoadTestProperties ¶
type LoadTestProperties struct { // Description of the resource. Description *string `json:"description,omitempty"` // CMK Encryption property. Encryption *EncryptionProperties `json:"encryption,omitempty"` // READ-ONLY; Resource data plane URI. DataPlaneURI *string `json:"dataPlaneURI,omitempty" azure:"ro"` // READ-ONLY; Resource provisioning state. ProvisioningState *ResourceState `json:"provisioningState,omitempty" azure:"ro"` }
LoadTestProperties - LoadTest resource properties.
type LoadTestResource ¶
type LoadTestResource struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // The type of identity used for the resource. Identity *ManagedServiceIdentity `json:"identity,omitempty"` // Load Test resource properties Properties *LoadTestProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
LoadTestResource - LoadTest details
func (LoadTestResource) MarshalJSON ¶
func (l LoadTestResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadTestResource.
type LoadTestResourcePageList ¶
type LoadTestResourcePageList struct { // Link to next page of resources. NextLink *string `json:"nextLink,omitempty"` // List of resources in current page. Value []*LoadTestResource `json:"value,omitempty"` }
LoadTestResourcePageList - List of resources page result.
func (LoadTestResourcePageList) MarshalJSON ¶
func (l LoadTestResourcePageList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadTestResourcePageList.
type LoadTestResourcePatchRequestBody ¶
type LoadTestResourcePatchRequestBody struct { // The type of identity used for the resource. Identity *ManagedServiceIdentity `json:"identity,omitempty"` // Load Test resource properties Properties *LoadTestResourcePatchRequestBodyProperties `json:"properties,omitempty"` // Resource tags. Tags interface{} `json:"tags,omitempty"` }
LoadTestResourcePatchRequestBody - LoadTest resource patch request body.
func (LoadTestResourcePatchRequestBody) MarshalJSON ¶
func (l LoadTestResourcePatchRequestBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadTestResourcePatchRequestBody.
type LoadTestResourcePatchRequestBodyProperties ¶
type LoadTestResourcePatchRequestBodyProperties struct { // Description of the resource. Description *string `json:"description,omitempty"` // CMK Encryption property. Encryption *EncryptionProperties `json:"encryption,omitempty"` }
LoadTestResourcePatchRequestBodyProperties - Load Test resource properties
type LoadTestsClient ¶
type LoadTestsClient struct {
// contains filtered or unexported fields
}
LoadTestsClient contains the methods for the LoadTests group. Don't use this type directly, use NewLoadTestsClient() instead.
func NewLoadTestsClient ¶
func NewLoadTestsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadTestsClient, error)
NewLoadTestsClient creates a new instance of LoadTestsClient 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 (*LoadTestsClient) BeginCreateOrUpdate ¶ added in v0.3.0
func (client *LoadTestsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadTestName string, loadTestResource LoadTestResource, options *LoadTestsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[LoadTestsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update LoadTest resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. The name is case insensitive. loadTestName - Load Test name. loadTestResource - LoadTest resource data options - LoadTestsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadTestsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2022-04-15-preview/examples/LoadTests_CreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/loadtestservice/armloadtestservice" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armloadtestservice.NewLoadTestsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<load-test-name>", armloadtestservice.LoadTestResource{ Location: to.Ptr("<location>"), Tags: map[string]*string{ "Team": to.Ptr("Dev Exp"), }, Properties: &armloadtestservice.LoadTestProperties{ Description: to.Ptr("<description>"), Encryption: &armloadtestservice.EncryptionProperties{ Identity: &armloadtestservice.EncryptionPropertiesIdentity{ Type: to.Ptr(armloadtestservice.TypeUserAssigned), ResourceID: to.Ptr("<resource-id>"), }, KeyURL: to.Ptr("<key-url>"), }, }, }, &armloadtestservice.LoadTestsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*LoadTestsClient) BeginDelete ¶
func (client *LoadTestsClient) BeginDelete(ctx context.Context, resourceGroupName string, loadTestName string, options *LoadTestsClientBeginDeleteOptions) (*armruntime.Poller[LoadTestsClientDeleteResponse], error)
BeginDelete - Delete a LoadTest resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. The name is case insensitive. loadTestName - Load Test name. options - LoadTestsClientBeginDeleteOptions contains the optional parameters for the LoadTestsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2022-04-15-preview/examples/LoadTests_Delete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/loadtestservice/armloadtestservice" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armloadtestservice.NewLoadTestsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<load-test-name>", &armloadtestservice.LoadTestsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*LoadTestsClient) BeginUpdate ¶ added in v0.3.0
func (client *LoadTestsClient) BeginUpdate(ctx context.Context, resourceGroupName string, loadTestName string, loadTestResourcePatchRequestBody LoadTestResourcePatchRequestBody, options *LoadTestsClientBeginUpdateOptions) (*armruntime.Poller[LoadTestsClientUpdateResponse], error)
BeginUpdate - Update a loadtest resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. The name is case insensitive. loadTestName - Load Test name. loadTestResourcePatchRequestBody - LoadTest resource update data options - LoadTestsClientBeginUpdateOptions contains the optional parameters for the LoadTestsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2022-04-15-preview/examples/LoadTests_Update.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/loadtestservice/armloadtestservice" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armloadtestservice.NewLoadTestsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<load-test-name>", armloadtestservice.LoadTestResourcePatchRequestBody{ Properties: &armloadtestservice.LoadTestResourcePatchRequestBodyProperties{ Description: to.Ptr("<description>"), Encryption: &armloadtestservice.EncryptionProperties{ Identity: &armloadtestservice.EncryptionPropertiesIdentity{ Type: to.Ptr(armloadtestservice.TypeSystemAssigned), }, KeyURL: to.Ptr("<key-url>"), }, }, Tags: map[string]interface{}{ "Division": "LT", "Team": "Dev Exp", }, }, &armloadtestservice.LoadTestsClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*LoadTestsClient) Get ¶
func (client *LoadTestsClient) Get(ctx context.Context, resourceGroupName string, loadTestName string, options *LoadTestsClientGetOptions) (LoadTestsClientGetResponse, error)
Get - Get a LoadTest resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. The name is case insensitive. loadTestName - Load Test name. options - LoadTestsClientGetOptions contains the optional parameters for the LoadTestsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2022-04-15-preview/examples/LoadTests_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/loadtestservice/armloadtestservice" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armloadtestservice.NewLoadTestsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<load-test-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*LoadTestsClient) ListByResourceGroup ¶
func (client *LoadTestsClient) ListByResourceGroup(resourceGroupName string, options *LoadTestsClientListByResourceGroupOptions) *runtime.Pager[LoadTestsClientListByResourceGroupResponse]
ListByResourceGroup - Lists loadtest resources in a resource group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. The name is case insensitive. options - LoadTestsClientListByResourceGroupOptions contains the optional parameters for the LoadTestsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2022-04-15-preview/examples/LoadTests_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/loadtestservice/armloadtestservice" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armloadtestservice.NewLoadTestsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroup("<resource-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LoadTestsClient) ListBySubscription ¶
func (client *LoadTestsClient) ListBySubscription(options *LoadTestsClientListBySubscriptionOptions) *runtime.Pager[LoadTestsClientListBySubscriptionResponse]
ListBySubscription - Lists loadtests resources in a subscription. If the operation fails it returns an *azcore.ResponseError type. options - LoadTestsClientListBySubscriptionOptions contains the optional parameters for the LoadTestsClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2022-04-15-preview/examples/LoadTests_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/loadtestservice/armloadtestservice" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armloadtestservice.NewLoadTestsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListBySubscription(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type LoadTestsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type LoadTestsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LoadTestsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadTestsClient.BeginCreateOrUpdate method.
type LoadTestsClientBeginDeleteOptions ¶ added in v0.2.0
type LoadTestsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LoadTestsClientBeginDeleteOptions contains the optional parameters for the LoadTestsClient.BeginDelete method.
type LoadTestsClientBeginUpdateOptions ¶ added in v0.3.0
type LoadTestsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LoadTestsClientBeginUpdateOptions contains the optional parameters for the LoadTestsClient.BeginUpdate method.
type LoadTestsClientCreateOrUpdateResponse ¶ added in v0.2.0
type LoadTestsClientCreateOrUpdateResponse struct {
LoadTestResource
}
LoadTestsClientCreateOrUpdateResponse contains the response from method LoadTestsClient.CreateOrUpdate.
type LoadTestsClientDeleteResponse ¶ added in v0.2.0
type LoadTestsClientDeleteResponse struct { }
LoadTestsClientDeleteResponse contains the response from method LoadTestsClient.Delete.
type LoadTestsClientGetOptions ¶ added in v0.2.0
type LoadTestsClientGetOptions struct { }
LoadTestsClientGetOptions contains the optional parameters for the LoadTestsClient.Get method.
type LoadTestsClientGetResponse ¶ added in v0.2.0
type LoadTestsClientGetResponse struct {
LoadTestResource
}
LoadTestsClientGetResponse contains the response from method LoadTestsClient.Get.
type LoadTestsClientListByResourceGroupOptions ¶ added in v0.2.0
type LoadTestsClientListByResourceGroupOptions struct { }
LoadTestsClientListByResourceGroupOptions contains the optional parameters for the LoadTestsClient.ListByResourceGroup method.
type LoadTestsClientListByResourceGroupResponse ¶ added in v0.2.0
type LoadTestsClientListByResourceGroupResponse struct {
LoadTestResourcePageList
}
LoadTestsClientListByResourceGroupResponse contains the response from method LoadTestsClient.ListByResourceGroup.
type LoadTestsClientListBySubscriptionOptions ¶ added in v0.2.0
type LoadTestsClientListBySubscriptionOptions struct { }
LoadTestsClientListBySubscriptionOptions contains the optional parameters for the LoadTestsClient.ListBySubscription method.
type LoadTestsClientListBySubscriptionResponse ¶ added in v0.2.0
type LoadTestsClientListBySubscriptionResponse struct {
LoadTestResourcePageList
}
LoadTestsClientListBySubscriptionResponse contains the response from method LoadTestsClient.ListBySubscription.
type LoadTestsClientUpdateResponse ¶ added in v0.2.0
type LoadTestsClientUpdateResponse struct {
LoadTestResource
}
LoadTestsClientUpdateResponse contains the response from method LoadTestsClient.Update.
type ManagedServiceIdentity ¶ added in v0.3.0
type ManagedServiceIdentity struct { // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Type *ManagedServiceIdentityType `json:"type,omitempty"` // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM // resource ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. // The dictionary values can be empty objects ({}) in // requests. UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned // identity. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)
func (ManagedServiceIdentity) MarshalJSON ¶ added in v0.3.0
func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.
type ManagedServiceIdentityType ¶ added in v0.3.0
type ManagedServiceIdentityType string
ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
const ( ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" )
func PossibleManagedServiceIdentityTypeValues ¶ added in v0.3.0
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType
PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay `json:"display,omitempty"` // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType `json:"actionType,omitempty" azure:"ro"` // 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 `json:"isDataAction,omitempty" azure:"ro"` // 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 `json:"name,omitempty" azure:"ro"` // 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 `json:"origin,omitempty" azure:"ro"` }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string `json:"description,omitempty" azure:"ro"` // 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 `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string `json:"resource,omitempty" azure:"ro"` }
OperationDisplay - Localized display information for this particular operation.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of operations supported by the resource provider Value []*Operation `json:"value,omitempty" azure:"ro"` }
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.
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) List ¶
func (client *OperationsClient) List(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
List - Lists all the available API operations for Load Test Resource. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2022-04-15-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/loadtestservice/armloadtestservice" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armloadtestservice.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
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 Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
type ResourceState ¶
type ResourceState string
ResourceState - Load Test resources provisioning states.
const ( ResourceStateCanceled ResourceState = "Canceled" ResourceStateDeleted ResourceState = "Deleted" ResourceStateFailed ResourceState = "Failed" ResourceStateSucceeded ResourceState = "Succeeded" )
func PossibleResourceStateValues ¶
func PossibleResourceStateValues() []ResourceState
PossibleResourceStateValues returns the possible values for the ResourceState const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
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.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
type Type ¶ added in v0.3.0
type Type string
Type - Managed identity type to use for accessing encryption key Url
func PossibleTypeValues ¶ added in v0.3.0
func PossibleTypeValues() []Type
PossibleTypeValues returns the possible values for the Type const type.
type UserAssignedIdentity ¶ added in v0.3.0
type UserAssignedIdentity struct { // READ-ONLY; The client ID of the assigned identity. ClientID *string `json:"clientId,omitempty" azure:"ro"` // READ-ONLY; The principal ID of the assigned identity. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` }
UserAssignedIdentity - User assigned identity properties