Documentation ¶
Overview ¶
Package armclient implements the client for ARM.
Index ¶
- func DoDumpRequest(v klog.Level) autorest.SendDecorator
- func DoHackRegionalRetryForGET(c *Client) autorest.SendDecorator
- func GetChildResourceID(subscriptionID, resourceGroupName, resourceType, resourceName, ... string) string
- func GetChildResourcesListID(subscriptionID, resourceGroupName, resourceType, resourceName, ... string) string
- func GetProviderResourceID(subscriptionID, providerNamespace string) string
- func GetProviderResourcesListID(subscriptionID string) string
- func GetResourceID(subscriptionID, resourceGroupName, resourceType, resourceName string) string
- func GetResourceListID(subscriptionID, resourceGroupName, resourceType string) string
- func GetUserAgent(client autorest.Client) string
- func NewErrorCounterSendDecorator(mc *metrics.MetricContext) autorest.SendDecorator
- func NewRateLimitSendDecorater(ratelimiter flowcontrol.RateLimiter, mc *metrics.MetricContext) autorest.SendDecorator
- func NewThrottledSendDecorater(mc *metrics.MetricContext) autorest.SendDecorator
- func NormalizeAzureRegion(name string) string
- func WithMetricsSendDecoratorWrapper(prefix, request, resourceGroup, subscriptionID, source string, ...) autorest.SendDecorator
- type Client
- func (c *Client) CloseResponse(ctx context.Context, response *http.Response)
- func (c *Client) DeleteResource(ctx context.Context, resourceID string, ...) *retry.Error
- func (c *Client) DeleteResourceAsync(ctx context.Context, resourceID string, ...) (*azure.Future, *retry.Error)
- func (c *Client) GetResource(ctx context.Context, resourceID string, ...) (*http.Response, *retry.Error)
- func (c *Client) GetResourceWithExpandAPIVersionQuery(ctx context.Context, resourceID, expand, apiVersion string) (*http.Response, *retry.Error)
- func (c *Client) GetResourceWithExpandQuery(ctx context.Context, resourceID, expand string) (*http.Response, *retry.Error)
- func (c *Client) GetResourceWithQueries(ctx context.Context, resourceID string, queries map[string]interface{}) (*http.Response, *retry.Error)
- func (c *Client) HeadResource(ctx context.Context, resourceID string) (*http.Response, *retry.Error)
- func (c *Client) PatchResource(ctx context.Context, resourceID string, parameters interface{}, ...) (*http.Response, *retry.Error)
- func (c *Client) PatchResourceAsync(ctx context.Context, resourceID string, parameters interface{}, ...) (*azure.Future, *retry.Error)
- func (c *Client) PostResource(ctx context.Context, resourceID, action string, parameters interface{}, ...) (*http.Response, *retry.Error)
- func (c *Client) PrepareDeleteRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
- func (c *Client) PrepareGetRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
- func (c *Client) PrepareHeadRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
- func (c *Client) PreparePatchRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
- func (c *Client) PreparePostRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
- func (c *Client) PreparePutRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
- func (c *Client) PutResource(ctx context.Context, resourceID string, parameters interface{}, ...) (*http.Response, *retry.Error)
- func (c *Client) PutResourceAsync(ctx context.Context, resourceID string, parameters interface{}, ...) (*azure.Future, *retry.Error)
- func (c *Client) PutResourcesInBatches(ctx context.Context, resources map[string]interface{}, batchSize int) map[string]*PutResourcesResponse
- func (c *Client) Send(ctx context.Context, request *http.Request, ...) (*http.Response, *retry.Error)
- func (c *Client) SendAsync(ctx context.Context, request *http.Request) (*azure.Future, *http.Response, *retry.Error)
- func (c *Client) WaitForAsyncOperationCompletion(ctx context.Context, future *azure.Future, asyncOperationName string) error
- func (c *Client) WaitForAsyncOperationResult(ctx context.Context, future *azure.Future, asyncOperationName string) (*http.Response, error)
- type Interface
- type PutResourcesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoDumpRequest ¶ added in v1.24.2
func DoDumpRequest(v klog.Level) autorest.SendDecorator
func DoHackRegionalRetryForGET ¶ added in v1.1.24
func DoHackRegionalRetryForGET(c *Client) autorest.SendDecorator
DoHackRegionalRetryForGET checks if GET request returns empty response and retries regional server or returns error.
func GetChildResourceID ¶
func GetChildResourceID(subscriptionID, resourceGroupName, resourceType, resourceName, childResourceType, childResourceName string) string
GetChildResourceID gets Azure child resource ID
func GetChildResourcesListID ¶
func GetChildResourcesListID(subscriptionID, resourceGroupName, resourceType, resourceName, childResourceType string) string
GetChildResourcesListID gets Azure child resources list ID
func GetProviderResourceID ¶
GetProviderResourceID gets Azure RP resource ID
func GetProviderResourcesListID ¶
GetProviderResourcesListID gets Azure RP resources list ID
func GetResourceID ¶
GetResourceID gets Azure resource ID
func GetResourceListID ¶ added in v1.0.19
GetResourceListID gets Azure resource list ID
func GetUserAgent ¶
GetUserAgent gets the autorest client with a user agent that includes "kubernetes" and the full kubernetes git version string example: Azure-SDK-for-Go/7.0.1 arm-network/2016-09-01; kubernetes-cloudprovider/v1.17.0;
func NewErrorCounterSendDecorator ¶ added in v1.24.2
func NewErrorCounterSendDecorator(mc *metrics.MetricContext) autorest.SendDecorator
func NewRateLimitSendDecorater ¶ added in v1.24.2
func NewRateLimitSendDecorater(ratelimiter flowcontrol.RateLimiter, mc *metrics.MetricContext) autorest.SendDecorator
func NewThrottledSendDecorater ¶ added in v1.24.2
func NewThrottledSendDecorater(mc *metrics.MetricContext) autorest.SendDecorator
func NormalizeAzureRegion ¶
NormalizeAzureRegion returns a normalized Azure region with white spaces removed and converted to lower case
func WithMetricsSendDecoratorWrapper ¶ added in v1.24.2
func WithMetricsSendDecoratorWrapper(prefix, request, resourceGroup, subscriptionID, source string, factory func(mc *metrics.MetricContext) []autorest.SendDecorator) autorest.SendDecorator
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements ARM client Interface.
func New ¶
func New(authorizer autorest.Authorizer, clientConfig azureclients.ClientConfig, baseURI, apiVersion string, sendDecoraters ...autorest.SendDecorator) *Client
New creates a ARM client
func (*Client) CloseResponse ¶
CloseResponse closes a response
func (*Client) DeleteResource ¶
func (c *Client) DeleteResource(ctx context.Context, resourceID string, decorators ...autorest.PrepareDecorator) *retry.Error
DeleteResource deletes a resource by resource ID
func (*Client) DeleteResourceAsync ¶
func (c *Client) DeleteResourceAsync(ctx context.Context, resourceID string, decorators ...autorest.PrepareDecorator) (*azure.Future, *retry.Error)
DeleteResourceAsync delete a resource by resource ID and returns a future representing the async result
func (*Client) GetResource ¶
func (c *Client) GetResource(ctx context.Context, resourceID string, decorators ...autorest.PrepareDecorator) (*http.Response, *retry.Error)
GetResourceWithDecorators get a resource with decorators by resource ID
func (*Client) GetResourceWithExpandAPIVersionQuery ¶ added in v1.0.22
func (c *Client) GetResourceWithExpandAPIVersionQuery(ctx context.Context, resourceID, expand, apiVersion string) (*http.Response, *retry.Error)
GetResourceWithExpandAPIVersionQuery get a resource by resource ID with expand and API version.
func (*Client) GetResourceWithExpandQuery ¶ added in v1.0.18
func (c *Client) GetResourceWithExpandQuery(ctx context.Context, resourceID, expand string) (*http.Response, *retry.Error)
GetResourceWithExpandQuery get a resource by resource ID with expand
func (*Client) GetResourceWithQueries ¶ added in v1.25.0
func (c *Client) GetResourceWithQueries(ctx context.Context, resourceID string, queries map[string]interface{}) (*http.Response, *retry.Error)
GetResourceWithQueries get a resource by resource ID with queries.
func (*Client) HeadResource ¶
func (c *Client) HeadResource(ctx context.Context, resourceID string) (*http.Response, *retry.Error)
HeadResource heads a resource by resource ID
func (*Client) PatchResource ¶
func (c *Client) PatchResource(ctx context.Context, resourceID string, parameters interface{}, decorators ...autorest.PrepareDecorator) (*http.Response, *retry.Error)
PatchResource patches a resource by resource ID
func (*Client) PatchResourceAsync ¶ added in v1.0.16
func (c *Client) PatchResourceAsync(ctx context.Context, resourceID string, parameters interface{}, decorators ...autorest.PrepareDecorator) (*azure.Future, *retry.Error)
PatchResourceAsync patches a resource by resource ID asynchronously
func (*Client) PostResource ¶
func (c *Client) PostResource(ctx context.Context, resourceID, action string, parameters interface{}, queryParameters map[string]interface{}) (*http.Response, *retry.Error)
PostResource posts a resource by resource ID
func (*Client) PrepareDeleteRequest ¶
func (c *Client) PrepareDeleteRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
PrepareDeleteRequest preparse delete request
func (*Client) PrepareGetRequest ¶
func (c *Client) PrepareGetRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
PrepareGetRequest prepares get request
func (*Client) PrepareHeadRequest ¶
func (c *Client) PrepareHeadRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
PrepareHeadRequest prepares head request
func (*Client) PreparePatchRequest ¶
func (c *Client) PreparePatchRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
PreparePatchRequest prepares patch request
func (*Client) PreparePostRequest ¶
func (c *Client) PreparePostRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
PreparePostRequest prepares post request
func (*Client) PreparePutRequest ¶
func (c *Client) PreparePutRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
PreparePutRequest prepares put request
func (*Client) PutResource ¶
func (c *Client) PutResource(ctx context.Context, resourceID string, parameters interface{}, decorators ...autorest.PrepareDecorator) (*http.Response, *retry.Error)
PutResource puts a resource by resource ID
func (*Client) PutResourceAsync ¶
func (c *Client) PutResourceAsync(ctx context.Context, resourceID string, parameters interface{}, decorators ...autorest.PrepareDecorator) (*azure.Future, *retry.Error)
PutResourceAsync puts a resource by resource ID in async mode
func (*Client) PutResourcesInBatches ¶ added in v1.0.8
func (c *Client) PutResourcesInBatches(ctx context.Context, resources map[string]interface{}, batchSize int) map[string]*PutResourcesResponse
PutResourcesInBatches is similar with PutResources, but it sends sync request concurrently in batches.
func (*Client) Send ¶
func (c *Client) Send(ctx context.Context, request *http.Request, decorators ...autorest.SendDecorator) (*http.Response, *retry.Error)
Send sends a http request to ARM service with possible retry to regional ARM endpoint.
func (*Client) SendAsync ¶
func (c *Client) SendAsync(ctx context.Context, request *http.Request) (*azure.Future, *http.Response, *retry.Error)
SendAsync send a request and return a future object representing the async result as well as the origin http response
type Interface ¶
type Interface interface { // Send sends a http request to ARM service with possible retry to regional ARM endpoint. Send(ctx context.Context, request *http.Request, decorators ...autorest.SendDecorator) (*http.Response, *retry.Error) // PreparePutRequest prepares put request PreparePutRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error) // PreparePostRequest prepares post request PreparePostRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error) // PrepareGetRequest prepares get request PrepareGetRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error) // PrepareDeleteRequest preparse delete request PrepareDeleteRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error) // PrepareHeadRequest prepares head request PrepareHeadRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error) // WaitForAsyncOperationCompletion waits for an operation completion WaitForAsyncOperationCompletion(ctx context.Context, future *azure.Future, asyncOperationName string) error // WaitForAsyncOperationResult waits for an operation result. WaitForAsyncOperationResult(ctx context.Context, future *azure.Future, asyncOperationName string) (*http.Response, error) // SendAsync send a request and return a future object representing the async result as well as the origin http response SendAsync(ctx context.Context, request *http.Request) (*azure.Future, *http.Response, *retry.Error) // PutResource puts a resource by resource ID PutResource(ctx context.Context, resourceID string, parameters interface{}, decorators ...autorest.PrepareDecorator) (*http.Response, *retry.Error) // PutResourceAsync puts a resource by resource ID in async mode PutResourceAsync(ctx context.Context, resourceID string, parameters interface{}, decorators ...autorest.PrepareDecorator) (*azure.Future, *retry.Error) // PutResourcesInBatches is similar with PutResources, but it sends sync request concurrently in batches. PutResourcesInBatches(ctx context.Context, resources map[string]interface{}, batchSize int) map[string]*PutResourcesResponse // PatchResource patches a resource by resource ID PatchResource(ctx context.Context, resourceID string, parameters interface{}, decorators ...autorest.PrepareDecorator) (*http.Response, *retry.Error) // PatchResourceAsync patches a resource by resource ID asynchronously PatchResourceAsync(ctx context.Context, resourceID string, parameters interface{}, decorators ...autorest.PrepareDecorator) (*azure.Future, *retry.Error) // HeadResource heads a resource by resource ID HeadResource(ctx context.Context, resourceID string) (*http.Response, *retry.Error) // GetResourceWithExpandQuery get a resource by resource ID with expand GetResourceWithExpandQuery(ctx context.Context, resourceID, expand string) (*http.Response, *retry.Error) // GetResourceWithExpandAPIVersionQuery get a resource by resource ID with expand and API version. GetResourceWithExpandAPIVersionQuery(ctx context.Context, resourceID, expand, apiVersion string) (*http.Response, *retry.Error) // GetResourceWithQueries get a resource by resource ID with queries. GetResourceWithQueries(ctx context.Context, resourceID string, queries map[string]interface{}) (*http.Response, *retry.Error) // GetResource get a resource with decorators by resource ID GetResource(ctx context.Context, resourceID string, decorators ...autorest.PrepareDecorator) (*http.Response, *retry.Error) // PostResource posts a resource by resource ID PostResource(ctx context.Context, resourceID, action string, parameters interface{}, queryParameters map[string]interface{}) (*http.Response, *retry.Error) // DeleteResource deletes a resource by resource ID DeleteResource(ctx context.Context, resourceID string, decorators ...autorest.PrepareDecorator) *retry.Error // DeleteResourceAsync delete a resource by resource ID and returns a future representing the async result DeleteResourceAsync(ctx context.Context, resourceID string, decorators ...autorest.PrepareDecorator) (*azure.Future, *retry.Error) // CloseResponse closes a response CloseResponse(ctx context.Context, response *http.Response) }
Interface is the client interface for ARM. Don't forget to run "hack/update-mock-clients.sh" command to generate the mock client.
Directories ¶
Path | Synopsis |
---|---|
Package mockarmclient implements the mock client for ARM.
|
Package mockarmclient implements the mock client for ARM. |