Documentation ¶
Index ¶
- type AccountPatchResource
- type AccountResource
- type AccountResourceList
- type AccountResourceProperties
- type AccountResourceSystemData
- type AccountsClient
- func (client *AccountsClient) BeginCreateAndUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[AccountsClientCreateAndUpdateResponse], error)
- func (client *AccountsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, ...) (AccountsClientDeleteResponse, error)
- func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, resourceName 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, resourceName string, ...) (AccountsClientUpdateResponse, error)
- type AccountsClientBeginCreateAndUpdateOptions
- type AccountsClientCreateAndUpdateResponse
- type AccountsClientDeleteOptions
- 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 Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type ProvisioningState
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountPatchResource ¶
type AccountPatchResource struct { // List of key value pairs that describe the resource. This will overwrite the existing tags. Tags map[string]*string }
AccountPatchResource - Account patch properties
func (AccountPatchResource) MarshalJSON ¶
func (a AccountPatchResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountPatchResource.
func (*AccountPatchResource) UnmarshalJSON ¶
func (a *AccountPatchResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountPatchResource.
type AccountResource ¶
type AccountResource struct { // REQUIRED; Property bag from billing account Properties *AccountResourceProperties // Location of the resource. Location *string // resource tags. Tags map[string]*string // READ-ONLY; Azure resource ID. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *AccountResourceSystemData // READ-ONLY; Azure resource type. Type *string }
AccountResource - Account details
func (AccountResource) MarshalJSON ¶
func (a AccountResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountResource.
func (*AccountResource) UnmarshalJSON ¶
func (a *AccountResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountResource.
type AccountResourceList ¶
type AccountResourceList struct { // The link to the next page of items NextLink *string // The list of recommendations. Value []*AccountResource }
AccountResourceList - The list of accounts.
func (AccountResourceList) MarshalJSON ¶
func (a AccountResourceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountResourceList.
func (*AccountResourceList) UnmarshalJSON ¶
func (a *AccountResourceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountResourceList.
type AccountResourceProperties ¶
type AccountResourceProperties struct { // REQUIRED; Customer owned application ID AppID *string // READ-ONLY; Billing Plan Id BillingPlanID *string // READ-ONLY; Provisioning state. ProvisioningState *ProvisioningState }
AccountResourceProperties - Property bag from billing account
func (AccountResourceProperties) MarshalJSON ¶
func (a AccountResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountResourceProperties.
func (*AccountResourceProperties) UnmarshalJSON ¶
func (a *AccountResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountResourceProperties.
type AccountResourceSystemData ¶
type AccountResourceSystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
AccountResourceSystemData - Metadata pertaining to creation and last modification of the resource.
func (AccountResourceSystemData) MarshalJSON ¶
func (a AccountResourceSystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountResourceSystemData.
func (*AccountResourceSystemData) UnmarshalJSON ¶
func (a *AccountResourceSystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountResourceSystemData.
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) BeginCreateAndUpdate ¶ added in v1.0.0
func (client *AccountsClient) BeginCreateAndUpdate(ctx context.Context, resourceGroupName string, resourceName string, accountResource AccountResource, options *AccountsClientBeginCreateAndUpdateOptions) (*runtime.Poller[AccountsClientCreateAndUpdateResponse], error)
BeginCreateAndUpdate - Create or update account resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-13
- resourceGroupName - The name of the resource group. The name is case insensitive.
- resourceName - The name of the resource.
- accountResource - Account details.
- options - AccountsClientBeginCreateAndUpdateOptions contains the optional parameters for the AccountsClient.BeginCreateAndUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Accounts_Create.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/graphservices/armgraphservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armgraphservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreateAndUpdate(ctx, "testResourceGroupGRAM", "11111111-aaaa-1111-bbbb-1111111111111", armgraphservices.AccountResource{ Properties: &armgraphservices.AccountResourceProperties{ AppID: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), }, }, 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.AccountResource = armgraphservices.AccountResource{ // Name: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // Type: to.Ptr("Microsoft.GraphServices/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testResourceGroupGRAM/providers/Microsoft.GraphServices/accounts/11111111-aaaa-1111-bbbb-111111111111"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armgraphservices.AccountResourceProperties{ // AppID: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // BillingPlanID: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // ProvisioningState: to.Ptr(armgraphservices.ProvisioningStateSucceeded), // }, // } }
Output:
func (*AccountsClient) Delete ¶ added in v1.0.0
func (client *AccountsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *AccountsClientDeleteOptions) (AccountsClientDeleteResponse, error)
Delete - Deletes a account resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-13
- resourceGroupName - The name of the resource group. The name is case insensitive.
- resourceName - The name of the resource.
- options - AccountsClientDeleteOptions contains the optional parameters for the AccountsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/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/graphservices/armgraphservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armgraphservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewAccountsClient().Delete(ctx, "testResourceGroupGRAM", "11111111-aaaa-1111-bbbb-111111111111", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*AccountsClient) Get ¶ added in v1.0.0
func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *AccountsClientGetOptions) (AccountsClientGetResponse, error)
Get - Returns account resource for a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-13
- resourceGroupName - The name of the resource group. The name is case insensitive.
- resourceName - The name of the resource.
- 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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/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/graphservices/armgraphservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armgraphservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Get(ctx, "testResourceGroupGRAM", "11111111-aaaa-1111-bbbb-111111111111", 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.AccountResource = armgraphservices.AccountResource{ // Name: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // Type: to.Ptr("Microsoft.GraphServices/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testResourceGroupGRAM/providers/Microsoft.GraphServices/accounts/11111111-aaaa-1111-bbbb-111111111111"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armgraphservices.AccountResourceProperties{ // AppID: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // ProvisioningState: to.Ptr(armgraphservices.ProvisioningStateSucceeded), // }, // } }
Output:
func (*AccountsClient) NewListByResourceGroupPager ¶
func (client *AccountsClient) NewListByResourceGroupPager(resourceGroupName string, options *AccountsClientListByResourceGroupOptions) *runtime.Pager[AccountsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Returns list of accounts apps.
Generated from API version 2023-04-13
- 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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Accounts_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/graphservices/armgraphservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armgraphservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAccountsClient().NewListByResourceGroupPager("testResourceGroupGRAM", 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.AccountResourceList = armgraphservices.AccountResourceList{ // Value: []*armgraphservices.AccountResource{ // { // Name: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // Type: to.Ptr("Microsoft.GraphServices/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testResourceGroupGRAM/providers/Microsoft.GraphServices/accounts/11111111-aaaa-1111-bbbb-111111111111"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armgraphservices.AccountResourceProperties{ // AppID: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // ProvisioningState: to.Ptr(armgraphservices.ProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*AccountsClient) NewListBySubscriptionPager ¶
func (client *AccountsClient) NewListBySubscriptionPager(options *AccountsClientListBySubscriptionOptions) *runtime.Pager[AccountsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Returns list of accounts belonging to a subscription.
Generated from API version 2023-04-13
- 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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Accounts_List_Sub.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/graphservices/armgraphservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armgraphservices.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.AccountResourceList = armgraphservices.AccountResourceList{ // Value: []*armgraphservices.AccountResource{ // { // Name: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // Type: to.Ptr("Microsoft.GraphServices/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testResourceGroupGRAM/providers/Microsoft.GraphServices/accounts/11111111-aaaa-1111-bbbb-111111111111"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armgraphservices.AccountResourceProperties{ // AppID: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // ProvisioningState: to.Ptr(armgraphservices.ProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*AccountsClient) Update ¶ added in v1.0.0
func (client *AccountsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, accountResource AccountPatchResource, options *AccountsClientUpdateOptions) (AccountsClientUpdateResponse, error)
Update - Update account details. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-13
- resourceGroupName - The name of the resource group. The name is case insensitive.
- resourceName - The name of the resource.
- accountResource - Account patch details.
- 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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/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/graphservices/armgraphservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armgraphservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "testResourceGroupGRAM", "11111111-aaaa-1111-bbbb-111111111111", armgraphservices.AccountPatchResource{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, 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.AccountResource = armgraphservices.AccountResource{ // Name: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // Type: to.Ptr("Microsoft.GraphServices/accounts"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testResourceGroupGRAM/providers/Microsoft.GraphServices/accounts/11111111-aaaa-1111-bbbb-111111111111"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armgraphservices.AccountResourceProperties{ // AppID: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // BillingPlanID: to.Ptr("11111111-aaaa-1111-bbbb-111111111111"), // ProvisioningState: to.Ptr(armgraphservices.ProvisioningStateSucceeded), // }, // } }
Output:
type AccountsClientBeginCreateAndUpdateOptions ¶ added in v1.0.0
type AccountsClientBeginCreateAndUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginCreateAndUpdateOptions contains the optional parameters for the AccountsClient.BeginCreateAndUpdate method.
type AccountsClientCreateAndUpdateResponse ¶ added in v1.0.0
type AccountsClientCreateAndUpdateResponse struct { // Account details AccountResource }
AccountsClientCreateAndUpdateResponse contains the response from method AccountsClient.BeginCreateAndUpdate.
type AccountsClientDeleteOptions ¶ added in v1.0.0
type AccountsClientDeleteOptions struct { }
AccountsClientDeleteOptions contains the optional parameters for the AccountsClient.Delete method.
type AccountsClientDeleteResponse ¶ added in v1.0.0
type AccountsClientDeleteResponse struct { }
AccountsClientDeleteResponse contains the response from method AccountsClient.Delete.
type AccountsClientGetOptions ¶ added in v1.0.0
type AccountsClientGetOptions struct { }
AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.
type AccountsClientGetResponse ¶ added in v1.0.0
type AccountsClientGetResponse struct { // Account details AccountResource }
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 list of accounts. AccountResourceList }
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 list of accounts. AccountResourceList }
AccountsClientListBySubscriptionResponse contains the response from method AccountsClient.NewListBySubscriptionPager.
type AccountsClientUpdateOptions ¶ added in v1.0.0
type AccountsClientUpdateOptions struct { }
AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method.
type AccountsClientUpdateResponse ¶ added in v1.0.0
type AccountsClientUpdateResponse struct { // Account details AccountResource }
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 ¶ added in v1.0.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
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 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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Returns list of operations.
Generated from API version 2023-04-13
- 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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/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/graphservices/armgraphservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armgraphservices.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 = armgraphservices.OperationListResult{ // Value: []*armgraphservices.Operation{ // { // Name: to.Ptr("Microsoft.GraphServices/accounts/read"), // Display: &armgraphservices.OperationDisplay{ // Description: to.Ptr("Get Microsoft Graph Services Account resources"), // Operation: to.Ptr("Get Microsoft Graph Services Account resources"), // Provider: to.Ptr("Microsoft Graph Services"), // Resource: to.Ptr("Microsoft Graph Services Account"), // }, // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v1.0.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v1.0.0
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 - Provisioning state.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.