Documentation
¶
Index ¶
- Constants
- Variables
- func CombineRetryOptions(opts ...*policy.RetryOptions) *policy.RetryOptions
- func NewLiveTrafficLogPolicy() policy.Policy
- func NewQueryParameters(queryParameters map[string][]string) map[string]string
- func NewRetryOptions(rtry retry.Value) *policy.RetryOptions
- func NewRetryOptionsForReadAfterCreate() *policy.RetryOptions
- type Client
- type CorrelationIDPolicy
- type MSGraphClient
- func (client *MSGraphClient) Action(ctx context.Context, method string, url string, apiVersion string, ...) (interface{}, error)
- func (client *MSGraphClient) Create(ctx context.Context, url string, apiVersion string, body interface{}, ...) (interface{}, error)
- func (client *MSGraphClient) Delete(ctx context.Context, url string, apiVersion string, options RequestOptions) error
- func (client *MSGraphClient) GraphBaseUrl() string
- func (client *MSGraphClient) List(ctx context.Context, url string, apiVersion string, options RequestOptions) (interface{}, error)
- func (client *MSGraphClient) ListRefIDs(ctx context.Context, url string, apiVersion string, options RequestOptions) ([]string, error)
- func (client *MSGraphClient) Read(ctx context.Context, url string, apiVersion string, options RequestOptions) (interface{}, error)
- func (client *MSGraphClient) Update(ctx context.Context, url string, apiVersion string, body interface{}, ...) (interface{}, error)
- type Option
- type RequestOptions
- type UserAgentPolicy
Constants ¶
View Source
const (
// HeaderCorrelationRequestID is the Azure extension header to set a user-specified correlation request ID.
HeaderCorrelationRequestID = "x-ms-correlation-request-id"
)
View Source
const (
HeaderUserAgent = "User-Agent"
)
Variables ¶
View Source
var DefaultRetryableReadAfterCreateStatusCodes = []int{ http.StatusNotFound, http.StatusForbidden, }
View Source
var DefaultRetryableStatusCodes = []int{ http.StatusRequestTimeout, http.StatusTooManyRequests, http.StatusInternalServerError, http.StatusBadGateway, http.StatusServiceUnavailable, http.StatusGatewayTimeout, }
Functions ¶
func CombineRetryOptions ¶ added in v0.2.0
func CombineRetryOptions(opts ...*policy.RetryOptions) *policy.RetryOptions
CombineRetryOptions combines multiple RequestOptions into a single policy.RetryOptions.
func NewLiveTrafficLogPolicy ¶
func NewQueryParameters ¶ added in v0.2.0
func NewRetryOptions ¶ added in v0.2.0
func NewRetryOptions(rtry retry.Value) *policy.RetryOptions
NewRetryOptions creates a RetryOptions based on the provided retry.RetryValue.
func NewRetryOptionsForReadAfterCreate ¶ added in v0.2.0
func NewRetryOptionsForReadAfterCreate() *policy.RetryOptions
NewRetryOptionsForReadAfterCreate creates a RetryOptions for read-after-create operations.
Types ¶
type Client ¶
type Client struct {
// StopContext is used for propagating control from Terraform Core (e.g. Ctrl/Cmd+C)
StopContext context.Context
MSGraphClient *MSGraphClient
Option *Option
}
type CorrelationIDPolicy ¶
type CorrelationIDPolicy struct {
CorrelationRequestID string
}
type MSGraphClient ¶
type MSGraphClient struct {
// contains filtered or unexported fields
}
func NewMSGraphClient ¶
func NewMSGraphClient(credential azcore.TokenCredential, opt *policy.ClientOptions) (*MSGraphClient, error)
func (*MSGraphClient) Action ¶ added in v0.2.0
func (client *MSGraphClient) Action(ctx context.Context, method string, url string, apiVersion string, body interface{}, options RequestOptions) (interface{}, error)
func (*MSGraphClient) Create ¶
func (client *MSGraphClient) Create(ctx context.Context, url string, apiVersion string, body interface{}, options RequestOptions) (interface{}, error)
func (*MSGraphClient) Delete ¶
func (client *MSGraphClient) Delete(ctx context.Context, url string, apiVersion string, options RequestOptions) error
func (*MSGraphClient) GraphBaseUrl ¶ added in v0.2.0
func (client *MSGraphClient) GraphBaseUrl() string
func (*MSGraphClient) List ¶
func (client *MSGraphClient) List(ctx context.Context, url string, apiVersion string, options RequestOptions) (interface{}, error)
func (*MSGraphClient) ListRefIDs ¶ added in v0.3.0
func (client *MSGraphClient) ListRefIDs(ctx context.Context, url string, apiVersion string, options RequestOptions) ([]string, error)
func (*MSGraphClient) Read ¶
func (client *MSGraphClient) Read(ctx context.Context, url string, apiVersion string, options RequestOptions) (interface{}, error)
func (*MSGraphClient) Update ¶
func (client *MSGraphClient) Update(ctx context.Context, url string, apiVersion string, body interface{}, options RequestOptions) (interface{}, error)
type Option ¶
type Option struct {
Cred azcore.TokenCredential
ApplicationUserAgent string
DisableCorrelationRequestID bool
CloudCfg cloud.Configuration
CustomCorrelationRequestID string
TenantId string
}
type RequestOptions ¶
type RequestOptions struct {
Headers map[string]string
QueryParameters map[string]string
RetryOptions *policy.RetryOptions
}
func DefaultRequestOptions ¶
func DefaultRequestOptions() RequestOptions
func NewRequestOptions ¶
func NewRequestOptions(headers map[string]string, queryParameters map[string][]string) RequestOptions
Click to show internal directories.
Click to hide internal directories.