Documentation ¶
Index ¶
- type ActionType
- type Client
- func (client *Client) GetScope(ctx context.Context, scope string, defaultParam DefaultName, ...) (ClientGetScopeResponse, error)
- func (client *Client) GetTenant(ctx context.Context, defaultParam DefaultName, options *ClientGetTenantOptions) (ClientGetTenantResponse, error)
- func (client *Client) Put(ctx context.Context, defaultParam DefaultName, ...) (ClientPutResponse, error)
- type ClientFactory
- type ClientGetScopeOptions
- type ClientGetScopeResponse
- type ClientGetTenantOptions
- type ClientGetTenantResponse
- type ClientPutOptions
- type ClientPutResponse
- type CreatedByType
- type DataBoundary
- type DataBoundaryDefinition
- type DataBoundaryProperties
- type DefaultName
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type ProvisioningState
- type SystemData
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the DataBoundaries group. Don't use this type directly, use NewClient() instead.
func NewClient ¶
func NewClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)
NewClient creates a new instance of Client with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*Client) GetScope ¶
func (client *Client) GetScope(ctx context.Context, scope string, defaultParam DefaultName, options *ClientGetScopeOptions) (ClientGetScopeResponse, error)
GetScope - Get data boundary at specified scope If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-08-01
- scope - The scope at which the operation is performed.
- defaultParam - Default string modeled as parameter for auto generation to work correctly.
- options - ClientGetScopeOptions contains the optional parameters for the Client.GetScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d426a4238db8dcd4da1c03c2c380fa27628093e7/specification/resources/resource-manager/Microsoft.Resources/stable/2024-08-01/examples/GetScopedDataBoundary.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoundaries/armdataboundaries" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdataboundaries.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().GetScope(ctx, "subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/my-resource-group", armdataboundaries.DefaultNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataBoundaryDefinition = armdataboundaries.DataBoundaryDefinition{ // Name: to.Ptr("00000000-0000-0000-0000-000000000000"), // ID: to.Ptr("/providers/Microsoft.Resources/dataBoundaries/00000000-0000-0000-0000-000000000000"), // Properties: &armdataboundaries.DataBoundaryProperties{ // DataBoundary: to.Ptr(armdataboundaries.DataBoundaryEU), // ProvisioningState: to.Ptr(armdataboundaries.ProvisioningStateSucceeded), // }, // } }
Output:
func (*Client) GetTenant ¶
func (client *Client) GetTenant(ctx context.Context, defaultParam DefaultName, options *ClientGetTenantOptions) (ClientGetTenantResponse, error)
GetTenant - Get data boundary of tenant. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-08-01
- defaultParam - Default string modeled as parameter for auto generation to work correctly.
- options - ClientGetTenantOptions contains the optional parameters for the Client.GetTenant method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d426a4238db8dcd4da1c03c2c380fa27628093e7/specification/resources/resource-manager/Microsoft.Resources/stable/2024-08-01/examples/GetTenantDataBoundary.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoundaries/armdataboundaries" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdataboundaries.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().GetTenant(ctx, armdataboundaries.DefaultNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataBoundaryDefinition = armdataboundaries.DataBoundaryDefinition{ // Name: to.Ptr("00000000-0000-0000-0000-000000000000"), // ID: to.Ptr("/providers/Microsoft.Resources/dataBoundaries/00000000-0000-0000-0000-000000000000"), // Properties: &armdataboundaries.DataBoundaryProperties{ // DataBoundary: to.Ptr(armdataboundaries.DataBoundaryEU), // ProvisioningState: to.Ptr(armdataboundaries.ProvisioningStateSucceeded), // }, // } }
Output:
func (*Client) Put ¶
func (client *Client) Put(ctx context.Context, defaultParam DefaultName, dataBoundaryDefinition DataBoundaryDefinition, options *ClientPutOptions) (ClientPutResponse, error)
Put - Opt-in tenant to data boundary. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-08-01
- defaultParam - Default string modeled as parameter for auto generation to work correctly.
- dataBoundaryDefinition - The data boundary to opt the tenant to.
- options - ClientPutOptions contains the optional parameters for the Client.Put method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d426a4238db8dcd4da1c03c2c380fa27628093e7/specification/resources/resource-manager/Microsoft.Resources/stable/2024-08-01/examples/PutDataBoundary.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/databoundaries/armdataboundaries" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdataboundaries.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().Put(ctx, armdataboundaries.DefaultNameDefault, armdataboundaries.DataBoundaryDefinition{ Properties: &armdataboundaries.DataBoundaryProperties{ DataBoundary: to.Ptr(armdataboundaries.DataBoundaryEU), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataBoundaryDefinition = armdataboundaries.DataBoundaryDefinition{ // Name: to.Ptr("00000000-0000-0000-0000-000000000000"), // ID: to.Ptr("/providers/Microsoft.Resources/dataBoundaries/00000000-0000-0000-0000-000000000000"), // Properties: &armdataboundaries.DataBoundaryProperties{ // DataBoundary: to.Ptr(armdataboundaries.DataBoundaryEU), // ProvisioningState: to.Ptr(armdataboundaries.ProvisioningStateSucceeded), // }, // } }
Output:
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewClient ¶
func (c *ClientFactory) NewClient() *Client
NewClient creates a new instance of Client.
type ClientGetScopeOptions ¶
type ClientGetScopeOptions struct { }
ClientGetScopeOptions contains the optional parameters for the Client.GetScope method.
type ClientGetScopeResponse ¶
type ClientGetScopeResponse struct { // A data boundary definition. DataBoundaryDefinition }
ClientGetScopeResponse contains the response from method Client.GetScope.
type ClientGetTenantOptions ¶
type ClientGetTenantOptions struct { }
ClientGetTenantOptions contains the optional parameters for the Client.GetTenant method.
type ClientGetTenantResponse ¶
type ClientGetTenantResponse struct { // A data boundary definition. DataBoundaryDefinition }
ClientGetTenantResponse contains the response from method Client.GetTenant.
type ClientPutOptions ¶
type ClientPutOptions struct { }
ClientPutOptions contains the optional parameters for the Client.Put method.
type ClientPutResponse ¶
type ClientPutResponse struct { // A data boundary definition. DataBoundaryDefinition }
ClientPutResponse contains the response from method Client.Put.
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 DataBoundary ¶
type DataBoundary string
DataBoundary - The data boundary definition.
const ( DataBoundaryEU DataBoundary = "EU" DataBoundaryGlobal DataBoundary = "Global" DataBoundaryNotDefined DataBoundary = "NotDefined" )
func PossibleDataBoundaryValues ¶
func PossibleDataBoundaryValues() []DataBoundary
PossibleDataBoundaryValues returns the possible values for the DataBoundary const type.
type DataBoundaryDefinition ¶
type DataBoundaryDefinition struct { // Data boundary properties Properties *DataBoundaryProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
DataBoundaryDefinition - A data boundary definition.
func (DataBoundaryDefinition) MarshalJSON ¶
func (d DataBoundaryDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataBoundaryDefinition.
func (*DataBoundaryDefinition) UnmarshalJSON ¶
func (d *DataBoundaryDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataBoundaryDefinition.
type DataBoundaryProperties ¶
type DataBoundaryProperties struct { // The data boundary definition. DataBoundary *DataBoundary // READ-ONLY; Denotes the state of provisioning. ProvisioningState *ProvisioningState }
DataBoundaryProperties - Data boundary properties
func (DataBoundaryProperties) MarshalJSON ¶
func (d DataBoundaryProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataBoundaryProperties.
func (*DataBoundaryProperties) UnmarshalJSON ¶
func (d *DataBoundaryProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataBoundaryProperties.
type DefaultName ¶
type DefaultName string
const (
DefaultNameDefault DefaultName = "default"
)
func PossibleDefaultNameValues ¶
func PossibleDefaultNameValues() []DefaultName
PossibleDefaultNameValues returns the possible values for the DefaultName const type.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // 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 // 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 // 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 }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // 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 // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
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.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
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 ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Denotes the state of provisioning.
const ( ProvisioningStateAccepted ProvisioningState = "Accepted" ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateRunning ProvisioningState = "Running" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
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.