Documentation ¶
Index ¶
- type CreatedByType
- type CustomLocation
- type CustomLocationFindTargetResourceGroupProperties
- type CustomLocationFindTargetResourceGroupResult
- type CustomLocationListResult
- type CustomLocationOperation
- type CustomLocationOperationValueDisplay
- type CustomLocationOperationsList
- type CustomLocationProperties
- type CustomLocationPropertiesAuthentication
- type CustomLocationsClient
- func (client *CustomLocationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[CustomLocationsClientCreateOrUpdateResponse], error)
- func (client *CustomLocationsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[CustomLocationsClientDeleteResponse], error)
- func (client *CustomLocationsClient) FindTargetResourceGroup(ctx context.Context, resourceGroupName string, resourceName string, ...) (CustomLocationsClientFindTargetResourceGroupResponse, error)
- func (client *CustomLocationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, ...) (CustomLocationsClientGetResponse, error)
- func (client *CustomLocationsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[CustomLocationsClientListByResourceGroupResponse]
- func (client *CustomLocationsClient) NewListBySubscriptionPager(options *CustomLocationsClientListBySubscriptionOptions) *runtime.Pager[CustomLocationsClientListBySubscriptionResponse]
- func (client *CustomLocationsClient) NewListEnabledResourceTypesPager(resourceGroupName string, resourceName string, ...) *runtime.Pager[CustomLocationsClientListEnabledResourceTypesResponse]
- func (client *CustomLocationsClient) NewListOperationsPager(options *CustomLocationsClientListOperationsOptions) *runtime.Pager[CustomLocationsClientListOperationsResponse]
- func (client *CustomLocationsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, ...) (CustomLocationsClientUpdateResponse, error)
- type CustomLocationsClientBeginCreateOrUpdateOptions
- type CustomLocationsClientBeginDeleteOptions
- type CustomLocationsClientCreateOrUpdateResponse
- type CustomLocationsClientDeleteResponse
- type CustomLocationsClientFindTargetResourceGroupOptions
- type CustomLocationsClientFindTargetResourceGroupResponse
- type CustomLocationsClientGetOptions
- type CustomLocationsClientGetResponse
- type CustomLocationsClientListByResourceGroupOptions
- type CustomLocationsClientListByResourceGroupResponse
- type CustomLocationsClientListBySubscriptionOptions
- type CustomLocationsClientListBySubscriptionResponse
- type CustomLocationsClientListEnabledResourceTypesOptions
- type CustomLocationsClientListEnabledResourceTypesResponse
- type CustomLocationsClientListOperationsOptions
- type CustomLocationsClientListOperationsResponse
- type CustomLocationsClientUpdateOptions
- type CustomLocationsClientUpdateResponse
- type EnabledResourceType
- type EnabledResourceTypeProperties
- type EnabledResourceTypePropertiesTypesMetadataItem
- type EnabledResourceTypesListResult
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type HostType
- type Identity
- type MatchExpressionsProperties
- type PatchableCustomLocations
- type PatchableResourceSyncRule
- type ProxyResource
- type Resource
- type ResourceIdentityType
- type ResourceSyncRule
- type ResourceSyncRuleListResult
- type ResourceSyncRuleProperties
- type ResourceSyncRulePropertiesSelector
- type ResourceSyncRulesClient
- func (client *ResourceSyncRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[ResourceSyncRulesClientCreateOrUpdateResponse], error)
- func (client *ResourceSyncRulesClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[ResourceSyncRulesClientUpdateResponse], error)
- func (client *ResourceSyncRulesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceSyncRulesClientDeleteResponse, error)
- func (client *ResourceSyncRulesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceSyncRulesClientGetResponse, error)
- func (client *ResourceSyncRulesClient) NewListByCustomLocationIDPager(resourceGroupName string, resourceName string, ...) *runtime.Pager[ResourceSyncRulesClientListByCustomLocationIDResponse]
- type ResourceSyncRulesClientBeginCreateOrUpdateOptions
- type ResourceSyncRulesClientBeginUpdateOptions
- type ResourceSyncRulesClientCreateOrUpdateResponse
- type ResourceSyncRulesClientDeleteOptions
- type ResourceSyncRulesClientDeleteResponse
- type ResourceSyncRulesClientGetOptions
- type ResourceSyncRulesClientGetResponse
- type ResourceSyncRulesClientListByCustomLocationIDOptions
- type ResourceSyncRulesClientListByCustomLocationIDResponse
- type ResourceSyncRulesClientUpdateResponse
- type SystemData
- type TrackedResource
Examples ¶
- CustomLocationsClient.BeginCreateOrUpdate
- CustomLocationsClient.BeginDelete
- CustomLocationsClient.FindTargetResourceGroup
- CustomLocationsClient.Get
- CustomLocationsClient.NewListByResourceGroupPager
- CustomLocationsClient.NewListBySubscriptionPager
- CustomLocationsClient.NewListEnabledResourceTypesPager
- CustomLocationsClient.NewListOperationsPager
- CustomLocationsClient.Update
- ResourceSyncRulesClient.BeginCreateOrUpdate
- ResourceSyncRulesClient.BeginUpdate
- ResourceSyncRulesClient.Delete
- ResourceSyncRulesClient.Get
- ResourceSyncRulesClient.NewListByCustomLocationIDPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type CustomLocation ¶
type CustomLocation struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Identity for the resource. Identity *Identity `json:"identity,omitempty"` // The set of properties specific to a Custom Location Properties *CustomLocationProperties `json:"properties,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; Metadata pertaining to creation and last modification of the 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"` }
CustomLocation - Custom Locations definition.
func (CustomLocation) MarshalJSON ¶
func (c CustomLocation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomLocation.
func (*CustomLocation) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomLocation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocation.
type CustomLocationFindTargetResourceGroupProperties ¶
type CustomLocationFindTargetResourceGroupProperties struct { // Labels of the custom resource, this is a map of {key,value} pairs. Labels map[string]*string `json:"labels,omitempty"` }
CustomLocationFindTargetResourceGroupProperties - The Find Target Resource Group operation request.
func (CustomLocationFindTargetResourceGroupProperties) MarshalJSON ¶
func (c CustomLocationFindTargetResourceGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomLocationFindTargetResourceGroupProperties.
func (*CustomLocationFindTargetResourceGroupProperties) UnmarshalJSON ¶
func (c *CustomLocationFindTargetResourceGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationFindTargetResourceGroupProperties.
type CustomLocationFindTargetResourceGroupResult ¶
type CustomLocationFindTargetResourceGroupResult struct { // READ-ONLY; The matching resource sync rule is the particular resource sync rule that matched the match expressions and // labels and had lowest priority. This is the rule responsible for mapping the target resource // to the target resource group. MatchedResourceSyncRule *string `json:"matchedResourceSyncRule,omitempty" azure:"ro"` // READ-ONLY; The target resource group of matching resource sync rule. The labels from the request will be used to find out // matching resource sync rule against the selector property of the resource sync rule. The // one with highest priority will be returned if there are multiple matching rules. TargetResourceGroup *string `json:"targetResourceGroup,omitempty" azure:"ro"` }
CustomLocationFindTargetResourceGroupResult - The Find Target Resource Group operation response.
func (CustomLocationFindTargetResourceGroupResult) MarshalJSON ¶
func (c CustomLocationFindTargetResourceGroupResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomLocationFindTargetResourceGroupResult.
func (*CustomLocationFindTargetResourceGroupResult) UnmarshalJSON ¶
func (c *CustomLocationFindTargetResourceGroupResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationFindTargetResourceGroupResult.
type CustomLocationListResult ¶
type CustomLocationListResult struct { // READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of Custom Locations. Value []*CustomLocation `json:"value,omitempty" azure:"ro"` }
CustomLocationListResult - The List Custom Locations operation response.
func (CustomLocationListResult) MarshalJSON ¶
func (c CustomLocationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomLocationListResult.
func (*CustomLocationListResult) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomLocationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationListResult.
type CustomLocationOperation ¶
type CustomLocationOperation struct { // Describes the properties of a Custom Locations Operation Value Display. Display *CustomLocationOperationValueDisplay `json:"display,omitempty"` // READ-ONLY; Is this Operation a data plane operation IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"` // READ-ONLY; The name of the compute operation. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The origin of the compute operation. Origin *string `json:"origin,omitempty" azure:"ro"` }
CustomLocationOperation - Custom Locations operation.
func (CustomLocationOperation) MarshalJSON ¶ added in v1.1.0
func (c CustomLocationOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomLocationOperation.
func (*CustomLocationOperation) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomLocationOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationOperation.
type CustomLocationOperationValueDisplay ¶
type CustomLocationOperationValueDisplay struct { // READ-ONLY; The description of the operation. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The display name of the compute operation. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The resource provider for the operation. Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; The display name of the resource the operation applies to. Resource *string `json:"resource,omitempty" azure:"ro"` }
CustomLocationOperationValueDisplay - Describes the properties of a Custom Locations Operation Value Display.
func (CustomLocationOperationValueDisplay) MarshalJSON ¶ added in v1.1.0
func (c CustomLocationOperationValueDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomLocationOperationValueDisplay.
func (*CustomLocationOperationValueDisplay) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomLocationOperationValueDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationOperationValueDisplay.
type CustomLocationOperationsList ¶
type CustomLocationOperationsList struct { // REQUIRED; Array of customLocationOperation Value []*CustomLocationOperation `json:"value,omitempty"` // Next page of operations. NextLink *string `json:"nextLink,omitempty"` }
CustomLocationOperationsList - Lists of Custom Locations operations.
func (CustomLocationOperationsList) MarshalJSON ¶
func (c CustomLocationOperationsList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomLocationOperationsList.
func (*CustomLocationOperationsList) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomLocationOperationsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationOperationsList.
type CustomLocationProperties ¶
type CustomLocationProperties struct { // This is optional input that contains the authentication that should be used to generate the namespace. Authentication *CustomLocationPropertiesAuthentication `json:"authentication,omitempty"` // Contains the reference to the add-on that contains charts to deploy CRDs and operators. ClusterExtensionIDs []*string `json:"clusterExtensionIds,omitempty"` // Display name for the Custom Locations location. DisplayName *string `json:"displayName,omitempty"` // Connected Cluster or AKS Cluster. The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. HostResourceID *string `json:"hostResourceId,omitempty"` // Type of host the Custom Locations is referencing (Kubernetes, etc…). HostType *HostType `json:"hostType,omitempty"` // Kubernetes namespace that will be created on the specified cluster. Namespace *string `json:"namespace,omitempty"` // Provisioning State for the Custom Location. ProvisioningState *string `json:"provisioningState,omitempty"` }
CustomLocationProperties - Properties for a custom location.
func (CustomLocationProperties) MarshalJSON ¶
func (c CustomLocationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomLocationProperties.
func (*CustomLocationProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomLocationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationProperties.
type CustomLocationPropertiesAuthentication ¶
type CustomLocationPropertiesAuthentication struct { // The type of the Custom Locations authentication Type *string `json:"type,omitempty"` // The kubeconfig value. Value *string `json:"value,omitempty"` }
CustomLocationPropertiesAuthentication - This is optional input that contains the authentication that should be used to generate the namespace.
func (CustomLocationPropertiesAuthentication) MarshalJSON ¶ added in v1.1.0
func (c CustomLocationPropertiesAuthentication) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomLocationPropertiesAuthentication.
func (*CustomLocationPropertiesAuthentication) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomLocationPropertiesAuthentication) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomLocationPropertiesAuthentication.
type CustomLocationsClient ¶
type CustomLocationsClient struct {
// contains filtered or unexported fields
}
CustomLocationsClient contains the methods for the CustomLocations group. Don't use this type directly, use NewCustomLocationsClient() instead.
func NewCustomLocationsClient ¶
func NewCustomLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomLocationsClient, error)
NewCustomLocationsClient creates a new instance of CustomLocationsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*CustomLocationsClient) BeginCreateOrUpdate ¶
func (client *CustomLocationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters CustomLocation, options *CustomLocationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomLocationsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a Custom Location in the specified Subscription and Resource Group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. parameters - Parameters supplied to create or update a Custom Location. options - CustomLocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomLocationsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsCreate_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewCustomLocationsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "testresourcegroup", "customLocation01", armextendedlocation.CustomLocation{ Location: to.Ptr("West US"), Identity: &armextendedlocation.Identity{ Type: to.Ptr(armextendedlocation.ResourceIdentityTypeSystemAssigned), }, Properties: &armextendedlocation.CustomLocationProperties{ Authentication: &armextendedlocation.CustomLocationPropertiesAuthentication{ Type: to.Ptr("KubeConfig"), Value: to.Ptr("<base64 KubeConfig>"), }, ClusterExtensionIDs: []*string{ to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedCluster/someCluster/Microsoft.KubernetesConfiguration/clusterExtensions/fooExtension")}, DisplayName: to.Ptr("customLocationLocation01"), HostResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup/providers/Microsoft.ContainerService/managedClusters/cluster01"), Namespace: to.Ptr("namespace01"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*CustomLocationsClient) BeginDelete ¶
func (client *CustomLocationsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, options *CustomLocationsClientBeginDeleteOptions) (*runtime.Poller[CustomLocationsClientDeleteResponse], error)
BeginDelete - Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. options - CustomLocationsClientBeginDeleteOptions contains the optional parameters for the CustomLocationsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewCustomLocationsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testresourcegroup", "customLocation01", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*CustomLocationsClient) FindTargetResourceGroup ¶
func (client *CustomLocationsClient) FindTargetResourceGroup(ctx context.Context, resourceGroupName string, resourceName string, parameters CustomLocationFindTargetResourceGroupProperties, options *CustomLocationsClientFindTargetResourceGroupOptions) (CustomLocationsClientFindTargetResourceGroupResponse, error)
FindTargetResourceGroup - Returns the target resource group associated with the resource sync rules of the Custom Location that match the rules passed in with the Find Target Resource Group Request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. parameters - Parameters of the find target resource group request. options - CustomLocationsClientFindTargetResourceGroupOptions contains the optional parameters for the CustomLocationsClient.FindTargetResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsFindTargetResourceGroup.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/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewCustomLocationsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.FindTargetResourceGroup(ctx, "testresourcegroup", "customLocation01", armextendedlocation.CustomLocationFindTargetResourceGroupProperties{ Labels: map[string]*string{ "key1": to.Ptr("value1"), "key2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*CustomLocationsClient) Get ¶
func (client *CustomLocationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *CustomLocationsClientGetOptions) (CustomLocationsClientGetResponse, error)
Get - Gets the details of the customLocation with a specified resource group and name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. options - CustomLocationsClientGetOptions contains the optional parameters for the CustomLocationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewCustomLocationsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testresourcegroup", "customLocation01", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*CustomLocationsClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *CustomLocationsClient) NewListByResourceGroupPager(resourceGroupName string, options *CustomLocationsClientListByResourceGroupOptions) *runtime.Pager[CustomLocationsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets a list of Custom Locations in the specified subscription and resource group. The operation returns properties of each Custom Location. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. options - CustomLocationsClientListByResourceGroupOptions contains the optional parameters for the CustomLocationsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewCustomLocationsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testresourcegroup", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CustomLocationsClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *CustomLocationsClient) NewListBySubscriptionPager(options *CustomLocationsClientListBySubscriptionOptions) *runtime.Pager[CustomLocationsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Gets a list of Custom Locations in the specified subscription. The operation returns properties of each Custom Location If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview options - CustomLocationsClientListBySubscriptionOptions contains the optional parameters for the CustomLocationsClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewCustomLocationsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CustomLocationsClient) NewListEnabledResourceTypesPager ¶ added in v0.4.0
func (client *CustomLocationsClient) NewListEnabledResourceTypesPager(resourceGroupName string, resourceName string, options *CustomLocationsClientListEnabledResourceTypesOptions) *runtime.Pager[CustomLocationsClientListEnabledResourceTypesResponse]
NewListEnabledResourceTypesPager - Gets the list of the Enabled Resource Types. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. options - CustomLocationsClientListEnabledResourceTypesOptions contains the optional parameters for the CustomLocationsClient.ListEnabledResourceTypes method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListEnabledResourceTypes.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewCustomLocationsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListEnabledResourceTypesPager("testresourcegroup", "customLocation01", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CustomLocationsClient) NewListOperationsPager ¶ added in v0.4.0
func (client *CustomLocationsClient) NewListOperationsPager(options *CustomLocationsClientListOperationsOptions) *runtime.Pager[CustomLocationsClientListOperationsResponse]
NewListOperationsPager - Lists all available Custom Locations operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview options - CustomLocationsClientListOperationsOptions contains the optional parameters for the CustomLocationsClient.ListOperations method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewCustomLocationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListOperationsPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CustomLocationsClient) Update ¶
func (client *CustomLocationsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters PatchableCustomLocations, options *CustomLocationsClientUpdateOptions) (CustomLocationsClientUpdateResponse, error)
Update - Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. parameters - The updatable fields of an existing Custom Location. options - CustomLocationsClientUpdateOptions contains the optional parameters for the CustomLocationsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsPatch.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/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewCustomLocationsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "testresourcegroup", "customLocation01", armextendedlocation.PatchableCustomLocations{ Identity: &armextendedlocation.Identity{ Type: to.Ptr(armextendedlocation.ResourceIdentityTypeSystemAssigned), }, Properties: &armextendedlocation.CustomLocationProperties{ ClusterExtensionIDs: []*string{ to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup/providers/Microsoft.ContainerService/managedClusters/cluster01/Microsoft.KubernetesConfiguration/clusterExtensions/fooExtension"), to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup/providers/Microsoft.ContainerService/managedClusters/cluster01/Microsoft.KubernetesConfiguration/clusterExtensions/barExtension")}, }, Tags: map[string]*string{ "archv3": to.Ptr(""), "tier": to.Ptr("testing"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type CustomLocationsClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type CustomLocationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CustomLocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomLocationsClient.BeginCreateOrUpdate method.
type CustomLocationsClientBeginDeleteOptions ¶ added in v0.2.0
type CustomLocationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CustomLocationsClientBeginDeleteOptions contains the optional parameters for the CustomLocationsClient.BeginDelete method.
type CustomLocationsClientCreateOrUpdateResponse ¶ added in v0.2.0
type CustomLocationsClientCreateOrUpdateResponse struct {
CustomLocation
}
CustomLocationsClientCreateOrUpdateResponse contains the response from method CustomLocationsClient.CreateOrUpdate.
type CustomLocationsClientDeleteResponse ¶ added in v0.2.0
type CustomLocationsClientDeleteResponse struct { }
CustomLocationsClientDeleteResponse contains the response from method CustomLocationsClient.Delete.
type CustomLocationsClientFindTargetResourceGroupOptions ¶
type CustomLocationsClientFindTargetResourceGroupOptions struct { }
CustomLocationsClientFindTargetResourceGroupOptions contains the optional parameters for the CustomLocationsClient.FindTargetResourceGroup method.
type CustomLocationsClientFindTargetResourceGroupResponse ¶
type CustomLocationsClientFindTargetResourceGroupResponse struct {
CustomLocationFindTargetResourceGroupResult
}
CustomLocationsClientFindTargetResourceGroupResponse contains the response from method CustomLocationsClient.FindTargetResourceGroup.
type CustomLocationsClientGetOptions ¶ added in v0.2.0
type CustomLocationsClientGetOptions struct { }
CustomLocationsClientGetOptions contains the optional parameters for the CustomLocationsClient.Get method.
type CustomLocationsClientGetResponse ¶ added in v0.2.0
type CustomLocationsClientGetResponse struct {
CustomLocation
}
CustomLocationsClientGetResponse contains the response from method CustomLocationsClient.Get.
type CustomLocationsClientListByResourceGroupOptions ¶ added in v0.2.0
type CustomLocationsClientListByResourceGroupOptions struct { }
CustomLocationsClientListByResourceGroupOptions contains the optional parameters for the CustomLocationsClient.ListByResourceGroup method.
type CustomLocationsClientListByResourceGroupResponse ¶ added in v0.2.0
type CustomLocationsClientListByResourceGroupResponse struct {
CustomLocationListResult
}
CustomLocationsClientListByResourceGroupResponse contains the response from method CustomLocationsClient.ListByResourceGroup.
type CustomLocationsClientListBySubscriptionOptions ¶ added in v0.2.0
type CustomLocationsClientListBySubscriptionOptions struct { }
CustomLocationsClientListBySubscriptionOptions contains the optional parameters for the CustomLocationsClient.ListBySubscription method.
type CustomLocationsClientListBySubscriptionResponse ¶ added in v0.2.0
type CustomLocationsClientListBySubscriptionResponse struct {
CustomLocationListResult
}
CustomLocationsClientListBySubscriptionResponse contains the response from method CustomLocationsClient.ListBySubscription.
type CustomLocationsClientListEnabledResourceTypesOptions ¶ added in v0.2.0
type CustomLocationsClientListEnabledResourceTypesOptions struct { }
CustomLocationsClientListEnabledResourceTypesOptions contains the optional parameters for the CustomLocationsClient.ListEnabledResourceTypes method.
type CustomLocationsClientListEnabledResourceTypesResponse ¶ added in v0.2.0
type CustomLocationsClientListEnabledResourceTypesResponse struct {
EnabledResourceTypesListResult
}
CustomLocationsClientListEnabledResourceTypesResponse contains the response from method CustomLocationsClient.ListEnabledResourceTypes.
type CustomLocationsClientListOperationsOptions ¶ added in v0.2.0
type CustomLocationsClientListOperationsOptions struct { }
CustomLocationsClientListOperationsOptions contains the optional parameters for the CustomLocationsClient.ListOperations method.
type CustomLocationsClientListOperationsResponse ¶ added in v0.2.0
type CustomLocationsClientListOperationsResponse struct {
CustomLocationOperationsList
}
CustomLocationsClientListOperationsResponse contains the response from method CustomLocationsClient.ListOperations.
type CustomLocationsClientUpdateOptions ¶ added in v0.2.0
type CustomLocationsClientUpdateOptions struct { }
CustomLocationsClientUpdateOptions contains the optional parameters for the CustomLocationsClient.Update method.
type CustomLocationsClientUpdateResponse ¶ added in v0.2.0
type CustomLocationsClientUpdateResponse struct {
CustomLocation
}
CustomLocationsClientUpdateResponse contains the response from method CustomLocationsClient.Update.
type EnabledResourceType ¶
type EnabledResourceType struct { // The set of properties for EnabledResourceType specific to a Custom Location Properties *EnabledResourceTypeProperties `json:"properties,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; Metadata pertaining to creation and last modification of the 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"` }
EnabledResourceType definition.
func (EnabledResourceType) MarshalJSON ¶
func (e EnabledResourceType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnabledResourceType.
func (*EnabledResourceType) UnmarshalJSON ¶ added in v1.1.0
func (e *EnabledResourceType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnabledResourceType.
type EnabledResourceTypeProperties ¶
type EnabledResourceTypeProperties struct { // Cluster Extension ID ClusterExtensionID *string `json:"clusterExtensionId,omitempty"` // Cluster Extension Type ExtensionType *string `json:"extensionType,omitempty"` // Metadata of the Resource Type TypesMetadata []*EnabledResourceTypePropertiesTypesMetadataItem `json:"typesMetadata,omitempty"` }
EnabledResourceTypeProperties - Properties for EnabledResourceType of a custom location.
func (EnabledResourceTypeProperties) MarshalJSON ¶
func (e EnabledResourceTypeProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnabledResourceTypeProperties.
func (*EnabledResourceTypeProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *EnabledResourceTypeProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnabledResourceTypeProperties.
type EnabledResourceTypePropertiesTypesMetadataItem ¶
type EnabledResourceTypePropertiesTypesMetadataItem struct { // Api Version of Resource Type APIVersion *string `json:"apiVersion,omitempty"` // Resource Provider Namespace of Resource Type ResourceProviderNamespace *string `json:"resourceProviderNamespace,omitempty"` // Resource Type ResourceType *string `json:"resourceType,omitempty"` }
EnabledResourceTypePropertiesTypesMetadataItem - Metadata of the Resource Type.
func (EnabledResourceTypePropertiesTypesMetadataItem) MarshalJSON ¶ added in v1.1.0
func (e EnabledResourceTypePropertiesTypesMetadataItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnabledResourceTypePropertiesTypesMetadataItem.
func (*EnabledResourceTypePropertiesTypesMetadataItem) UnmarshalJSON ¶ added in v1.1.0
func (e *EnabledResourceTypePropertiesTypesMetadataItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnabledResourceTypePropertiesTypesMetadataItem.
type EnabledResourceTypesListResult ¶
type EnabledResourceTypesListResult struct { // READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of EnabledResourceTypes available for a customLocation. Value []*EnabledResourceType `json:"value,omitempty" azure:"ro"` }
EnabledResourceTypesListResult - List of EnabledResourceTypes definition.
func (EnabledResourceTypesListResult) MarshalJSON ¶
func (e EnabledResourceTypesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnabledResourceTypesListResult.
func (*EnabledResourceTypesListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *EnabledResourceTypesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnabledResourceTypesListResult.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info 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.
func (ErrorAdditionalInfo) MarshalJSON ¶ added in v1.1.0
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
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.
func (*ErrorDetail) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller 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.).
func (ErrorResponse) MarshalJSON ¶ added in v1.1.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type HostType ¶
type HostType string
HostType - Type of host the Custom Locations is referencing (Kubernetes, etc…).
const (
HostTypeKubernetes HostType = "Kubernetes"
)
func PossibleHostTypeValues ¶
func PossibleHostTypeValues() []HostType
PossibleHostTypeValues returns the possible values for the HostType const type.
type Identity ¶
type Identity struct { // The identity type. Type *ResourceIdentityType `json:"type,omitempty"` // READ-ONLY; The principal ID of resource identity. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; The tenant ID of resource. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
Identity for the resource.
func (Identity) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Identity.
func (*Identity) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Identity.
type MatchExpressionsProperties ¶
type MatchExpressionsProperties struct { // Key is the label key that the selector applies to. Key *string `json:"key,omitempty"` // The Operator field represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. Operator *string `json:"operator,omitempty"` // The label value Values []*string `json:"values,omitempty"` }
MatchExpressionsProperties - Resource Sync Rules matchExpression property definition.
func (MatchExpressionsProperties) MarshalJSON ¶
func (m MatchExpressionsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MatchExpressionsProperties.
func (*MatchExpressionsProperties) UnmarshalJSON ¶
func (m *MatchExpressionsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MatchExpressionsProperties.
type PatchableCustomLocations ¶
type PatchableCustomLocations struct { // Identity for the resource. Identity *Identity `json:"identity,omitempty"` // The Custom Locations patchable properties. Properties *CustomLocationProperties `json:"properties,omitempty"` // Resource tags Tags map[string]*string `json:"tags,omitempty"` }
PatchableCustomLocations - The Custom Locations patchable resource definition.
func (PatchableCustomLocations) MarshalJSON ¶
func (p PatchableCustomLocations) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PatchableCustomLocations.
func (*PatchableCustomLocations) UnmarshalJSON ¶ added in v1.1.0
func (p *PatchableCustomLocations) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PatchableCustomLocations.
type PatchableResourceSyncRule ¶
type PatchableResourceSyncRule struct { // The Resource Sync Rules patchable properties. Properties *ResourceSyncRuleProperties `json:"properties,omitempty"` // Resource tags Tags map[string]*string `json:"tags,omitempty"` }
PatchableResourceSyncRule - The Resource Sync Rules patchable resource definition.
func (PatchableResourceSyncRule) MarshalJSON ¶
func (p PatchableResourceSyncRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PatchableResourceSyncRule.
func (*PatchableResourceSyncRule) UnmarshalJSON ¶
func (p *PatchableResourceSyncRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PatchableResourceSyncRule.
type ProxyResource ¶
type ProxyResource 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"` }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶ added in v1.1.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v1.1.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
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
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceIdentityType ¶
type ResourceIdentityType string
ResourceIdentityType - The identity type.
const ( ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" )
func PossibleResourceIdentityTypeValues ¶
func PossibleResourceIdentityTypeValues() []ResourceIdentityType
PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
type ResourceSyncRule ¶
type ResourceSyncRule struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // The set of properties specific to a Resource Sync Rule Properties *ResourceSyncRuleProperties `json:"properties,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; Metadata pertaining to creation and last modification of the 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"` }
ResourceSyncRule - Resource Sync Rules definition.
func (ResourceSyncRule) MarshalJSON ¶
func (r ResourceSyncRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSyncRule.
func (*ResourceSyncRule) UnmarshalJSON ¶
func (r *ResourceSyncRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSyncRule.
type ResourceSyncRuleListResult ¶
type ResourceSyncRuleListResult struct { // READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of Resource Sync Rules. Value []*ResourceSyncRule `json:"value,omitempty" azure:"ro"` }
ResourceSyncRuleListResult - The List Resource Sync Rules operation response.
func (ResourceSyncRuleListResult) MarshalJSON ¶
func (r ResourceSyncRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSyncRuleListResult.
func (*ResourceSyncRuleListResult) UnmarshalJSON ¶
func (r *ResourceSyncRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSyncRuleListResult.
type ResourceSyncRuleProperties ¶
type ResourceSyncRuleProperties struct { // Priority represents a priority of the Resource Sync Rule Priority *int32 `json:"priority,omitempty"` // A label selector is composed of two parts, matchLabels and matchExpressions. The first part, matchLabels is a map of {key,value} // pairs. A single {key,value} in the matchLabels map is equivalent to an // element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. // The second part, matchExpressions is a list of resource selector requirements. // Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. // The values set must be empty in the case of Exists and DoesNotExist. All of // the requirements, from both matchLabels and matchExpressions must all be satisfied in order to match. Selector *ResourceSyncRulePropertiesSelector `json:"selector,omitempty"` // For an unmapped custom resource, its labels will be used to find matching resource sync rules. If this resource sync rule // is one of the matching rules with highest priority, then the unmapped custom // resource will be projected to the target resource group associated with this resource sync rule. The user creating this // resource sync rule should have write permissions on the target resource group // and this write permission will be validated when creating the resource sync rule. TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` // READ-ONLY; Provisioning State for the Resource Sync Rule. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
ResourceSyncRuleProperties - Properties for a resource sync rule. For an unmapped custom resource, its labels will be used to find out matching resource sync rules using the selector property of the resource sync rule. If this resource sync rule has highest priority among all matching rules, then the unmapped custom resource will be projected to the target resource group associated with this resource sync rule.
func (ResourceSyncRuleProperties) MarshalJSON ¶
func (r ResourceSyncRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSyncRuleProperties.
func (*ResourceSyncRuleProperties) UnmarshalJSON ¶
func (r *ResourceSyncRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSyncRuleProperties.
type ResourceSyncRulePropertiesSelector ¶
type ResourceSyncRulePropertiesSelector struct { // MatchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. // The values set must be non-empty in the case of In and NotIn. The values set // must be empty in the case of Exists and DoesNotExist. MatchExpressions []*MatchExpressionsProperties `json:"matchExpressions,omitempty"` // MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, // whose key field is 'key', the operator is 'In', and the values // array contains only 'value'. MatchLabels map[string]*string `json:"matchLabels,omitempty"` }
ResourceSyncRulePropertiesSelector - A label selector is composed of two parts, matchLabels and matchExpressions. The first part, matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. The second part, matchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. The values set must be empty in the case of Exists and DoesNotExist. All of the requirements, from both matchLabels and matchExpressions must all be satisfied in order to match.
func (ResourceSyncRulePropertiesSelector) MarshalJSON ¶
func (r ResourceSyncRulePropertiesSelector) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSyncRulePropertiesSelector.
func (*ResourceSyncRulePropertiesSelector) UnmarshalJSON ¶
func (r *ResourceSyncRulePropertiesSelector) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSyncRulePropertiesSelector.
type ResourceSyncRulesClient ¶
type ResourceSyncRulesClient struct {
// contains filtered or unexported fields
}
ResourceSyncRulesClient contains the methods for the ResourceSyncRules group. Don't use this type directly, use NewResourceSyncRulesClient() instead.
func NewResourceSyncRulesClient ¶
func NewResourceSyncRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceSyncRulesClient, error)
NewResourceSyncRulesClient creates a new instance of ResourceSyncRulesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ResourceSyncRulesClient) BeginCreateOrUpdate ¶
func (client *ResourceSyncRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters ResourceSyncRule, options *ResourceSyncRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ResourceSyncRulesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource Group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. childResourceName - Resource Sync Rule name. parameters - Parameters supplied to create or update a Resource Sync Rule. options - ResourceSyncRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceSyncRulesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesCreate_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewResourceSyncRulesClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "testresourcegroup", "customLocation01", "resourceSyncRule01", armextendedlocation.ResourceSyncRule{ Location: to.Ptr("West US"), Properties: &armextendedlocation.ResourceSyncRuleProperties{ Priority: to.Ptr[int32](999), Selector: &armextendedlocation.ResourceSyncRulePropertiesSelector{ MatchExpressions: []*armextendedlocation.MatchExpressionsProperties{ { Key: to.Ptr("key4"), Operator: to.Ptr("In"), Values: []*string{ to.Ptr("value4")}, }}, MatchLabels: map[string]*string{ "key1": to.Ptr("value1"), }, }, TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*ResourceSyncRulesClient) BeginUpdate ¶
func (client *ResourceSyncRulesClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, parameters PatchableResourceSyncRule, options *ResourceSyncRulesClientBeginUpdateOptions) (*runtime.Poller[ResourceSyncRulesClientUpdateResponse], error)
BeginUpdate - Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. childResourceName - Resource Sync Rule name. parameters - The updatable fields of an existing Resource Sync Rule. options - ResourceSyncRulesClientBeginUpdateOptions contains the optional parameters for the ResourceSyncRulesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesPatch.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/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewResourceSyncRulesClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "testresourcegroup", "customLocation01", "resourceSyncRule01", armextendedlocation.PatchableResourceSyncRule{ Properties: &armextendedlocation.ResourceSyncRuleProperties{ TargetResourceGroup: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testrg/"), }, Tags: map[string]*string{ "tier": to.Ptr("testing"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*ResourceSyncRulesClient) Delete ¶
func (client *ResourceSyncRulesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *ResourceSyncRulesClientDeleteOptions) (ResourceSyncRulesClientDeleteResponse, error)
Delete - Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource Name, Resource Group, and Subscription Id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. childResourceName - Resource Sync Rule name. options - ResourceSyncRulesClientDeleteOptions contains the optional parameters for the ResourceSyncRulesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewResourceSyncRulesClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "testresourcegroup", "customLocation01", "resourceSyncRule01", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ResourceSyncRulesClient) Get ¶
func (client *ResourceSyncRulesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, childResourceName string, options *ResourceSyncRulesClientGetOptions) (ResourceSyncRulesClientGetResponse, error)
Get - Gets the details of the resourceSyncRule with a specified resource group, subscription id Custom Location resource name and Resource Sync Rule name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. childResourceName - Resource Sync Rule name. options - ResourceSyncRulesClientGetOptions contains the optional parameters for the ResourceSyncRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewResourceSyncRulesClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testresourcegroup", "customLocation01", "resourceSyncRule01", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ResourceSyncRulesClient) NewListByCustomLocationIDPager ¶
func (client *ResourceSyncRulesClient) NewListByCustomLocationIDPager(resourceGroupName string, resourceName string, options *ResourceSyncRulesClientListByCustomLocationIDOptions) *runtime.Pager[ResourceSyncRulesClientListByCustomLocationIDResponse]
NewListByCustomLocationIDPager - Gets a list of Resource Sync Rules in the specified subscription. The operation returns properties of each Resource Sync Rule If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-31-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - Custom Locations name. options - ResourceSyncRulesClientListByCustomLocationIDOptions contains the optional parameters for the ResourceSyncRulesClient.ListByCustomLocationID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesListByCustomLocationID.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/extendedlocation/armextendedlocation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armextendedlocation.NewResourceSyncRulesClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByCustomLocationIDPager("testresourcegroup", "customLocation01", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ResourceSyncRulesClientBeginCreateOrUpdateOptions ¶
type ResourceSyncRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ResourceSyncRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceSyncRulesClient.BeginCreateOrUpdate method.
type ResourceSyncRulesClientBeginUpdateOptions ¶
type ResourceSyncRulesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ResourceSyncRulesClientBeginUpdateOptions contains the optional parameters for the ResourceSyncRulesClient.BeginUpdate method.
type ResourceSyncRulesClientCreateOrUpdateResponse ¶
type ResourceSyncRulesClientCreateOrUpdateResponse struct {
ResourceSyncRule
}
ResourceSyncRulesClientCreateOrUpdateResponse contains the response from method ResourceSyncRulesClient.CreateOrUpdate.
type ResourceSyncRulesClientDeleteOptions ¶
type ResourceSyncRulesClientDeleteOptions struct { }
ResourceSyncRulesClientDeleteOptions contains the optional parameters for the ResourceSyncRulesClient.Delete method.
type ResourceSyncRulesClientDeleteResponse ¶
type ResourceSyncRulesClientDeleteResponse struct { }
ResourceSyncRulesClientDeleteResponse contains the response from method ResourceSyncRulesClient.Delete.
type ResourceSyncRulesClientGetOptions ¶
type ResourceSyncRulesClientGetOptions struct { }
ResourceSyncRulesClientGetOptions contains the optional parameters for the ResourceSyncRulesClient.Get method.
type ResourceSyncRulesClientGetResponse ¶
type ResourceSyncRulesClientGetResponse struct {
ResourceSyncRule
}
ResourceSyncRulesClientGetResponse contains the response from method ResourceSyncRulesClient.Get.
type ResourceSyncRulesClientListByCustomLocationIDOptions ¶
type ResourceSyncRulesClientListByCustomLocationIDOptions struct { }
ResourceSyncRulesClientListByCustomLocationIDOptions contains the optional parameters for the ResourceSyncRulesClient.ListByCustomLocationID method.
type ResourceSyncRulesClientListByCustomLocationIDResponse ¶
type ResourceSyncRulesClientListByCustomLocationIDResponse struct {
ResourceSyncRuleListResult
}
ResourceSyncRulesClientListByCustomLocationIDResponse contains the response from method ResourceSyncRulesClient.ListByCustomLocationID.
type ResourceSyncRulesClientUpdateResponse ¶
type ResourceSyncRulesClientUpdateResponse struct {
ResourceSyncRule
}
ResourceSyncRulesClientUpdateResponse contains the response from method ResourceSyncRulesClient.Update.
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 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.
func (*TrackedResource) UnmarshalJSON ¶ added in v1.1.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.