Documentation ¶
Index ¶
- type Action
- type ActionClassification
- type ActionStatus
- type ActionType
- type Branch
- type BranchStatus
- type CapabilitiesClient
- func (client *CapabilitiesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parentProviderNamespace string, ...) (CapabilitiesClientCreateOrUpdateResponse, error)
- func (client *CapabilitiesClient) Delete(ctx context.Context, resourceGroupName string, parentProviderNamespace string, ...) (CapabilitiesClientDeleteResponse, error)
- func (client *CapabilitiesClient) Get(ctx context.Context, resourceGroupName string, parentProviderNamespace string, ...) (CapabilitiesClientGetResponse, error)
- func (client *CapabilitiesClient) List(resourceGroupName string, parentProviderNamespace string, ...) *CapabilitiesClientListPager
- type CapabilitiesClientCreateOrUpdateOptions
- type CapabilitiesClientCreateOrUpdateResponse
- type CapabilitiesClientCreateOrUpdateResult
- type CapabilitiesClientDeleteOptions
- type CapabilitiesClientDeleteResponse
- type CapabilitiesClientGetOptions
- type CapabilitiesClientGetResponse
- type CapabilitiesClientGetResult
- type CapabilitiesClientListOptions
- type CapabilitiesClientListPager
- type CapabilitiesClientListResponse
- type CapabilitiesClientListResult
- type Capability
- type CapabilityListResult
- type CapabilityProperties
- type CapabilityType
- type CapabilityTypeListResult
- type CapabilityTypeProperties
- type CapabilityTypesClient
- type CapabilityTypesClientGetOptions
- type CapabilityTypesClientGetResponse
- type CapabilityTypesClientGetResult
- type CapabilityTypesClientListOptions
- type CapabilityTypesClientListPager
- type CapabilityTypesClientListResponse
- type CapabilityTypesClientListResult
- type ContinuousAction
- type CreatedByType
- type DelayAction
- type DiscreteAction
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type Experiment
- type ExperimentCancelOperationResult
- type ExperimentExecutionActionTargetDetailsError
- type ExperimentExecutionActionTargetDetailsProperties
- type ExperimentExecutionDetails
- type ExperimentExecutionDetailsListResult
- type ExperimentExecutionDetailsProperties
- type ExperimentExecutionDetailsPropertiesRunInformation
- type ExperimentListResult
- type ExperimentProperties
- type ExperimentStartOperationResult
- type ExperimentStatus
- type ExperimentStatusListResult
- type ExperimentStatusProperties
- type ExperimentsClient
- func (client *ExperimentsClient) BeginCancel(ctx context.Context, resourceGroupName string, experimentName string, ...) (ExperimentsClientCancelPollerResponse, error)
- func (client *ExperimentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, experimentName string, ...) (ExperimentsClientCreateOrUpdatePollerResponse, error)
- func (client *ExperimentsClient) Delete(ctx context.Context, resourceGroupName string, experimentName string, ...) (ExperimentsClientDeleteResponse, error)
- func (client *ExperimentsClient) Get(ctx context.Context, resourceGroupName string, experimentName string, ...) (ExperimentsClientGetResponse, error)
- func (client *ExperimentsClient) GetExecutionDetails(ctx context.Context, resourceGroupName string, experimentName string, ...) (ExperimentsClientGetExecutionDetailsResponse, error)
- func (client *ExperimentsClient) GetStatus(ctx context.Context, resourceGroupName string, experimentName string, ...) (ExperimentsClientGetStatusResponse, error)
- func (client *ExperimentsClient) List(resourceGroupName string, options *ExperimentsClientListOptions) *ExperimentsClientListPager
- func (client *ExperimentsClient) ListAll(options *ExperimentsClientListAllOptions) *ExperimentsClientListAllPager
- func (client *ExperimentsClient) ListAllStatuses(resourceGroupName string, experimentName string, ...) *ExperimentsClientListAllStatusesPager
- func (client *ExperimentsClient) ListExecutionDetails(resourceGroupName string, experimentName string, ...) *ExperimentsClientListExecutionDetailsPager
- func (client *ExperimentsClient) Start(ctx context.Context, resourceGroupName string, experimentName string, ...) (ExperimentsClientStartResponse, error)
- type ExperimentsClientBeginCancelOptions
- type ExperimentsClientBeginCreateOrUpdateOptions
- type ExperimentsClientCancelPoller
- func (p *ExperimentsClientCancelPoller) Done() bool
- func (p *ExperimentsClientCancelPoller) FinalResponse(ctx context.Context) (ExperimentsClientCancelResponse, error)
- func (p *ExperimentsClientCancelPoller) Poll(ctx context.Context) (*http.Response, error)
- func (p *ExperimentsClientCancelPoller) ResumeToken() (string, error)
- type ExperimentsClientCancelPollerResponse
- type ExperimentsClientCancelResponse
- type ExperimentsClientCancelResult
- type ExperimentsClientCreateOrUpdatePoller
- func (p *ExperimentsClientCreateOrUpdatePoller) Done() bool
- func (p *ExperimentsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExperimentsClientCreateOrUpdateResponse, error)
- func (p *ExperimentsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error)
- func (p *ExperimentsClientCreateOrUpdatePoller) ResumeToken() (string, error)
- type ExperimentsClientCreateOrUpdatePollerResponse
- type ExperimentsClientCreateOrUpdateResponse
- type ExperimentsClientCreateOrUpdateResult
- type ExperimentsClientDeleteOptions
- type ExperimentsClientDeleteResponse
- type ExperimentsClientGetExecutionDetailsOptions
- type ExperimentsClientGetExecutionDetailsResponse
- type ExperimentsClientGetExecutionDetailsResult
- type ExperimentsClientGetOptions
- type ExperimentsClientGetResponse
- type ExperimentsClientGetResult
- type ExperimentsClientGetStatusOptions
- type ExperimentsClientGetStatusResponse
- type ExperimentsClientGetStatusResult
- type ExperimentsClientListAllOptions
- type ExperimentsClientListAllPager
- type ExperimentsClientListAllResponse
- type ExperimentsClientListAllResult
- type ExperimentsClientListAllStatusesOptions
- type ExperimentsClientListAllStatusesPager
- type ExperimentsClientListAllStatusesResponse
- type ExperimentsClientListAllStatusesResult
- type ExperimentsClientListExecutionDetailsOptions
- type ExperimentsClientListExecutionDetailsPager
- type ExperimentsClientListExecutionDetailsResponse
- type ExperimentsClientListExecutionDetailsResult
- type ExperimentsClientListOptions
- type ExperimentsClientListPager
- type ExperimentsClientListResponse
- type ExperimentsClientListResult
- type ExperimentsClientStartOptions
- type ExperimentsClientStartResponse
- type ExperimentsClientStartResult
- type KeyValuePair
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListAllOptions
- type OperationsClientListAllPager
- type OperationsClientListAllResponse
- type OperationsClientListAllResult
- type Origin
- type Resource
- type ResourceIdentity
- type ResourceIdentityType
- type Selector
- type SelectorType
- type Step
- type StepStatus
- type SystemData
- type Target
- type TargetListResult
- type TargetReference
- type TargetType
- type TargetTypeListResult
- type TargetTypeProperties
- type TargetTypesClient
- type TargetTypesClientGetOptions
- type TargetTypesClientGetResponse
- type TargetTypesClientGetResult
- type TargetTypesClientListOptions
- type TargetTypesClientListPager
- type TargetTypesClientListResponse
- type TargetTypesClientListResult
- type TargetsClient
- func (client *TargetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parentProviderNamespace string, ...) (TargetsClientCreateOrUpdateResponse, error)
- func (client *TargetsClient) Delete(ctx context.Context, resourceGroupName string, parentProviderNamespace string, ...) (TargetsClientDeleteResponse, error)
- func (client *TargetsClient) Get(ctx context.Context, resourceGroupName string, parentProviderNamespace string, ...) (TargetsClientGetResponse, error)
- func (client *TargetsClient) List(resourceGroupName string, parentProviderNamespace string, ...) *TargetsClientListPager
- type TargetsClientCreateOrUpdateOptions
- type TargetsClientCreateOrUpdateResponse
- type TargetsClientCreateOrUpdateResult
- type TargetsClientDeleteOptions
- type TargetsClientDeleteResponse
- type TargetsClientGetOptions
- type TargetsClientGetResponse
- type TargetsClientGetResult
- type TargetsClientListOptions
- type TargetsClientListPager
- type TargetsClientListResponse
- type TargetsClientListResult
- type TrackedResource
Examples ¶
- CapabilitiesClient.CreateOrUpdate
- CapabilitiesClient.Delete
- CapabilitiesClient.Get
- CapabilitiesClient.List
- CapabilityTypesClient.Get
- CapabilityTypesClient.List
- ExperimentsClient.BeginCancel
- ExperimentsClient.BeginCreateOrUpdate
- ExperimentsClient.Delete
- ExperimentsClient.Get
- ExperimentsClient.GetExecutionDetails
- ExperimentsClient.GetStatus
- ExperimentsClient.List
- ExperimentsClient.ListAll
- ExperimentsClient.ListAllStatuses
- ExperimentsClient.ListExecutionDetails
- ExperimentsClient.Start
- TargetTypesClient.Get
- TargetTypesClient.List
- TargetsClient.CreateOrUpdate
- TargetsClient.Delete
- TargetsClient.Get
- TargetsClient.List
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // REQUIRED; String that represents a Capability URN. Name *string `json:"name,omitempty"` // REQUIRED; Enum that discriminates between action models. Type *string `json:"type,omitempty"` }
Action - Model that represents the base action model.
type ActionClassification ¶
type ActionClassification interface { // GetAction returns the Action content of the underlying type. GetAction() *Action }
ActionClassification provides polymorphic access to related types. Call the interface's GetAction() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *Action, *ContinuousAction, *DelayAction, *DiscreteAction
type ActionStatus ¶
type ActionStatus struct { // READ-ONLY; The id of the action status. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the action status. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the action. Status *string `json:"status,omitempty" azure:"ro"` // READ-ONLY; The array of targets. Targets []*ExperimentExecutionActionTargetDetailsProperties `json:"targets,omitempty" azure:"ro"` }
ActionStatus - Model that represents the an action and its status.
func (ActionStatus) MarshalJSON ¶
func (a ActionStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActionStatus.
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.
func (ActionType) ToPtr ¶
func (c ActionType) ToPtr() *ActionType
ToPtr returns a *ActionType pointing to the current value.
type Branch ¶
type Branch struct { // REQUIRED; List of actions. Actions []ActionClassification `json:"actions,omitempty"` // REQUIRED; String of the branch name. Name *string `json:"name,omitempty"` }
Branch - Model that represents a branch in the step.
func (Branch) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Branch.
func (*Branch) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Branch.
type BranchStatus ¶
type BranchStatus struct { // READ-ONLY; The array of actions. Actions []*ActionStatus `json:"actions,omitempty" azure:"ro"` // READ-ONLY; The id of the branch status. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the branch status. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the branch. Status *string `json:"status,omitempty" azure:"ro"` }
BranchStatus - Model that represents the a list of actions and action statuses.
func (BranchStatus) MarshalJSON ¶
func (b BranchStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BranchStatus.
type CapabilitiesClient ¶
type CapabilitiesClient struct {
// contains filtered or unexported fields
}
CapabilitiesClient contains the methods for the Capabilities group. Don't use this type directly, use NewCapabilitiesClient() instead.
func NewCapabilitiesClient ¶
func NewCapabilitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *CapabilitiesClient
NewCapabilitiesClient creates a new instance of CapabilitiesClient with the specified values. subscriptionID - GUID that represents an Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*CapabilitiesClient) CreateOrUpdate ¶
func (client *CapabilitiesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parentProviderNamespace string, parentResourceType string, parentResourceName string, targetName string, capabilityName string, capability Capability, options *CapabilitiesClientCreateOrUpdateOptions) (CapabilitiesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a Capability resource that extends a Target resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. parentProviderNamespace - String that represents a resource provider namespace. parentResourceType - String that represents a resource type. parentResourceName - String that represents a resource name. targetName - String that represents a Target resource name. capabilityName - String that represents a Capability resource name. capability - Capability resource to be created or updated. options - CapabilitiesClientCreateOrUpdateOptions contains the optional parameters for the CapabilitiesClient.CreateOrUpdate method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/CreateOrUpdateACapability.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewCapabilitiesClient("<subscription-id>", cred, nil) res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<parent-provider-namespace>", "<parent-resource-type>", "<parent-resource-name>", "<target-name>", "<capability-name>", armchaos.Capability{ Properties: &armchaos.CapabilityProperties{}, }, nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.CapabilitiesClientCreateOrUpdateResult) }
Output:
func (*CapabilitiesClient) Delete ¶
func (client *CapabilitiesClient) Delete(ctx context.Context, resourceGroupName string, parentProviderNamespace string, parentResourceType string, parentResourceName string, targetName string, capabilityName string, options *CapabilitiesClientDeleteOptions) (CapabilitiesClientDeleteResponse, error)
Delete - Delete a Capability that extends a Target resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. parentProviderNamespace - String that represents a resource provider namespace. parentResourceType - String that represents a resource type. parentResourceName - String that represents a resource name. targetName - String that represents a Target resource name. capabilityName - String that represents a Capability resource name. options - CapabilitiesClientDeleteOptions contains the optional parameters for the CapabilitiesClient.Delete method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/DeleteACapability.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewCapabilitiesClient("<subscription-id>", cred, nil) _, err = client.Delete(ctx, "<resource-group-name>", "<parent-provider-namespace>", "<parent-resource-type>", "<parent-resource-name>", "<target-name>", "<capability-name>", nil) if err != nil { log.Fatal(err) } }
Output:
func (*CapabilitiesClient) Get ¶
func (client *CapabilitiesClient) Get(ctx context.Context, resourceGroupName string, parentProviderNamespace string, parentResourceType string, parentResourceName string, targetName string, capabilityName string, options *CapabilitiesClientGetOptions) (CapabilitiesClientGetResponse, error)
Get - Get a Capability resource that extends a Target resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. parentProviderNamespace - String that represents a resource provider namespace. parentResourceType - String that represents a resource type. parentResourceName - String that represents a resource name. targetName - String that represents a Target resource name. capabilityName - String that represents a Capability resource name. options - CapabilitiesClientGetOptions contains the optional parameters for the CapabilitiesClient.Get method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetACapability.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewCapabilitiesClient("<subscription-id>", cred, nil) res, err := client.Get(ctx, "<resource-group-name>", "<parent-provider-namespace>", "<parent-resource-type>", "<parent-resource-name>", "<target-name>", "<capability-name>", nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.CapabilitiesClientGetResult) }
Output:
func (*CapabilitiesClient) List ¶
func (client *CapabilitiesClient) List(resourceGroupName string, parentProviderNamespace string, parentResourceType string, parentResourceName string, targetName string, options *CapabilitiesClientListOptions) *CapabilitiesClientListPager
List - Get a list of Capability resources that extend a Target resource.. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. parentProviderNamespace - String that represents a resource provider namespace. parentResourceType - String that represents a resource type. parentResourceName - String that represents a resource name. targetName - String that represents a Target resource name. options - CapabilitiesClientListOptions contains the optional parameters for the CapabilitiesClient.List method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListCapabilities.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewCapabilitiesClient("<subscription-id>", cred, nil) pager := client.List("<resource-group-name>", "<parent-provider-namespace>", "<parent-resource-type>", "<parent-resource-name>", "<target-name>", &armchaos.CapabilitiesClientListOptions{ContinuationToken: nil}) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
type CapabilitiesClientCreateOrUpdateOptions ¶ added in v0.2.0
type CapabilitiesClientCreateOrUpdateOptions struct { }
CapabilitiesClientCreateOrUpdateOptions contains the optional parameters for the CapabilitiesClient.CreateOrUpdate method.
type CapabilitiesClientCreateOrUpdateResponse ¶ added in v0.2.0
type CapabilitiesClientCreateOrUpdateResponse struct { CapabilitiesClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
CapabilitiesClientCreateOrUpdateResponse contains the response from method CapabilitiesClient.CreateOrUpdate.
type CapabilitiesClientCreateOrUpdateResult ¶ added in v0.2.0
type CapabilitiesClientCreateOrUpdateResult struct {
Capability
}
CapabilitiesClientCreateOrUpdateResult contains the result from method CapabilitiesClient.CreateOrUpdate.
type CapabilitiesClientDeleteOptions ¶ added in v0.2.0
type CapabilitiesClientDeleteOptions struct { }
CapabilitiesClientDeleteOptions contains the optional parameters for the CapabilitiesClient.Delete method.
type CapabilitiesClientDeleteResponse ¶ added in v0.2.0
type CapabilitiesClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
CapabilitiesClientDeleteResponse contains the response from method CapabilitiesClient.Delete.
type CapabilitiesClientGetOptions ¶ added in v0.2.0
type CapabilitiesClientGetOptions struct { }
CapabilitiesClientGetOptions contains the optional parameters for the CapabilitiesClient.Get method.
type CapabilitiesClientGetResponse ¶ added in v0.2.0
type CapabilitiesClientGetResponse struct { CapabilitiesClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
CapabilitiesClientGetResponse contains the response from method CapabilitiesClient.Get.
type CapabilitiesClientGetResult ¶ added in v0.2.0
type CapabilitiesClientGetResult struct {
Capability
}
CapabilitiesClientGetResult contains the result from method CapabilitiesClient.Get.
type CapabilitiesClientListOptions ¶ added in v0.2.0
type CapabilitiesClientListOptions struct { // String that sets the continuation token. ContinuationToken *string }
CapabilitiesClientListOptions contains the optional parameters for the CapabilitiesClient.List method.
type CapabilitiesClientListPager ¶ added in v0.2.0
type CapabilitiesClientListPager struct {
// contains filtered or unexported fields
}
CapabilitiesClientListPager provides operations for iterating over paged responses.
func (*CapabilitiesClientListPager) Err ¶ added in v0.2.0
func (p *CapabilitiesClientListPager) Err() error
Err returns the last error encountered while paging.
func (*CapabilitiesClientListPager) NextPage ¶ added in v0.2.0
func (p *CapabilitiesClientListPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*CapabilitiesClientListPager) PageResponse ¶ added in v0.2.0
func (p *CapabilitiesClientListPager) PageResponse() CapabilitiesClientListResponse
PageResponse returns the current CapabilitiesClientListResponse page.
type CapabilitiesClientListResponse ¶ added in v0.2.0
type CapabilitiesClientListResponse struct { CapabilitiesClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
CapabilitiesClientListResponse contains the response from method CapabilitiesClient.List.
type CapabilitiesClientListResult ¶ added in v0.2.0
type CapabilitiesClientListResult struct {
CapabilityListResult
}
CapabilitiesClientListResult contains the result from method CapabilitiesClient.List.
type Capability ¶
type Capability 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; The properties of a capability resource. Properties *CapabilityProperties `json:"properties,omitempty" azure:"ro"` // READ-ONLY; The standard system metadata of a resource type. 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"` }
Capability - Model that represents a Capability resource.
type CapabilityListResult ¶
type CapabilityListResult struct { // READ-ONLY; URL to retrieve the next page of Capability resources. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of Capability resources. Value []*Capability `json:"value,omitempty" azure:"ro"` }
CapabilityListResult - Model that represents a list of Capability resources and a link for pagination.
func (CapabilityListResult) MarshalJSON ¶
func (c CapabilityListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CapabilityListResult.
type CapabilityProperties ¶
type CapabilityProperties struct { // READ-ONLY; Localized string of the description. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; URL to retrieve JSON schema of the Capability parameters. ParametersSchema *string `json:"parametersSchema,omitempty" azure:"ro"` // READ-ONLY; String of the Publisher that this Capability extends. Publisher *string `json:"publisher,omitempty" azure:"ro"` // READ-ONLY; String of the Target Type that this Capability extends. TargetType *string `json:"targetType,omitempty" azure:"ro"` // READ-ONLY; String of the URN for this Capability Type. Urn *string `json:"urn,omitempty" azure:"ro"` }
CapabilityProperties - Model that represents the Capability properties model.
type CapabilityType ¶
type CapabilityType struct { // Location of the Capability Type resource. Location *string `json:"location,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; The properties of the capability type resource. Properties *CapabilityTypeProperties `json:"properties,omitempty" azure:"ro"` // READ-ONLY; The system metadata properties of the capability type resource. 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"` }
CapabilityType - Model that represents a Capability Type resource.
type CapabilityTypeListResult ¶
type CapabilityTypeListResult struct { // READ-ONLY; URL to retrieve the next page of Capability Type resources. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of Capability Type resources. Value []*CapabilityType `json:"value,omitempty" azure:"ro"` }
CapabilityTypeListResult - Model that represents a list of Capability Type resources and a link for pagination.
func (CapabilityTypeListResult) MarshalJSON ¶
func (c CapabilityTypeListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CapabilityTypeListResult.
type CapabilityTypeProperties ¶
type CapabilityTypeProperties struct { // READ-ONLY; Localized string of the description. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; Localized string of the display name. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; URL to retrieve JSON schema of the Capability Type parameters. ParametersSchema *string `json:"parametersSchema,omitempty" azure:"ro"` // READ-ONLY; String of the Publisher that this Capability Type extends. Publisher *string `json:"publisher,omitempty" azure:"ro"` // READ-ONLY; String of the Target Type that this Capability Type extends. TargetType *string `json:"targetType,omitempty" azure:"ro"` // READ-ONLY; String of the URN for this Capability Type. Urn *string `json:"urn,omitempty" azure:"ro"` }
CapabilityTypeProperties - Model that represents the Capability Type properties model.
type CapabilityTypesClient ¶
type CapabilityTypesClient struct {
// contains filtered or unexported fields
}
CapabilityTypesClient contains the methods for the CapabilityTypes group. Don't use this type directly, use NewCapabilityTypesClient() instead.
func NewCapabilityTypesClient ¶
func NewCapabilityTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *CapabilityTypesClient
NewCapabilityTypesClient creates a new instance of CapabilityTypesClient with the specified values. subscriptionID - GUID that represents an Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*CapabilityTypesClient) Get ¶
func (client *CapabilityTypesClient) Get(ctx context.Context, locationName string, targetTypeName string, capabilityTypeName string, options *CapabilityTypesClientGetOptions) (CapabilityTypesClientGetResponse, error)
Get - Get a Capability Type resource for given Target Type and location. If the operation fails it returns an *azcore.ResponseError type. locationName - String that represents a Location resource name. targetTypeName - String that represents a Target Type resource name. capabilityTypeName - String that represents a Capability Type resource name. options - CapabilityTypesClientGetOptions contains the optional parameters for the CapabilityTypesClient.Get method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetACapabilityType.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewCapabilityTypesClient("<subscription-id>", cred, nil) res, err := client.Get(ctx, "<location-name>", "<target-type-name>", "<capability-type-name>", nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.CapabilityTypesClientGetResult) }
Output:
func (*CapabilityTypesClient) List ¶
func (client *CapabilityTypesClient) List(locationName string, targetTypeName string, options *CapabilityTypesClientListOptions) *CapabilityTypesClientListPager
List - Get a list of Capability Type resources for given Target Type and location. If the operation fails it returns an *azcore.ResponseError type. locationName - String that represents a Location resource name. targetTypeName - String that represents a Target Type resource name. options - CapabilityTypesClientListOptions contains the optional parameters for the CapabilityTypesClient.List method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListCapabilityTypes.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewCapabilityTypesClient("<subscription-id>", cred, nil) pager := client.List("<location-name>", "<target-type-name>", &armchaos.CapabilityTypesClientListOptions{ContinuationToken: nil}) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
type CapabilityTypesClientGetOptions ¶ added in v0.2.0
type CapabilityTypesClientGetOptions struct { }
CapabilityTypesClientGetOptions contains the optional parameters for the CapabilityTypesClient.Get method.
type CapabilityTypesClientGetResponse ¶ added in v0.2.0
type CapabilityTypesClientGetResponse struct { CapabilityTypesClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
CapabilityTypesClientGetResponse contains the response from method CapabilityTypesClient.Get.
type CapabilityTypesClientGetResult ¶ added in v0.2.0
type CapabilityTypesClientGetResult struct {
CapabilityType
}
CapabilityTypesClientGetResult contains the result from method CapabilityTypesClient.Get.
type CapabilityTypesClientListOptions ¶ added in v0.2.0
type CapabilityTypesClientListOptions struct { // String that sets the continuation token. ContinuationToken *string }
CapabilityTypesClientListOptions contains the optional parameters for the CapabilityTypesClient.List method.
type CapabilityTypesClientListPager ¶ added in v0.2.0
type CapabilityTypesClientListPager struct {
// contains filtered or unexported fields
}
CapabilityTypesClientListPager provides operations for iterating over paged responses.
func (*CapabilityTypesClientListPager) Err ¶ added in v0.2.0
func (p *CapabilityTypesClientListPager) Err() error
Err returns the last error encountered while paging.
func (*CapabilityTypesClientListPager) NextPage ¶ added in v0.2.0
func (p *CapabilityTypesClientListPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*CapabilityTypesClientListPager) PageResponse ¶ added in v0.2.0
func (p *CapabilityTypesClientListPager) PageResponse() CapabilityTypesClientListResponse
PageResponse returns the current CapabilityTypesClientListResponse page.
type CapabilityTypesClientListResponse ¶ added in v0.2.0
type CapabilityTypesClientListResponse struct { CapabilityTypesClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
CapabilityTypesClientListResponse contains the response from method CapabilityTypesClient.List.
type CapabilityTypesClientListResult ¶ added in v0.2.0
type CapabilityTypesClientListResult struct {
CapabilityTypeListResult
}
CapabilityTypesClientListResult contains the result from method CapabilityTypesClient.List.
type ContinuousAction ¶ added in v0.2.0
type ContinuousAction struct { // REQUIRED; ISO8601 formatted string that represents a duration. Duration *string `json:"duration,omitempty"` // REQUIRED; String that represents a Capability URN. Name *string `json:"name,omitempty"` // REQUIRED; List of key value pairs. Parameters []*KeyValuePair `json:"parameters,omitempty"` // REQUIRED; String that represents a selector. SelectorID *string `json:"selectorId,omitempty"` // REQUIRED; Enum that discriminates between action models. Type *string `json:"type,omitempty"` }
ContinuousAction - Model that represents a continuous action.
func (*ContinuousAction) GetAction ¶ added in v0.2.0
func (c *ContinuousAction) GetAction() *Action
GetAction implements the ActionClassification interface for type ContinuousAction.
func (ContinuousAction) MarshalJSON ¶ added in v0.2.0
func (c ContinuousAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContinuousAction.
func (*ContinuousAction) UnmarshalJSON ¶ added in v0.2.0
func (c *ContinuousAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousAction.
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.
func (CreatedByType) ToPtr ¶
func (c CreatedByType) ToPtr() *CreatedByType
ToPtr returns a *CreatedByType pointing to the current value.
type DelayAction ¶ added in v0.2.0
type DelayAction struct { // REQUIRED; ISO8601 formatted string that represents a duration. Duration *string `json:"duration,omitempty"` // REQUIRED; String that represents a Capability URN. Name *string `json:"name,omitempty"` // REQUIRED; Enum that discriminates between action models. Type *string `json:"type,omitempty"` }
DelayAction - Model that represents a delay action.
func (*DelayAction) GetAction ¶ added in v0.2.0
func (d *DelayAction) GetAction() *Action
GetAction implements the ActionClassification interface for type DelayAction.
func (DelayAction) MarshalJSON ¶ added in v0.2.0
func (d DelayAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DelayAction.
func (*DelayAction) UnmarshalJSON ¶ added in v0.2.0
func (d *DelayAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DelayAction.
type DiscreteAction ¶ added in v0.2.0
type DiscreteAction struct { // REQUIRED; String that represents a Capability URN. Name *string `json:"name,omitempty"` // REQUIRED; List of key value pairs. Parameters []*KeyValuePair `json:"parameters,omitempty"` // REQUIRED; String that represents a selector. SelectorID *string `json:"selectorId,omitempty"` // REQUIRED; Enum that discriminates between action models. Type *string `json:"type,omitempty"` }
DiscreteAction - Model that represents a discrete action.
func (*DiscreteAction) GetAction ¶ added in v0.2.0
func (d *DiscreteAction) GetAction() *Action
GetAction implements the ActionClassification interface for type DiscreteAction.
func (DiscreteAction) MarshalJSON ¶ added in v0.2.0
func (d DiscreteAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiscreteAction.
func (*DiscreteAction) UnmarshalJSON ¶ added in v0.2.0
func (d *DiscreteAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiscreteAction.
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 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 Experiment ¶
type Experiment struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // REQUIRED; The properties of the experiment resource. Properties *ExperimentProperties `json:"properties,omitempty"` // The identity of the experiment resource. Identity *ResourceIdentity `json:"identity,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; The system metadata of the experiment resource. 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"` }
Experiment - Model that represents a Experiment resource.
func (Experiment) MarshalJSON ¶
func (e Experiment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Experiment.
type ExperimentCancelOperationResult ¶
type ExperimentCancelOperationResult struct { // READ-ONLY; String of the Experiment name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; URL to retrieve the Experiment status. StatusURL *string `json:"statusUrl,omitempty" azure:"ro"` }
ExperimentCancelOperationResult - Model that represents the result of a cancel Experiment operation.
type ExperimentExecutionActionTargetDetailsError ¶
type ExperimentExecutionActionTargetDetailsError struct { // READ-ONLY; The error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The error message Message *string `json:"message,omitempty" azure:"ro"` }
ExperimentExecutionActionTargetDetailsError - Model that represents the Experiment action target details error model.
type ExperimentExecutionActionTargetDetailsProperties ¶
type ExperimentExecutionActionTargetDetailsProperties struct { // READ-ONLY; String that represents the completed date time. CompletedDateUTC *time.Time `json:"completedDateUtc,omitempty" azure:"ro"` // READ-ONLY; The error of the action. Error *ExperimentExecutionActionTargetDetailsError `json:"error,omitempty" azure:"ro"` // READ-ONLY; String that represents the failed date time. FailedDateUTC *time.Time `json:"failedDateUtc,omitempty" azure:"ro"` // READ-ONLY; The status of the execution. Status *string `json:"status,omitempty" azure:"ro"` // READ-ONLY; The target for the action. Target *string `json:"target,omitempty" azure:"ro"` }
ExperimentExecutionActionTargetDetailsProperties - Model that represents the Experiment action target details properties model.
func (ExperimentExecutionActionTargetDetailsProperties) MarshalJSON ¶
func (e ExperimentExecutionActionTargetDetailsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentExecutionActionTargetDetailsProperties.
func (*ExperimentExecutionActionTargetDetailsProperties) UnmarshalJSON ¶
func (e *ExperimentExecutionActionTargetDetailsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExperimentExecutionActionTargetDetailsProperties.
type ExperimentExecutionDetails ¶
type ExperimentExecutionDetails struct { // READ-ONLY; String of the fully qualified resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; String of the resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The properties of the experiment execution details. Properties *ExperimentExecutionDetailsProperties `json:"properties,omitempty" azure:"ro"` // READ-ONLY; String of the resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ExperimentExecutionDetails - Model that represents the execution details of a Experiment.
type ExperimentExecutionDetailsListResult ¶
type ExperimentExecutionDetailsListResult struct { // READ-ONLY; URL to retrieve the next page of Experiment execution details. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of Experiment execution details. Value []*ExperimentExecutionDetails `json:"value,omitempty" azure:"ro"` }
ExperimentExecutionDetailsListResult - Model that represents a list of Experiment execution details and a link for pagination.
func (ExperimentExecutionDetailsListResult) MarshalJSON ¶
func (e ExperimentExecutionDetailsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentExecutionDetailsListResult.
type ExperimentExecutionDetailsProperties ¶
type ExperimentExecutionDetailsProperties struct { // READ-ONLY; String that represents the created date time. CreatedDateUTC *time.Time `json:"createdDateUtc,omitempty" azure:"ro"` // READ-ONLY; The id of the experiment. ExperimentID *string `json:"experimentId,omitempty" azure:"ro"` // READ-ONLY; The reason why the execution failed. FailureReason *string `json:"failureReason,omitempty" azure:"ro"` // READ-ONLY; String that represents the last action date time. LastActionDateUTC *time.Time `json:"lastActionDateUtc,omitempty" azure:"ro"` // READ-ONLY; The information of the experiment run. RunInformation *ExperimentExecutionDetailsPropertiesRunInformation `json:"runInformation,omitempty" azure:"ro"` // READ-ONLY; String that represents the start date time. StartDateUTC *time.Time `json:"startDateUtc,omitempty" azure:"ro"` // READ-ONLY; The value of the status of the experiment execution. Status *string `json:"status,omitempty" azure:"ro"` // READ-ONLY; String that represents the stop date time. StopDateUTC *time.Time `json:"stopDateUtc,omitempty" azure:"ro"` }
ExperimentExecutionDetailsProperties - Model that represents the Experiment execution details properties model.
func (ExperimentExecutionDetailsProperties) MarshalJSON ¶
func (e ExperimentExecutionDetailsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentExecutionDetailsProperties.
func (*ExperimentExecutionDetailsProperties) UnmarshalJSON ¶
func (e *ExperimentExecutionDetailsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExperimentExecutionDetailsProperties.
type ExperimentExecutionDetailsPropertiesRunInformation ¶
type ExperimentExecutionDetailsPropertiesRunInformation struct { // READ-ONLY; The steps of the experiment run. Steps []*StepStatus `json:"steps,omitempty" azure:"ro"` }
ExperimentExecutionDetailsPropertiesRunInformation - The information of the experiment run.
func (ExperimentExecutionDetailsPropertiesRunInformation) MarshalJSON ¶
func (e ExperimentExecutionDetailsPropertiesRunInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentExecutionDetailsPropertiesRunInformation.
type ExperimentListResult ¶
type ExperimentListResult struct { // READ-ONLY; URL to retrieve the next page of Experiment resources. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of Experiment resources. Value []*Experiment `json:"value,omitempty" azure:"ro"` }
ExperimentListResult - Model that represents a list of Experiment resources and a link for pagination.
func (ExperimentListResult) MarshalJSON ¶
func (e ExperimentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentListResult.
type ExperimentProperties ¶
type ExperimentProperties struct { // REQUIRED; List of selectors. Selectors []*Selector `json:"selectors,omitempty"` // REQUIRED; List of steps. Steps []*Step `json:"steps,omitempty"` // A boolean value that indicates if experiment should be started on creation or not. StartOnCreation *bool `json:"startOnCreation,omitempty"` }
ExperimentProperties - Model that represents the Experiment properties model.
func (ExperimentProperties) MarshalJSON ¶
func (e ExperimentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentProperties.
type ExperimentStartOperationResult ¶
type ExperimentStartOperationResult struct { // READ-ONLY; String of the Experiment name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; URL to retrieve the Experiment status. StatusURL *string `json:"statusUrl,omitempty" azure:"ro"` }
ExperimentStartOperationResult - Model that represents the result of a start Experiment operation.
type ExperimentStatus ¶
type ExperimentStatus struct { // The properties of experiment execution status. Properties *ExperimentStatusProperties `json:"properties,omitempty"` // READ-ONLY; String of the fully qualified resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; String of the resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; String of the resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ExperimentStatus - Model that represents the status of a Experiment.
type ExperimentStatusListResult ¶
type ExperimentStatusListResult struct { // READ-ONLY; URL to retrieve the next page of Experiment statuses. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of Experiment statuses. Value []*ExperimentStatus `json:"value,omitempty" azure:"ro"` }
ExperimentStatusListResult - Model that represents a list of Experiment statuses and a link for pagination.
func (ExperimentStatusListResult) MarshalJSON ¶
func (e ExperimentStatusListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentStatusListResult.
type ExperimentStatusProperties ¶
type ExperimentStatusProperties struct { // READ-ONLY; String that represents the created date time of a Experiment. CreatedDateUTC *time.Time `json:"createdDateUtc,omitempty" azure:"ro"` // READ-ONLY; String that represents the end date time of a Experiment. EndDateUTC *time.Time `json:"endDateUtc,omitempty" azure:"ro"` // READ-ONLY; String that represents the status of a Experiment. Status *string `json:"status,omitempty" azure:"ro"` }
ExperimentStatusProperties - Model that represents the Experiment status properties model.
func (ExperimentStatusProperties) MarshalJSON ¶
func (e ExperimentStatusProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentStatusProperties.
func (*ExperimentStatusProperties) UnmarshalJSON ¶
func (e *ExperimentStatusProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExperimentStatusProperties.
type ExperimentsClient ¶
type ExperimentsClient struct {
// contains filtered or unexported fields
}
ExperimentsClient contains the methods for the Experiments group. Don't use this type directly, use NewExperimentsClient() instead.
func NewExperimentsClient ¶
func NewExperimentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExperimentsClient
NewExperimentsClient creates a new instance of ExperimentsClient with the specified values. subscriptionID - GUID that represents an Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ExperimentsClient) BeginCancel ¶
func (client *ExperimentsClient) BeginCancel(ctx context.Context, resourceGroupName string, experimentName string, options *ExperimentsClientBeginCancelOptions) (ExperimentsClientCancelPollerResponse, error)
BeginCancel - Cancel a running Experiment resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. experimentName - String that represents a Experiment resource name. options - ExperimentsClientBeginCancelOptions contains the optional parameters for the ExperimentsClient.BeginCancel method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/CancelAExperiment.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/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) poller, err := client.BeginCancel(ctx, "<resource-group-name>", "<experiment-name>", nil) if err != nil { log.Fatal(err) } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatal(err) } }
Output:
func (*ExperimentsClient) BeginCreateOrUpdate ¶
func (client *ExperimentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, experimentName string, experiment Experiment, options *ExperimentsClientBeginCreateOrUpdateOptions) (ExperimentsClientCreateOrUpdatePollerResponse, error)
BeginCreateOrUpdate - Create or update a Experiment resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. experimentName - String that represents a Experiment resource name. experiment - Experiment resource to be created or updated. options - ExperimentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExperimentsClient.BeginCreateOrUpdate method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/CreateOrUpdateAExperiment.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/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<experiment-name>", armchaos.Experiment{ Location: to.StringPtr("<location>"), Identity: &armchaos.ResourceIdentity{ Type: armchaos.ResourceIdentityTypeSystemAssigned.ToPtr(), }, Properties: &armchaos.ExperimentProperties{ Selectors: []*armchaos.Selector{ { Type: armchaos.SelectorTypeList.ToPtr(), ID: to.StringPtr("<id>"), Targets: []*armchaos.TargetReference{ { Type: to.StringPtr("<type>"), ID: to.StringPtr("<id>"), }}, }}, Steps: []*armchaos.Step{ { Name: to.StringPtr("<name>"), Branches: []*armchaos.Branch{ { Name: to.StringPtr("<name>"), Actions: []armchaos.ActionClassification{ &armchaos.Action{ Name: to.StringPtr("<name>"), Type: to.StringPtr("<type>"), }}, }}, }}, }, }, nil) if err != nil { log.Fatal(err) } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.ExperimentsClientCreateOrUpdateResult) }
Output:
func (*ExperimentsClient) Delete ¶
func (client *ExperimentsClient) Delete(ctx context.Context, resourceGroupName string, experimentName string, options *ExperimentsClientDeleteOptions) (ExperimentsClientDeleteResponse, error)
Delete - Delete a Experiment resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. experimentName - String that represents a Experiment resource name. options - ExperimentsClientDeleteOptions contains the optional parameters for the ExperimentsClient.Delete method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/DeleteAExperiment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) _, err = client.Delete(ctx, "<resource-group-name>", "<experiment-name>", nil) if err != nil { log.Fatal(err) } }
Output:
func (*ExperimentsClient) Get ¶
func (client *ExperimentsClient) Get(ctx context.Context, resourceGroupName string, experimentName string, options *ExperimentsClientGetOptions) (ExperimentsClientGetResponse, error)
Get - Get a Experiment resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. experimentName - String that represents a Experiment resource name. options - ExperimentsClientGetOptions contains the optional parameters for the ExperimentsClient.Get method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetAExperiment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) res, err := client.Get(ctx, "<resource-group-name>", "<experiment-name>", nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.ExperimentsClientGetResult) }
Output:
func (*ExperimentsClient) GetExecutionDetails ¶
func (client *ExperimentsClient) GetExecutionDetails(ctx context.Context, resourceGroupName string, experimentName string, executionDetailsID string, options *ExperimentsClientGetExecutionDetailsOptions) (ExperimentsClientGetExecutionDetailsResponse, error)
GetExecutionDetails - Get an execution detail of a Experiment resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. experimentName - String that represents a Experiment resource name. executionDetailsID - GUID that represents a Experiment execution detail. options - ExperimentsClientGetExecutionDetailsOptions contains the optional parameters for the ExperimentsClient.GetExecutionDetails method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetAExperimentExecutionDetails.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) res, err := client.GetExecutionDetails(ctx, "<resource-group-name>", "<experiment-name>", "<execution-details-id>", nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.ExperimentsClientGetExecutionDetailsResult) }
Output:
func (*ExperimentsClient) GetStatus ¶
func (client *ExperimentsClient) GetStatus(ctx context.Context, resourceGroupName string, experimentName string, statusID string, options *ExperimentsClientGetStatusOptions) (ExperimentsClientGetStatusResponse, error)
GetStatus - Get a status of a Experiment resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. experimentName - String that represents a Experiment resource name. statusID - GUID that represents a Experiment status. options - ExperimentsClientGetStatusOptions contains the optional parameters for the ExperimentsClient.GetStatus method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetAExperimentStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) res, err := client.GetStatus(ctx, "<resource-group-name>", "<experiment-name>", "<status-id>", nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.ExperimentsClientGetStatusResult) }
Output:
func (*ExperimentsClient) List ¶
func (client *ExperimentsClient) List(resourceGroupName string, options *ExperimentsClientListOptions) *ExperimentsClientListPager
List - Get a list of Experiment resources in a resource group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. options - ExperimentsClientListOptions contains the optional parameters for the ExperimentsClient.List method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListExperimentsInAResourceGroup.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/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) pager := client.List("<resource-group-name>", &armchaos.ExperimentsClientListOptions{Running: nil, ContinuationToken: to.StringPtr("<continuation-token>"), }) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
func (*ExperimentsClient) ListAll ¶
func (client *ExperimentsClient) ListAll(options *ExperimentsClientListAllOptions) *ExperimentsClientListAllPager
ListAll - Get a list of Experiment resources in a subscription. If the operation fails it returns an *azcore.ResponseError type. options - ExperimentsClientListAllOptions contains the optional parameters for the ExperimentsClient.ListAll method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListExperimentsInASubscription.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/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) pager := client.ListAll(&armchaos.ExperimentsClientListAllOptions{Running: nil, ContinuationToken: to.StringPtr("<continuation-token>"), }) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
func (*ExperimentsClient) ListAllStatuses ¶
func (client *ExperimentsClient) ListAllStatuses(resourceGroupName string, experimentName string, options *ExperimentsClientListAllStatusesOptions) *ExperimentsClientListAllStatusesPager
ListAllStatuses - Get a list of statuses of a Experiment resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. experimentName - String that represents a Experiment resource name. options - ExperimentsClientListAllStatusesOptions contains the optional parameters for the ExperimentsClient.ListAllStatuses method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListExperimentStatuses.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) pager := client.ListAllStatuses("<resource-group-name>", "<experiment-name>", nil) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
func (*ExperimentsClient) ListExecutionDetails ¶
func (client *ExperimentsClient) ListExecutionDetails(resourceGroupName string, experimentName string, options *ExperimentsClientListExecutionDetailsOptions) *ExperimentsClientListExecutionDetailsPager
ListExecutionDetails - Get a list of execution details of a Experiment resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. experimentName - String that represents a Experiment resource name. options - ExperimentsClientListExecutionDetailsOptions contains the optional parameters for the ExperimentsClient.ListExecutionDetails method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListExperimentExecutionsDetails.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) pager := client.ListExecutionDetails("<resource-group-name>", "<experiment-name>", nil) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
func (*ExperimentsClient) Start ¶
func (client *ExperimentsClient) Start(ctx context.Context, resourceGroupName string, experimentName string, options *ExperimentsClientStartOptions) (ExperimentsClientStartResponse, error)
Start - Start a Experiment resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. experimentName - String that represents a Experiment resource name. options - ExperimentsClientStartOptions contains the optional parameters for the ExperimentsClient.Start method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/StartAExperiment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewExperimentsClient("<subscription-id>", cred, nil) _, err = client.Start(ctx, "<resource-group-name>", "<experiment-name>", nil) if err != nil { log.Fatal(err) } }
Output:
type ExperimentsClientBeginCancelOptions ¶ added in v0.2.0
type ExperimentsClientBeginCancelOptions struct { }
ExperimentsClientBeginCancelOptions contains the optional parameters for the ExperimentsClient.BeginCancel method.
type ExperimentsClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type ExperimentsClientBeginCreateOrUpdateOptions struct { }
ExperimentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExperimentsClient.BeginCreateOrUpdate method.
type ExperimentsClientCancelPoller ¶ added in v0.2.0
type ExperimentsClientCancelPoller struct {
// contains filtered or unexported fields
}
ExperimentsClientCancelPoller provides polling facilities until the operation reaches a terminal state.
func (*ExperimentsClientCancelPoller) Done ¶ added in v0.2.0
func (p *ExperimentsClientCancelPoller) Done() bool
Done returns true if the LRO has reached a terminal state.
func (*ExperimentsClientCancelPoller) FinalResponse ¶ added in v0.2.0
func (p *ExperimentsClientCancelPoller) FinalResponse(ctx context.Context) (ExperimentsClientCancelResponse, error)
FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ExperimentsClientCancelResponse will be returned.
func (*ExperimentsClientCancelPoller) Poll ¶ added in v0.2.0
Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.
func (*ExperimentsClientCancelPoller) ResumeToken ¶ added in v0.2.0
func (p *ExperimentsClientCancelPoller) ResumeToken() (string, error)
ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.
type ExperimentsClientCancelPollerResponse ¶ added in v0.2.0
type ExperimentsClientCancelPollerResponse struct { // Poller contains an initialized poller. Poller *ExperimentsClientCancelPoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientCancelPollerResponse contains the response from method ExperimentsClient.Cancel.
func (ExperimentsClientCancelPollerResponse) PollUntilDone ¶ added in v0.2.0
func (l ExperimentsClientCancelPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExperimentsClientCancelResponse, error)
PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.
func (*ExperimentsClientCancelPollerResponse) Resume ¶ added in v0.2.0
func (l *ExperimentsClientCancelPollerResponse) Resume(ctx context.Context, client *ExperimentsClient, token string) error
Resume rehydrates a ExperimentsClientCancelPollerResponse from the provided client and resume token.
type ExperimentsClientCancelResponse ¶ added in v0.2.0
type ExperimentsClientCancelResponse struct { ExperimentsClientCancelResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientCancelResponse contains the response from method ExperimentsClient.Cancel.
type ExperimentsClientCancelResult ¶ added in v0.2.0
type ExperimentsClientCancelResult struct {
ExperimentCancelOperationResult
}
ExperimentsClientCancelResult contains the result from method ExperimentsClient.Cancel.
type ExperimentsClientCreateOrUpdatePoller ¶ added in v0.2.0
type ExperimentsClientCreateOrUpdatePoller struct {
// contains filtered or unexported fields
}
ExperimentsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.
func (*ExperimentsClientCreateOrUpdatePoller) Done ¶ added in v0.2.0
func (p *ExperimentsClientCreateOrUpdatePoller) Done() bool
Done returns true if the LRO has reached a terminal state.
func (*ExperimentsClientCreateOrUpdatePoller) FinalResponse ¶ added in v0.2.0
func (p *ExperimentsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExperimentsClientCreateOrUpdateResponse, error)
FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ExperimentsClientCreateOrUpdateResponse will be returned.
func (*ExperimentsClientCreateOrUpdatePoller) Poll ¶ added in v0.2.0
Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.
func (*ExperimentsClientCreateOrUpdatePoller) ResumeToken ¶ added in v0.2.0
func (p *ExperimentsClientCreateOrUpdatePoller) ResumeToken() (string, error)
ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.
type ExperimentsClientCreateOrUpdatePollerResponse ¶ added in v0.2.0
type ExperimentsClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. Poller *ExperimentsClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientCreateOrUpdatePollerResponse contains the response from method ExperimentsClient.CreateOrUpdate.
func (ExperimentsClientCreateOrUpdatePollerResponse) PollUntilDone ¶ added in v0.2.0
func (l ExperimentsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExperimentsClientCreateOrUpdateResponse, error)
PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.
func (*ExperimentsClientCreateOrUpdatePollerResponse) Resume ¶ added in v0.2.0
func (l *ExperimentsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExperimentsClient, token string) error
Resume rehydrates a ExperimentsClientCreateOrUpdatePollerResponse from the provided client and resume token.
type ExperimentsClientCreateOrUpdateResponse ¶ added in v0.2.0
type ExperimentsClientCreateOrUpdateResponse struct { ExperimentsClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientCreateOrUpdateResponse contains the response from method ExperimentsClient.CreateOrUpdate.
type ExperimentsClientCreateOrUpdateResult ¶ added in v0.2.0
type ExperimentsClientCreateOrUpdateResult struct {
Experiment
}
ExperimentsClientCreateOrUpdateResult contains the result from method ExperimentsClient.CreateOrUpdate.
type ExperimentsClientDeleteOptions ¶ added in v0.2.0
type ExperimentsClientDeleteOptions struct { }
ExperimentsClientDeleteOptions contains the optional parameters for the ExperimentsClient.Delete method.
type ExperimentsClientDeleteResponse ¶ added in v0.2.0
type ExperimentsClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientDeleteResponse contains the response from method ExperimentsClient.Delete.
type ExperimentsClientGetExecutionDetailsOptions ¶ added in v0.2.0
type ExperimentsClientGetExecutionDetailsOptions struct { }
ExperimentsClientGetExecutionDetailsOptions contains the optional parameters for the ExperimentsClient.GetExecutionDetails method.
type ExperimentsClientGetExecutionDetailsResponse ¶ added in v0.2.0
type ExperimentsClientGetExecutionDetailsResponse struct { ExperimentsClientGetExecutionDetailsResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientGetExecutionDetailsResponse contains the response from method ExperimentsClient.GetExecutionDetails.
type ExperimentsClientGetExecutionDetailsResult ¶ added in v0.2.0
type ExperimentsClientGetExecutionDetailsResult struct {
ExperimentExecutionDetails
}
ExperimentsClientGetExecutionDetailsResult contains the result from method ExperimentsClient.GetExecutionDetails.
type ExperimentsClientGetOptions ¶ added in v0.2.0
type ExperimentsClientGetOptions struct { }
ExperimentsClientGetOptions contains the optional parameters for the ExperimentsClient.Get method.
type ExperimentsClientGetResponse ¶ added in v0.2.0
type ExperimentsClientGetResponse struct { ExperimentsClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientGetResponse contains the response from method ExperimentsClient.Get.
type ExperimentsClientGetResult ¶ added in v0.2.0
type ExperimentsClientGetResult struct {
Experiment
}
ExperimentsClientGetResult contains the result from method ExperimentsClient.Get.
type ExperimentsClientGetStatusOptions ¶ added in v0.2.0
type ExperimentsClientGetStatusOptions struct { }
ExperimentsClientGetStatusOptions contains the optional parameters for the ExperimentsClient.GetStatus method.
type ExperimentsClientGetStatusResponse ¶ added in v0.2.0
type ExperimentsClientGetStatusResponse struct { ExperimentsClientGetStatusResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientGetStatusResponse contains the response from method ExperimentsClient.GetStatus.
type ExperimentsClientGetStatusResult ¶ added in v0.2.0
type ExperimentsClientGetStatusResult struct {
ExperimentStatus
}
ExperimentsClientGetStatusResult contains the result from method ExperimentsClient.GetStatus.
type ExperimentsClientListAllOptions ¶ added in v0.2.0
type ExperimentsClientListAllOptions struct { // String that sets the continuation token. ContinuationToken *string // Optional value that indicates whether to filter results based on if the Experiment is currently running. If null, then // the results will not be filtered. Running *bool }
ExperimentsClientListAllOptions contains the optional parameters for the ExperimentsClient.ListAll method.
type ExperimentsClientListAllPager ¶ added in v0.2.0
type ExperimentsClientListAllPager struct {
// contains filtered or unexported fields
}
ExperimentsClientListAllPager provides operations for iterating over paged responses.
func (*ExperimentsClientListAllPager) Err ¶ added in v0.2.0
func (p *ExperimentsClientListAllPager) Err() error
Err returns the last error encountered while paging.
func (*ExperimentsClientListAllPager) NextPage ¶ added in v0.2.0
func (p *ExperimentsClientListAllPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*ExperimentsClientListAllPager) PageResponse ¶ added in v0.2.0
func (p *ExperimentsClientListAllPager) PageResponse() ExperimentsClientListAllResponse
PageResponse returns the current ExperimentsClientListAllResponse page.
type ExperimentsClientListAllResponse ¶ added in v0.2.0
type ExperimentsClientListAllResponse struct { ExperimentsClientListAllResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientListAllResponse contains the response from method ExperimentsClient.ListAll.
type ExperimentsClientListAllResult ¶ added in v0.2.0
type ExperimentsClientListAllResult struct {
ExperimentListResult
}
ExperimentsClientListAllResult contains the result from method ExperimentsClient.ListAll.
type ExperimentsClientListAllStatusesOptions ¶ added in v0.2.0
type ExperimentsClientListAllStatusesOptions struct { }
ExperimentsClientListAllStatusesOptions contains the optional parameters for the ExperimentsClient.ListAllStatuses method.
type ExperimentsClientListAllStatusesPager ¶ added in v0.2.0
type ExperimentsClientListAllStatusesPager struct {
// contains filtered or unexported fields
}
ExperimentsClientListAllStatusesPager provides operations for iterating over paged responses.
func (*ExperimentsClientListAllStatusesPager) Err ¶ added in v0.2.0
func (p *ExperimentsClientListAllStatusesPager) Err() error
Err returns the last error encountered while paging.
func (*ExperimentsClientListAllStatusesPager) NextPage ¶ added in v0.2.0
func (p *ExperimentsClientListAllStatusesPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*ExperimentsClientListAllStatusesPager) PageResponse ¶ added in v0.2.0
func (p *ExperimentsClientListAllStatusesPager) PageResponse() ExperimentsClientListAllStatusesResponse
PageResponse returns the current ExperimentsClientListAllStatusesResponse page.
type ExperimentsClientListAllStatusesResponse ¶ added in v0.2.0
type ExperimentsClientListAllStatusesResponse struct { ExperimentsClientListAllStatusesResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientListAllStatusesResponse contains the response from method ExperimentsClient.ListAllStatuses.
type ExperimentsClientListAllStatusesResult ¶ added in v0.2.0
type ExperimentsClientListAllStatusesResult struct {
ExperimentStatusListResult
}
ExperimentsClientListAllStatusesResult contains the result from method ExperimentsClient.ListAllStatuses.
type ExperimentsClientListExecutionDetailsOptions ¶ added in v0.2.0
type ExperimentsClientListExecutionDetailsOptions struct { }
ExperimentsClientListExecutionDetailsOptions contains the optional parameters for the ExperimentsClient.ListExecutionDetails method.
type ExperimentsClientListExecutionDetailsPager ¶ added in v0.2.0
type ExperimentsClientListExecutionDetailsPager struct {
// contains filtered or unexported fields
}
ExperimentsClientListExecutionDetailsPager provides operations for iterating over paged responses.
func (*ExperimentsClientListExecutionDetailsPager) Err ¶ added in v0.2.0
func (p *ExperimentsClientListExecutionDetailsPager) Err() error
Err returns the last error encountered while paging.
func (*ExperimentsClientListExecutionDetailsPager) NextPage ¶ added in v0.2.0
func (p *ExperimentsClientListExecutionDetailsPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*ExperimentsClientListExecutionDetailsPager) PageResponse ¶ added in v0.2.0
func (p *ExperimentsClientListExecutionDetailsPager) PageResponse() ExperimentsClientListExecutionDetailsResponse
PageResponse returns the current ExperimentsClientListExecutionDetailsResponse page.
type ExperimentsClientListExecutionDetailsResponse ¶ added in v0.2.0
type ExperimentsClientListExecutionDetailsResponse struct { ExperimentsClientListExecutionDetailsResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientListExecutionDetailsResponse contains the response from method ExperimentsClient.ListExecutionDetails.
type ExperimentsClientListExecutionDetailsResult ¶ added in v0.2.0
type ExperimentsClientListExecutionDetailsResult struct {
ExperimentExecutionDetailsListResult
}
ExperimentsClientListExecutionDetailsResult contains the result from method ExperimentsClient.ListExecutionDetails.
type ExperimentsClientListOptions ¶ added in v0.2.0
type ExperimentsClientListOptions struct { // String that sets the continuation token. ContinuationToken *string // Optional value that indicates whether to filter results based on if the Experiment is currently running. If null, then // the results will not be filtered. Running *bool }
ExperimentsClientListOptions contains the optional parameters for the ExperimentsClient.List method.
type ExperimentsClientListPager ¶ added in v0.2.0
type ExperimentsClientListPager struct {
// contains filtered or unexported fields
}
ExperimentsClientListPager provides operations for iterating over paged responses.
func (*ExperimentsClientListPager) Err ¶ added in v0.2.0
func (p *ExperimentsClientListPager) Err() error
Err returns the last error encountered while paging.
func (*ExperimentsClientListPager) NextPage ¶ added in v0.2.0
func (p *ExperimentsClientListPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*ExperimentsClientListPager) PageResponse ¶ added in v0.2.0
func (p *ExperimentsClientListPager) PageResponse() ExperimentsClientListResponse
PageResponse returns the current ExperimentsClientListResponse page.
type ExperimentsClientListResponse ¶ added in v0.2.0
type ExperimentsClientListResponse struct { ExperimentsClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientListResponse contains the response from method ExperimentsClient.List.
type ExperimentsClientListResult ¶ added in v0.2.0
type ExperimentsClientListResult struct {
ExperimentListResult
}
ExperimentsClientListResult contains the result from method ExperimentsClient.List.
type ExperimentsClientStartOptions ¶ added in v0.2.0
type ExperimentsClientStartOptions struct { }
ExperimentsClientStartOptions contains the optional parameters for the ExperimentsClient.Start method.
type ExperimentsClientStartResponse ¶ added in v0.2.0
type ExperimentsClientStartResponse struct { ExperimentsClientStartResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ExperimentsClientStartResponse contains the response from method ExperimentsClient.Start.
type ExperimentsClientStartResult ¶ added in v0.2.0
type ExperimentsClientStartResult struct {
ExperimentStartOperationResult
}
ExperimentsClientStartResult contains the result from method ExperimentsClient.Start.
type KeyValuePair ¶ added in v0.2.0
type KeyValuePair struct { // REQUIRED; The name of the setting for the action. Key *string `json:"key,omitempty"` // REQUIRED; The value of the setting for the action. Value *string `json:"value,omitempty"` }
KeyValuePair - A map to describe the settings of an action.
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
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) ListAll ¶
func (client *OperationsClient) ListAll(options *OperationsClientListAllOptions) *OperationsClientListAllPager
ListAll - Get a list all available Operations. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListAllOptions contains the optional parameters for the OperationsClient.ListAll method.
type OperationsClientListAllOptions ¶ added in v0.2.0
type OperationsClientListAllOptions struct { }
OperationsClientListAllOptions contains the optional parameters for the OperationsClient.ListAll method.
type OperationsClientListAllPager ¶ added in v0.2.0
type OperationsClientListAllPager struct {
// contains filtered or unexported fields
}
OperationsClientListAllPager provides operations for iterating over paged responses.
func (*OperationsClientListAllPager) Err ¶ added in v0.2.0
func (p *OperationsClientListAllPager) Err() error
Err returns the last error encountered while paging.
func (*OperationsClientListAllPager) NextPage ¶ added in v0.2.0
func (p *OperationsClientListAllPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*OperationsClientListAllPager) PageResponse ¶ added in v0.2.0
func (p *OperationsClientListAllPager) PageResponse() OperationsClientListAllResponse
PageResponse returns the current OperationsClientListAllResponse page.
type OperationsClientListAllResponse ¶ added in v0.2.0
type OperationsClientListAllResponse struct { OperationsClientListAllResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
OperationsClientListAllResponse contains the response from method OperationsClient.ListAll.
type OperationsClientListAllResult ¶ added in v0.2.0
type OperationsClientListAllResult struct {
OperationListResult
}
OperationsClientListAllResult contains the result from method OperationsClient.ListAll.
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; 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 ResourceIdentity ¶
type ResourceIdentity struct { // REQUIRED; String of the resource identity type. Type *ResourceIdentityType `json:"type,omitempty"` // READ-ONLY; GUID that represents the principal ID of this resource identity. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; GUID that represents the tenant ID of this resource identity. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
ResourceIdentity - The managed identity of a resource.
type ResourceIdentityType ¶
type ResourceIdentityType string
ResourceIdentityType - String of the resource identity type.
const ( ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" )
func PossibleResourceIdentityTypeValues ¶
func PossibleResourceIdentityTypeValues() []ResourceIdentityType
PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
func (ResourceIdentityType) ToPtr ¶
func (c ResourceIdentityType) ToPtr() *ResourceIdentityType
ToPtr returns a *ResourceIdentityType pointing to the current value.
type Selector ¶
type Selector struct { // REQUIRED; String of the selector ID. ID *string `json:"id,omitempty"` // REQUIRED; List of Target references. Targets []*TargetReference `json:"targets,omitempty"` // REQUIRED; Enum of the selector type. Type *SelectorType `json:"type,omitempty"` }
Selector - Model that represents a selector in the Experiment resource.
func (Selector) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Selector.
type SelectorType ¶
type SelectorType string
SelectorType - Enum of the selector type.
const ( SelectorTypePercent SelectorType = "Percent" SelectorTypeRandom SelectorType = "Random" SelectorTypeTag SelectorType = "Tag" SelectorTypeList SelectorType = "List" )
func PossibleSelectorTypeValues ¶
func PossibleSelectorTypeValues() []SelectorType
PossibleSelectorTypeValues returns the possible values for the SelectorType const type.
func (SelectorType) ToPtr ¶
func (c SelectorType) ToPtr() *SelectorType
ToPtr returns a *SelectorType pointing to the current value.
type Step ¶
type Step struct { // REQUIRED; List of branches. Branches []*Branch `json:"branches,omitempty"` // REQUIRED; String of the step name. Name *string `json:"name,omitempty"` }
Step - Model that represents a step in the Experiment resource.
func (Step) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Step.
type StepStatus ¶
type StepStatus struct { // READ-ONLY; The array of branches. Branches []*BranchStatus `json:"branches,omitempty" azure:"ro"` // READ-ONLY; The id of the step. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the step. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The value of the status of the step. Status *string `json:"status,omitempty" azure:"ro"` }
StepStatus - Model that represents the a list of branches and branch statuses.
func (StepStatus) MarshalJSON ¶
func (s StepStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StepStatus.
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 Target ¶
type Target struct { // REQUIRED; The properties of the target resource. Properties map[string]interface{} `json:"properties,omitempty"` // Location of the target resource. Location *string `json:"location,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; The system metadata of the target resource. 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"` }
Target - Model that represents a Target resource.
func (Target) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Target.
type TargetListResult ¶
type TargetListResult struct { // READ-ONLY; URL to retrieve the next page of Target resources. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of Target resources. Value []*Target `json:"value,omitempty" azure:"ro"` }
TargetListResult - Model that represents a list of Target resources and a link for pagination.
func (TargetListResult) MarshalJSON ¶
func (t TargetListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TargetListResult.
type TargetReference ¶
type TargetReference struct { // REQUIRED; String of the resource ID of a Target resource. ID *string `json:"id,omitempty"` // REQUIRED; Enum of the Target reference type. Type *string `json:"type,omitempty"` }
TargetReference - Model that represents a reference to a Target in the selector.
type TargetType ¶
type TargetType struct { // REQUIRED; The properties of the target type resource. Properties *TargetTypeProperties `json:"properties,omitempty"` // Location of the Target Type resource. Location *string `json:"location,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; The system metadata properties of the target type resource. 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"` }
TargetType - Model that represents a Target Type resource.
type TargetTypeListResult ¶
type TargetTypeListResult struct { // READ-ONLY; URL to retrieve the next page of Target Type resources. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of Target Type resources. Value []*TargetType `json:"value,omitempty" azure:"ro"` }
TargetTypeListResult - Model that represents a list of Target Type resources and a link for pagination.
func (TargetTypeListResult) MarshalJSON ¶
func (t TargetTypeListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TargetTypeListResult.
type TargetTypeProperties ¶
type TargetTypeProperties struct { // READ-ONLY; Localized string of the description. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; Localized string of the display name. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; URL to retrieve JSON schema of the Target Type properties. PropertiesSchema *string `json:"propertiesSchema,omitempty" azure:"ro"` // READ-ONLY; List of resource types this Target Type can extend. ResourceTypes []*string `json:"resourceTypes,omitempty" azure:"ro"` }
TargetTypeProperties - Model that represents the base Target Type properties model.
func (TargetTypeProperties) MarshalJSON ¶
func (t TargetTypeProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TargetTypeProperties.
type TargetTypesClient ¶
type TargetTypesClient struct {
// contains filtered or unexported fields
}
TargetTypesClient contains the methods for the TargetTypes group. Don't use this type directly, use NewTargetTypesClient() instead.
func NewTargetTypesClient ¶
func NewTargetTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TargetTypesClient
NewTargetTypesClient creates a new instance of TargetTypesClient with the specified values. subscriptionID - GUID that represents an Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*TargetTypesClient) Get ¶
func (client *TargetTypesClient) Get(ctx context.Context, locationName string, targetTypeName string, options *TargetTypesClientGetOptions) (TargetTypesClientGetResponse, error)
Get - Get a Target Type resources for given location. If the operation fails it returns an *azcore.ResponseError type. locationName - String that represents a Location resource name. targetTypeName - String that represents a Target Type resource name. options - TargetTypesClientGetOptions contains the optional parameters for the TargetTypesClient.Get method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetATargetType.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewTargetTypesClient("<subscription-id>", cred, nil) res, err := client.Get(ctx, "<location-name>", "<target-type-name>", nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.TargetTypesClientGetResult) }
Output:
func (*TargetTypesClient) List ¶
func (client *TargetTypesClient) List(locationName string, options *TargetTypesClientListOptions) *TargetTypesClientListPager
List - Get a list of Target Type resources for given location. If the operation fails it returns an *azcore.ResponseError type. locationName - String that represents a Location resource name. options - TargetTypesClientListOptions contains the optional parameters for the TargetTypesClient.List method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListTargetTypes.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/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewTargetTypesClient("<subscription-id>", cred, nil) pager := client.List("<location-name>", &armchaos.TargetTypesClientListOptions{ContinuationToken: to.StringPtr("<continuation-token>")}) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
type TargetTypesClientGetOptions ¶ added in v0.2.0
type TargetTypesClientGetOptions struct { }
TargetTypesClientGetOptions contains the optional parameters for the TargetTypesClient.Get method.
type TargetTypesClientGetResponse ¶ added in v0.2.0
type TargetTypesClientGetResponse struct { TargetTypesClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
TargetTypesClientGetResponse contains the response from method TargetTypesClient.Get.
type TargetTypesClientGetResult ¶ added in v0.2.0
type TargetTypesClientGetResult struct {
TargetType
}
TargetTypesClientGetResult contains the result from method TargetTypesClient.Get.
type TargetTypesClientListOptions ¶ added in v0.2.0
type TargetTypesClientListOptions struct { // String that sets the continuation token. ContinuationToken *string }
TargetTypesClientListOptions contains the optional parameters for the TargetTypesClient.List method.
type TargetTypesClientListPager ¶ added in v0.2.0
type TargetTypesClientListPager struct {
// contains filtered or unexported fields
}
TargetTypesClientListPager provides operations for iterating over paged responses.
func (*TargetTypesClientListPager) Err ¶ added in v0.2.0
func (p *TargetTypesClientListPager) Err() error
Err returns the last error encountered while paging.
func (*TargetTypesClientListPager) NextPage ¶ added in v0.2.0
func (p *TargetTypesClientListPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*TargetTypesClientListPager) PageResponse ¶ added in v0.2.0
func (p *TargetTypesClientListPager) PageResponse() TargetTypesClientListResponse
PageResponse returns the current TargetTypesClientListResponse page.
type TargetTypesClientListResponse ¶ added in v0.2.0
type TargetTypesClientListResponse struct { TargetTypesClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
TargetTypesClientListResponse contains the response from method TargetTypesClient.List.
type TargetTypesClientListResult ¶ added in v0.2.0
type TargetTypesClientListResult struct {
TargetTypeListResult
}
TargetTypesClientListResult contains the result from method TargetTypesClient.List.
type TargetsClient ¶
type TargetsClient struct {
// contains filtered or unexported fields
}
TargetsClient contains the methods for the Targets group. Don't use this type directly, use NewTargetsClient() instead.
func NewTargetsClient ¶
func NewTargetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TargetsClient
NewTargetsClient creates a new instance of TargetsClient with the specified values. subscriptionID - GUID that represents an Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*TargetsClient) CreateOrUpdate ¶
func (client *TargetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parentProviderNamespace string, parentResourceType string, parentResourceName string, targetName string, target Target, options *TargetsClientCreateOrUpdateOptions) (TargetsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a Target resource that extends a tracked regional resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. parentProviderNamespace - String that represents a resource provider namespace. parentResourceType - String that represents a resource type. parentResourceName - String that represents a resource name. targetName - String that represents a Target resource name. target - Target resource to be created or updated. options - TargetsClientCreateOrUpdateOptions contains the optional parameters for the TargetsClient.CreateOrUpdate method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/CreateOrUpdateATarget.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewTargetsClient("<subscription-id>", cred, nil) res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<parent-provider-namespace>", "<parent-resource-type>", "<parent-resource-name>", "<target-name>", armchaos.Target{ Properties: map[string]interface{}{ "identities": []interface{}{ map[string]interface{}{ "type": "CertificateSubjectIssuer", "subject": "CN=example.subject", }, }, }, }, nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.TargetsClientCreateOrUpdateResult) }
Output:
func (*TargetsClient) Delete ¶
func (client *TargetsClient) Delete(ctx context.Context, resourceGroupName string, parentProviderNamespace string, parentResourceType string, parentResourceName string, targetName string, options *TargetsClientDeleteOptions) (TargetsClientDeleteResponse, error)
Delete - Delete a Target resource that extends a tracked regional resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. parentProviderNamespace - String that represents a resource provider namespace. parentResourceType - String that represents a resource type. parentResourceName - String that represents a resource name. targetName - String that represents a Target resource name. options - TargetsClientDeleteOptions contains the optional parameters for the TargetsClient.Delete method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/DeleteATarget.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewTargetsClient("<subscription-id>", cred, nil) _, err = client.Delete(ctx, "<resource-group-name>", "<parent-provider-namespace>", "<parent-resource-type>", "<parent-resource-name>", "<target-name>", nil) if err != nil { log.Fatal(err) } }
Output:
func (*TargetsClient) Get ¶
func (client *TargetsClient) Get(ctx context.Context, resourceGroupName string, parentProviderNamespace string, parentResourceType string, parentResourceName string, targetName string, options *TargetsClientGetOptions) (TargetsClientGetResponse, error)
Get - Get a Target resource that extends a tracked regional resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. parentProviderNamespace - String that represents a resource provider namespace. parentResourceType - String that represents a resource type. parentResourceName - String that represents a resource name. targetName - String that represents a Target resource name. options - TargetsClientGetOptions contains the optional parameters for the TargetsClient.Get method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetATarget.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewTargetsClient("<subscription-id>", cred, nil) res, err := client.Get(ctx, "<resource-group-name>", "<parent-provider-namespace>", "<parent-resource-type>", "<parent-resource-name>", "<target-name>", nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.TargetsClientGetResult) }
Output:
func (*TargetsClient) List ¶
func (client *TargetsClient) List(resourceGroupName string, parentProviderNamespace string, parentResourceType string, parentResourceName string, options *TargetsClientListOptions) *TargetsClientListPager
List - Get a list of Target resources that extend a tracked regional resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - String that represents an Azure resource group. parentProviderNamespace - String that represents a resource provider namespace. parentResourceType - String that represents a resource type. parentResourceName - String that represents a resource name. options - TargetsClientListOptions contains the optional parameters for the TargetsClient.List method.
Example ¶
x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListTargets.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/chaos/armchaos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armchaos.NewTargetsClient("<subscription-id>", cred, nil) pager := client.List("<resource-group-name>", "<parent-provider-namespace>", "<parent-resource-type>", "<parent-resource-name>", &armchaos.TargetsClientListOptions{ContinuationToken: to.StringPtr("<continuation-token>")}) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
type TargetsClientCreateOrUpdateOptions ¶ added in v0.2.0
type TargetsClientCreateOrUpdateOptions struct { }
TargetsClientCreateOrUpdateOptions contains the optional parameters for the TargetsClient.CreateOrUpdate method.
type TargetsClientCreateOrUpdateResponse ¶ added in v0.2.0
type TargetsClientCreateOrUpdateResponse struct { TargetsClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
TargetsClientCreateOrUpdateResponse contains the response from method TargetsClient.CreateOrUpdate.
type TargetsClientCreateOrUpdateResult ¶ added in v0.2.0
type TargetsClientCreateOrUpdateResult struct {
Target
}
TargetsClientCreateOrUpdateResult contains the result from method TargetsClient.CreateOrUpdate.
type TargetsClientDeleteOptions ¶ added in v0.2.0
type TargetsClientDeleteOptions struct { }
TargetsClientDeleteOptions contains the optional parameters for the TargetsClient.Delete method.
type TargetsClientDeleteResponse ¶ added in v0.2.0
type TargetsClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
TargetsClientDeleteResponse contains the response from method TargetsClient.Delete.
type TargetsClientGetOptions ¶ added in v0.2.0
type TargetsClientGetOptions struct { }
TargetsClientGetOptions contains the optional parameters for the TargetsClient.Get method.
type TargetsClientGetResponse ¶ added in v0.2.0
type TargetsClientGetResponse struct { TargetsClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
TargetsClientGetResponse contains the response from method TargetsClient.Get.
type TargetsClientGetResult ¶ added in v0.2.0
type TargetsClientGetResult struct {
Target
}
TargetsClientGetResult contains the result from method TargetsClient.Get.
type TargetsClientListOptions ¶ added in v0.2.0
type TargetsClientListOptions struct { // String that sets the continuation token. ContinuationToken *string }
TargetsClientListOptions contains the optional parameters for the TargetsClient.List method.
type TargetsClientListPager ¶ added in v0.2.0
type TargetsClientListPager struct {
// contains filtered or unexported fields
}
TargetsClientListPager provides operations for iterating over paged responses.
func (*TargetsClientListPager) Err ¶ added in v0.2.0
func (p *TargetsClientListPager) Err() error
Err returns the last error encountered while paging.
func (*TargetsClientListPager) NextPage ¶ added in v0.2.0
func (p *TargetsClientListPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*TargetsClientListPager) PageResponse ¶ added in v0.2.0
func (p *TargetsClientListPager) PageResponse() TargetsClientListResponse
PageResponse returns the current TargetsClientListResponse page.
type TargetsClientListResponse ¶ added in v0.2.0
type TargetsClientListResponse struct { TargetsClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
TargetsClientListResponse contains the response from method TargetsClient.List.
type TargetsClientListResult ¶ added in v0.2.0
type TargetsClientListResult struct {
TargetListResult
}
TargetsClientListResult contains the result from method TargetsClient.List.
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; 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.
Source Files ¶
- build.go
- zz_generated_capabilities_client.go
- zz_generated_capabilitytypes_client.go
- zz_generated_constants.go
- zz_generated_experiments_client.go
- zz_generated_models.go
- zz_generated_operations_client.go
- zz_generated_pagers.go
- zz_generated_pollers.go
- zz_generated_polymorphic_helpers.go
- zz_generated_response_types.go
- zz_generated_targets_client.go
- zz_generated_targettypes_client.go
- zz_generated_time_rfc3339.go