Documentation ¶
Index ¶
- func GetRetryAfter(resp *http.Response) time.Duration
- func IsNotFoundError(err error) bool
- func MakeResourceGroupID(subscription string, resourceGroup string) string
- func MakeResourceGroupScopeARMID(subscription string, resourceGroup string, provider string, params ...string) (string, error)
- func MakeSubscriptionScopeARMID(subscription string, provider string, params ...string) (string, error)
- func NewUserAgentPolicy(userAgent string) policy.Policy
- type CloudError
- type ErrorAdditionalInfo
- type ErrorResponse
- type GenericClient
- func (client *GenericClient) BeginCreateOrUpdateByID(ctx context.Context, resourceID string, apiVersion string, ...) (*PollerResponse, error)
- func (client *GenericClient) DeleteByID(ctx context.Context, resourceID string, apiVersion string) (time.Duration, error)
- func (client *GenericClient) GetByID(ctx context.Context, resourceID string, apiVersion string, ...) (time.Duration, error)
- func (client *GenericClient) HeadByID(ctx context.Context, resourceID string, apiVersion string) (bool, time.Duration, error)
- func (client *GenericClient) SubscriptionID() string
- type PollerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFoundError ¶
func MakeResourceGroupID ¶
MakeResourceGroupID makes an ARM ID representing a resource group. This has the format: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/<rgName> This is "special" because there is no provider at all - but that is what creating/getting a resourceGroup expects.
func MakeResourceGroupScopeARMID ¶
func MakeResourceGroupScopeARMID(subscription string, resourceGroup string, provider string, params ...string) (string, error)
MakeResourceGroupScopeARMID makes an ARM ID at the resource group scope. This has the format: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/<rgName>/providers/<provider>/<resourceType>/<resourceName>/...
func MakeSubscriptionScopeARMID ¶
func MakeSubscriptionScopeARMID(subscription string, provider string, params ...string) (string, error)
MakeSubscriptionScopeARMID makes an ARM ID at the subscription scope. This has the format: /subscriptions/00000000-0000-0000-0000-000000000000/providers/<provider>/<resourceType>/<resourceName>/...
func NewUserAgentPolicy ¶
NewUserAgentPolicy creates a new policy.Policy appending the specified user agent to each request
Types ¶
type CloudError ¶
type CloudError struct { // Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response // format.) InnerError *ErrorResponse `json:"error,omitempty"` // contains filtered or unexported fields }
CloudError - An error response for a resource management request.
func (CloudError) Error ¶
func (e CloudError) Error() string
Error implements the error interface for type CloudError. The contents of the error text are not contractual and subject to change.
func (CloudError) Unwrap ¶
func (e CloudError) Unwrap() error
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info map[string]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 ErrorResponse ¶
type ErrorResponse 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 []*ErrorResponse `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"` }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations.
type GenericClient ¶
type GenericClient struct {
// contains filtered or unexported fields
}
func NewGenericClient ¶
func NewGenericClient(endpoint arm.Endpoint, creds azcore.TokenCredential, subscriptionID string) *GenericClient
NewGenericClient creates a new instance of GenericClient
func NewGenericClientFromHTTPClient ¶
func NewGenericClientFromHTTPClient(endpoint arm.Endpoint, creds azcore.TokenCredential, httpClient *http.Client, subscriptionID string) *GenericClient
NewGenericClientFromHTTPClient creates a new instance of GenericClient from the provided connection.
func (*GenericClient) BeginCreateOrUpdateByID ¶
func (client *GenericClient) BeginCreateOrUpdateByID(ctx context.Context, resourceID string, apiVersion string, resource interface{}) (*PollerResponse, error)
func (*GenericClient) DeleteByID ¶
func (client *GenericClient) DeleteByID(ctx context.Context, resourceID string, apiVersion string) (time.Duration, error)
DeleteByID - Deletes a resource by ID. If the operation fails it returns the *CloudError error type.
func (*GenericClient) GetByID ¶
func (client *GenericClient) GetByID(ctx context.Context, resourceID string, apiVersion string, resource interface{}) (time.Duration, error)
GetByID - Gets a resource by ID. If the operation fails it returns the *CloudError error type.
func (*GenericClient) SubscriptionID ¶
func (client *GenericClient) SubscriptionID() string
SubscriptionID returns the subscription the client is configured for
type PollerResponse ¶
type PollerResponse struct { // Poller contains an initialized poller. Poller *azcore.Poller // ID is the ID of the poller (not the ID of the resource). This is used to prevent another kind of poller from // being resumed with this pollers URL (which would cause deserialization issues and other problems). ID string // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
PollerResponse is the response from issuing a PUT to Azure. It contains a poller (for polling the long-running operation URL) and a RawResponse containing the raw HTTP response.
func (*PollerResponse) Resume ¶
func (l *PollerResponse) Resume(ctx context.Context, client *GenericClient, token string) error
Resume rehydrates a ResourcesCreateOrUpdateByIDPollerResponse from the provided client and resume token.