Documentation ¶
Index ¶
- type APIClient
- func (client *APIClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest, ...) (APIClientCheckNameAvailabilityResponse, error)
- func (client *APIClient) StartTenantBackfill(ctx context.Context, options *APIClientStartTenantBackfillOptions) (APIClientStartTenantBackfillResponse, error)
- func (client *APIClient) TenantBackfillStatus(ctx context.Context, options *APIClientTenantBackfillStatusOptions) (APIClientTenantBackfillStatusResponse, error)
- type APIClientCheckNameAvailabilityOptions
- type APIClientCheckNameAvailabilityResponse
- type APIClientCheckNameAvailabilityResult
- type APIClientStartTenantBackfillOptions
- type APIClientStartTenantBackfillResponse
- type APIClientStartTenantBackfillResult
- type APIClientTenantBackfillStatusOptions
- type APIClientTenantBackfillStatusResponse
- type APIClientTenantBackfillStatusResult
- type AzureAsyncOperationResults
- type CheckNameAvailabilityRequest
- type CheckNameAvailabilityResult
- type Client
- func (client *Client) BeginCreateOrUpdate(ctx context.Context, groupID string, ...) (ClientCreateOrUpdatePollerResponse, error)
- func (client *Client) BeginDelete(ctx context.Context, groupID string, options *ClientBeginDeleteOptions) (ClientDeletePollerResponse, error)
- func (client *Client) Get(ctx context.Context, groupID string, options *ClientGetOptions) (ClientGetResponse, error)
- func (client *Client) GetDescendants(groupID string, options *ClientGetDescendantsOptions) *ClientGetDescendantsPager
- func (client *Client) List(options *ClientListOptions) *ClientListPager
- func (client *Client) Update(ctx context.Context, groupID string, ...) (ClientUpdateResponse, error)
- type ClientBeginCreateOrUpdateOptions
- type ClientBeginDeleteOptions
- type ClientCreateOrUpdatePoller
- func (p *ClientCreateOrUpdatePoller) Done() bool
- func (p *ClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ClientCreateOrUpdateResponse, error)
- func (p *ClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error)
- func (p *ClientCreateOrUpdatePoller) ResumeToken() (string, error)
- type ClientCreateOrUpdatePollerResponse
- type ClientCreateOrUpdateResponse
- type ClientCreateOrUpdateResult
- type ClientDeletePoller
- type ClientDeletePollerResponse
- type ClientDeleteResponse
- type ClientDeleteResult
- type ClientGetDescendantsOptions
- type ClientGetDescendantsPager
- type ClientGetDescendantsResponse
- type ClientGetDescendantsResult
- type ClientGetOptions
- type ClientGetResponse
- type ClientGetResult
- type ClientListOptions
- type ClientListPager
- type ClientListResponse
- type ClientListResult
- type ClientUpdateOptions
- type ClientUpdateResponse
- type ClientUpdateResult
- type CreateManagementGroupChildInfo
- type CreateManagementGroupDetails
- type CreateManagementGroupProperties
- type CreateManagementGroupRequest
- type CreateOrUpdateSettingsProperties
- type CreateOrUpdateSettingsRequest
- type CreateParentGroupInfo
- type DescendantInfo
- type DescendantInfoProperties
- type DescendantListResult
- type DescendantParentGroupInfo
- type EntitiesClient
- type EntitiesClientListOptions
- type EntitiesClientListPager
- type EntitiesClientListResponse
- type EntitiesClientListResult
- type EntityInfo
- type EntityInfoProperties
- type EntityListResult
- type EntityParentGroupInfo
- type EntitySearchType
- type EntityViewParameterType
- type HierarchySettings
- type HierarchySettingsClient
- func (client *HierarchySettingsClient) CreateOrUpdate(ctx context.Context, groupID string, ...) (HierarchySettingsClientCreateOrUpdateResponse, error)
- func (client *HierarchySettingsClient) Delete(ctx context.Context, groupID string, ...) (HierarchySettingsClientDeleteResponse, error)
- func (client *HierarchySettingsClient) Get(ctx context.Context, groupID string, ...) (HierarchySettingsClientGetResponse, error)
- func (client *HierarchySettingsClient) List(ctx context.Context, groupID string, ...) (HierarchySettingsClientListResponse, error)
- func (client *HierarchySettingsClient) Update(ctx context.Context, groupID string, ...) (HierarchySettingsClientUpdateResponse, error)
- type HierarchySettingsClientCreateOrUpdateOptions
- type HierarchySettingsClientCreateOrUpdateResponse
- type HierarchySettingsClientCreateOrUpdateResult
- type HierarchySettingsClientDeleteOptions
- type HierarchySettingsClientDeleteResponse
- type HierarchySettingsClientGetOptions
- type HierarchySettingsClientGetResponse
- type HierarchySettingsClientGetResult
- type HierarchySettingsClientListOptions
- type HierarchySettingsClientListResponse
- type HierarchySettingsClientListResult
- type HierarchySettingsClientUpdateOptions
- type HierarchySettingsClientUpdateResponse
- type HierarchySettingsClientUpdateResult
- type HierarchySettingsInfo
- type HierarchySettingsList
- type HierarchySettingsProperties
- type ListSubscriptionUnderManagementGroup
- type ManagementGroup
- type ManagementGroupChildInfo
- type ManagementGroupChildType
- type ManagementGroupDetails
- type ManagementGroupExpandType
- type ManagementGroupInfo
- type ManagementGroupInfoProperties
- type ManagementGroupListResult
- type ManagementGroupPathElement
- type ManagementGroupProperties
- type ManagementGroupSubscriptionsClient
- func (client *ManagementGroupSubscriptionsClient) Create(ctx context.Context, groupID string, subscriptionID string, ...) (ManagementGroupSubscriptionsClientCreateResponse, error)
- func (client *ManagementGroupSubscriptionsClient) Delete(ctx context.Context, groupID string, subscriptionID string, ...) (ManagementGroupSubscriptionsClientDeleteResponse, error)
- func (client *ManagementGroupSubscriptionsClient) GetSubscription(ctx context.Context, groupID string, subscriptionID string, ...) (ManagementGroupSubscriptionsClientGetSubscriptionResponse, error)
- func (client *ManagementGroupSubscriptionsClient) GetSubscriptionsUnderManagementGroup(groupID string, ...) *ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager
- type ManagementGroupSubscriptionsClientCreateOptions
- type ManagementGroupSubscriptionsClientCreateResponse
- type ManagementGroupSubscriptionsClientCreateResult
- type ManagementGroupSubscriptionsClientDeleteOptions
- type ManagementGroupSubscriptionsClientDeleteResponse
- type ManagementGroupSubscriptionsClientGetSubscriptionOptions
- type ManagementGroupSubscriptionsClientGetSubscriptionResponse
- type ManagementGroupSubscriptionsClientGetSubscriptionResult
- type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupOptions
- type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager
- func (p *ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager) Err() error
- func (p *ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager) NextPage(ctx context.Context) bool
- func (p *ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager) PageResponse() ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResponse
- type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResponse
- type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResult
- type Operation
- type OperationDisplayProperties
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListPager
- type OperationsClientListResponse
- type OperationsClientListResult
- type ParentGroupInfo
- type PatchManagementGroupRequest
- type Permissions
- type Reason
- type Status
- type SubscriptionUnderManagementGroup
- type SubscriptionUnderManagementGroupProperties
- type TenantBackfillStatusResult
Examples ¶
- APIClient.CheckNameAvailability
- APIClient.StartTenantBackfill
- APIClient.TenantBackfillStatus
- Client.BeginCreateOrUpdate
- Client.BeginDelete
- Client.Get
- Client.GetDescendants
- Client.List
- Client.Update
- EntitiesClient.List
- HierarchySettingsClient.CreateOrUpdate
- HierarchySettingsClient.Delete
- HierarchySettingsClient.Get
- HierarchySettingsClient.List
- HierarchySettingsClient.Update
- ManagementGroupSubscriptionsClient.Create
- ManagementGroupSubscriptionsClient.Delete
- ManagementGroupSubscriptionsClient.GetSubscription
- ManagementGroupSubscriptionsClient.GetSubscriptionsUnderManagementGroup
- OperationsClient.List
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶ added in v0.3.0
type APIClient struct {
// contains filtered or unexported fields
}
APIClient contains the methods for the ManagementGroupsAPI group. Don't use this type directly, use NewAPIClient() instead.
func NewAPIClient ¶ added in v0.3.0
func NewAPIClient(credential azcore.TokenCredential, options *arm.ClientOptions) *APIClient
NewAPIClient creates a new instance of APIClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*APIClient) CheckNameAvailability ¶ added in v0.3.0
func (client *APIClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest, options *APIClientCheckNameAvailabilityOptions) (APIClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - Checks if the specified management group name is valid and unique If the operation fails it returns an *azcore.ResponseError type. checkNameAvailabilityRequest - Management group name availability check parameters. options - APIClientCheckNameAvailabilityOptions contains the optional parameters for the APIClient.CheckNameAvailability method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/CheckManagementGroupNameAvailability.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/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewAPIClient(cred, nil) res, err := client.CheckNameAvailability(ctx, armmanagementgroups.CheckNameAvailabilityRequest{ Name: to.StringPtr("<name>"), Type: to.StringPtr("<type>"), }, nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.APIClientCheckNameAvailabilityResult) }
Output:
func (*APIClient) StartTenantBackfill ¶ added in v0.3.0
func (client *APIClient) StartTenantBackfill(ctx context.Context, options *APIClientStartTenantBackfillOptions) (APIClientStartTenantBackfillResponse, error)
StartTenantBackfill - Starts backfilling subscriptions for the Tenant. If the operation fails it returns an *azcore.ResponseError type. options - APIClientStartTenantBackfillOptions contains the optional parameters for the APIClient.StartTenantBackfill method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/StartTenantBackfillRequest.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewAPIClient(cred, nil) res, err := client.StartTenantBackfill(ctx, nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.APIClientStartTenantBackfillResult) }
Output:
func (*APIClient) TenantBackfillStatus ¶ added in v0.3.0
func (client *APIClient) TenantBackfillStatus(ctx context.Context, options *APIClientTenantBackfillStatusOptions) (APIClientTenantBackfillStatusResponse, error)
TenantBackfillStatus - Gets tenant backfill status If the operation fails it returns an *azcore.ResponseError type. options - APIClientTenantBackfillStatusOptions contains the optional parameters for the APIClient.TenantBackfillStatus method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/TenantBackfillStatusRequest.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewAPIClient(cred, nil) res, err := client.TenantBackfillStatus(ctx, nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.APIClientTenantBackfillStatusResult) }
Output:
type APIClientCheckNameAvailabilityOptions ¶ added in v0.3.0
type APIClientCheckNameAvailabilityOptions struct { }
APIClientCheckNameAvailabilityOptions contains the optional parameters for the APIClient.CheckNameAvailability method.
type APIClientCheckNameAvailabilityResponse ¶ added in v0.3.0
type APIClientCheckNameAvailabilityResponse struct { APIClientCheckNameAvailabilityResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
APIClientCheckNameAvailabilityResponse contains the response from method APIClient.CheckNameAvailability.
type APIClientCheckNameAvailabilityResult ¶ added in v0.3.0
type APIClientCheckNameAvailabilityResult struct {
CheckNameAvailabilityResult
}
APIClientCheckNameAvailabilityResult contains the result from method APIClient.CheckNameAvailability.
type APIClientStartTenantBackfillOptions ¶ added in v0.3.0
type APIClientStartTenantBackfillOptions struct { }
APIClientStartTenantBackfillOptions contains the optional parameters for the APIClient.StartTenantBackfill method.
type APIClientStartTenantBackfillResponse ¶ added in v0.3.0
type APIClientStartTenantBackfillResponse struct { APIClientStartTenantBackfillResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
APIClientStartTenantBackfillResponse contains the response from method APIClient.StartTenantBackfill.
type APIClientStartTenantBackfillResult ¶ added in v0.3.0
type APIClientStartTenantBackfillResult struct {
TenantBackfillStatusResult
}
APIClientStartTenantBackfillResult contains the result from method APIClient.StartTenantBackfill.
type APIClientTenantBackfillStatusOptions ¶ added in v0.3.0
type APIClientTenantBackfillStatusOptions struct { }
APIClientTenantBackfillStatusOptions contains the optional parameters for the APIClient.TenantBackfillStatus method.
type APIClientTenantBackfillStatusResponse ¶ added in v0.3.0
type APIClientTenantBackfillStatusResponse struct { APIClientTenantBackfillStatusResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
APIClientTenantBackfillStatusResponse contains the response from method APIClient.TenantBackfillStatus.
type APIClientTenantBackfillStatusResult ¶ added in v0.3.0
type APIClientTenantBackfillStatusResult struct {
TenantBackfillStatusResult
}
APIClientTenantBackfillStatusResult contains the result from method APIClient.TenantBackfillStatus.
type AzureAsyncOperationResults ¶
type AzureAsyncOperationResults struct { // The generic properties of a management group. Properties *ManagementGroupInfoProperties `json:"properties,omitempty"` // READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000 Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The current status of the asynchronous operation performed . For example, Running, Succeeded, Failed Status *string `json:"status,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups Type *string `json:"type,omitempty" azure:"ro"` }
AzureAsyncOperationResults - The results of Azure-AsyncOperation.
type CheckNameAvailabilityRequest ¶
type CheckNameAvailabilityRequest struct { // the name to check for availability Name *string `json:"name,omitempty"` // fully qualified resource type which includes provider namespace Type *string `json:"type,omitempty"` }
CheckNameAvailabilityRequest - Management group name availability check parameters.
type CheckNameAvailabilityResult ¶
type CheckNameAvailabilityResult struct { // READ-ONLY; Required if nameAvailable == false. Localized. If reason == invalid, provide the user with the reason why the // given name is invalid, and provide the resource naming requirements so that the user can // select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different // name. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` // READ-ONLY; Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's // naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists // indicates that the name is already in use and is therefore unavailable. Reason *Reason `json:"reason,omitempty" azure:"ro"` }
CheckNameAvailabilityResult - Describes the result of the request to check management group name availability.
type Client ¶ added in v0.3.0
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the ManagementGroups group. Don't use this type directly, use NewClient() instead.
func NewClient ¶ added in v0.3.0
func NewClient(credential azcore.TokenCredential, options *arm.ClientOptions) *Client
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) BeginCreateOrUpdate ¶ added in v0.3.0
func (client *Client) BeginCreateOrUpdate(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, options *ClientBeginCreateOrUpdateOptions) (ClientCreateOrUpdatePollerResponse, error)
BeginCreateOrUpdate - Create or update a management group. If a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. createManagementGroupRequest - Management group creation parameters. options - ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/PutManagementGroup.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewClient(cred, nil) poller, err := client.BeginCreateOrUpdate(ctx, "<group-id>", armmanagementgroups.CreateManagementGroupRequest{ Properties: &armmanagementgroups.CreateManagementGroupProperties{ DisplayName: to.StringPtr("<display-name>"), Details: &armmanagementgroups.CreateManagementGroupDetails{ Parent: &armmanagementgroups.CreateParentGroupInfo{ ID: to.StringPtr("<id>"), }, }, }, }, &armmanagementgroups.ClientBeginCreateOrUpdateOptions{CacheControl: to.StringPtr("<cache-control>")}) if err != nil { log.Fatal(err) } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.ClientCreateOrUpdateResult) }
Output:
func (*Client) BeginDelete ¶ added in v0.3.0
func (client *Client) BeginDelete(ctx context.Context, groupID string, options *ClientBeginDeleteOptions) (ClientDeletePollerResponse, error)
BeginDelete - Delete management group. If a management group contains child resources, the request will fail. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. options - ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/DeleteManagementGroup.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewClient(cred, nil) poller, err := client.BeginDelete(ctx, "<group-id>", &armmanagementgroups.ClientBeginDeleteOptions{CacheControl: to.StringPtr("<cache-control>")}) if err != nil { log.Fatal(err) } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatal(err) } }
Output:
func (*Client) Get ¶ added in v0.3.0
func (client *Client) Get(ctx context.Context, groupID string, options *ClientGetOptions) (ClientGetResponse, error)
Get - Get the details of the management group. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetManagementGroup.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/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewClient(cred, nil) res, err := client.Get(ctx, "<group-id>", &armmanagementgroups.ClientGetOptions{Expand: nil, Recurse: nil, Filter: nil, CacheControl: to.StringPtr("<cache-control>"), }) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.ClientGetResult) }
Output:
func (*Client) GetDescendants ¶ added in v0.3.0
func (client *Client) GetDescendants(groupID string, options *ClientGetDescendantsOptions) *ClientGetDescendantsPager
GetDescendants - List all entities that descend from a management group. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. options - ClientGetDescendantsOptions contains the optional parameters for the Client.GetDescendants method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetDescendants.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewClient(cred, nil) pager := client.GetDescendants("<group-id>", &armmanagementgroups.ClientGetDescendantsOptions{Skiptoken: nil, Top: nil, }) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
func (*Client) List ¶ added in v0.3.0
func (client *Client) List(options *ClientListOptions) *ClientListPager
List - List management groups for the authenticated user. If the operation fails it returns an *azcore.ResponseError type. options - ClientListOptions contains the optional parameters for the Client.List method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/ListManagementGroups.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/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewClient(cred, nil) pager := client.List(&armmanagementgroups.ClientListOptions{CacheControl: to.StringPtr("<cache-control>"), Skiptoken: nil, }) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
func (*Client) Update ¶ added in v0.3.0
func (client *Client) Update(ctx context.Context, groupID string, patchGroupRequest PatchManagementGroupRequest, options *ClientUpdateOptions) (ClientUpdateResponse, error)
Update - Update a management group. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. patchGroupRequest - Management group patch parameters. options - ClientUpdateOptions contains the optional parameters for the Client.Update method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/PatchManagementGroup.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/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewClient(cred, nil) res, err := client.Update(ctx, "<group-id>", armmanagementgroups.PatchManagementGroupRequest{ DisplayName: to.StringPtr("<display-name>"), ParentGroupID: to.StringPtr("<parent-group-id>"), }, &armmanagementgroups.ClientUpdateOptions{CacheControl: to.StringPtr("<cache-control>")}) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.ClientUpdateResult) }
Output:
type ClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ClientBeginCreateOrUpdateOptions struct { // Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. CacheControl *string }
ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.
type ClientBeginDeleteOptions ¶ added in v0.3.0
type ClientBeginDeleteOptions struct { // Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. CacheControl *string }
ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.
type ClientCreateOrUpdatePoller ¶ added in v0.3.0
type ClientCreateOrUpdatePoller struct {
// contains filtered or unexported fields
}
ClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.
func (*ClientCreateOrUpdatePoller) Done ¶ added in v0.3.0
func (p *ClientCreateOrUpdatePoller) Done() bool
Done returns true if the LRO has reached a terminal state.
func (*ClientCreateOrUpdatePoller) FinalResponse ¶ added in v0.3.0
func (p *ClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ClientCreateOrUpdateResponse, error)
FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ClientCreateOrUpdateResponse will be returned.
func (*ClientCreateOrUpdatePoller) Poll ¶ added in v0.3.0
Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.
func (*ClientCreateOrUpdatePoller) ResumeToken ¶ added in v0.3.0
func (p *ClientCreateOrUpdatePoller) ResumeToken() (string, error)
ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.
type ClientCreateOrUpdatePollerResponse ¶ added in v0.3.0
type ClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. Poller *ClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ClientCreateOrUpdatePollerResponse contains the response from method Client.CreateOrUpdate.
func (ClientCreateOrUpdatePollerResponse) PollUntilDone ¶ added in v0.3.0
func (l ClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ClientCreateOrUpdateResponse, error)
PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.
type ClientCreateOrUpdateResponse ¶ added in v0.3.0
type ClientCreateOrUpdateResponse struct { ClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ClientCreateOrUpdateResponse contains the response from method Client.CreateOrUpdate.
type ClientCreateOrUpdateResult ¶ added in v0.3.0
type ClientCreateOrUpdateResult struct {
ManagementGroup
}
ClientCreateOrUpdateResult contains the result from method Client.CreateOrUpdate.
type ClientDeletePoller ¶ added in v0.3.0
type ClientDeletePoller struct {
// contains filtered or unexported fields
}
ClientDeletePoller provides polling facilities until the operation reaches a terminal state.
func (*ClientDeletePoller) Done ¶ added in v0.3.0
func (p *ClientDeletePoller) Done() bool
Done returns true if the LRO has reached a terminal state.
func (*ClientDeletePoller) FinalResponse ¶ added in v0.3.0
func (p *ClientDeletePoller) FinalResponse(ctx context.Context) (ClientDeleteResponse, error)
FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ClientDeleteResponse will be returned.
func (*ClientDeletePoller) Poll ¶ added in v0.3.0
Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.
func (*ClientDeletePoller) ResumeToken ¶ added in v0.3.0
func (p *ClientDeletePoller) ResumeToken() (string, error)
ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.
type ClientDeletePollerResponse ¶ added in v0.3.0
type ClientDeletePollerResponse struct { // Poller contains an initialized poller. Poller *ClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ClientDeletePollerResponse contains the response from method Client.Delete.
func (ClientDeletePollerResponse) PollUntilDone ¶ added in v0.3.0
func (l ClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ClientDeleteResponse, error)
PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.
type ClientDeleteResponse ¶ added in v0.3.0
type ClientDeleteResponse struct { ClientDeleteResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ClientDeleteResponse contains the response from method Client.Delete.
type ClientDeleteResult ¶ added in v0.3.0
type ClientDeleteResult struct {
AzureAsyncOperationResults
}
ClientDeleteResult contains the result from method Client.Delete.
type ClientGetDescendantsOptions ¶ added in v0.3.0
type ClientGetDescendantsOptions struct { // Page continuation token is only used if a previous operation returned a partial result. If a previous response contains // a nextLink element, the value of the nextLink element will include a token // parameter that specifies a starting point to use for subsequent calls. Skiptoken *string // Number of elements to return when retrieving results. Passing this in will override $skipToken. Top *int32 }
ClientGetDescendantsOptions contains the optional parameters for the Client.GetDescendants method.
type ClientGetDescendantsPager ¶ added in v0.3.0
type ClientGetDescendantsPager struct {
// contains filtered or unexported fields
}
ClientGetDescendantsPager provides operations for iterating over paged responses.
func (*ClientGetDescendantsPager) Err ¶ added in v0.3.0
func (p *ClientGetDescendantsPager) Err() error
Err returns the last error encountered while paging.
func (*ClientGetDescendantsPager) NextPage ¶ added in v0.3.0
func (p *ClientGetDescendantsPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*ClientGetDescendantsPager) PageResponse ¶ added in v0.3.0
func (p *ClientGetDescendantsPager) PageResponse() ClientGetDescendantsResponse
PageResponse returns the current ClientGetDescendantsResponse page.
type ClientGetDescendantsResponse ¶ added in v0.3.0
type ClientGetDescendantsResponse struct { ClientGetDescendantsResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ClientGetDescendantsResponse contains the response from method Client.GetDescendants.
type ClientGetDescendantsResult ¶ added in v0.3.0
type ClientGetDescendantsResult struct {
DescendantListResult
}
ClientGetDescendantsResult contains the result from method Client.GetDescendants.
type ClientGetOptions ¶ added in v0.3.0
type ClientGetOptions struct { // Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. CacheControl *string // The $expand=children query string parameter allows clients to request inclusion of children in the response payload. $expand=path // includes the path from the root group to the current group. // $expand=ancestors includes the ancestor Ids of the current group. Expand *ManagementGroupExpandType // A filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType ne Subscription') Filter *string // The $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response payload. // Note that $expand=children must be passed up if $recurse is set to true. Recurse *bool }
ClientGetOptions contains the optional parameters for the Client.Get method.
type ClientGetResponse ¶ added in v0.3.0
type ClientGetResponse struct { ClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ClientGetResponse contains the response from method Client.Get.
type ClientGetResult ¶ added in v0.3.0
type ClientGetResult struct {
ManagementGroup
}
ClientGetResult contains the result from method Client.Get.
type ClientListOptions ¶ added in v0.3.0
type ClientListOptions struct { // Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. CacheControl *string // Page continuation token is only used if a previous operation returned a partial result. If a previous response contains // a nextLink element, the value of the nextLink element will include a token // parameter that specifies a starting point to use for subsequent calls. Skiptoken *string }
ClientListOptions contains the optional parameters for the Client.List method.
type ClientListPager ¶ added in v0.3.0
type ClientListPager struct {
// contains filtered or unexported fields
}
ClientListPager provides operations for iterating over paged responses.
func (*ClientListPager) Err ¶ added in v0.3.0
func (p *ClientListPager) Err() error
Err returns the last error encountered while paging.
func (*ClientListPager) NextPage ¶ added in v0.3.0
func (p *ClientListPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*ClientListPager) PageResponse ¶ added in v0.3.0
func (p *ClientListPager) PageResponse() ClientListResponse
PageResponse returns the current ClientListResponse page.
type ClientListResponse ¶ added in v0.3.0
type ClientListResponse struct { ClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ClientListResponse contains the response from method Client.List.
type ClientListResult ¶ added in v0.3.0
type ClientListResult struct {
ManagementGroupListResult
}
ClientListResult contains the result from method Client.List.
type ClientUpdateOptions ¶ added in v0.3.0
type ClientUpdateOptions struct { // Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. CacheControl *string }
ClientUpdateOptions contains the optional parameters for the Client.Update method.
type ClientUpdateResponse ¶ added in v0.3.0
type ClientUpdateResponse struct { ClientUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ClientUpdateResponse contains the response from method Client.Update.
type ClientUpdateResult ¶ added in v0.3.0
type ClientUpdateResult struct {
ManagementGroup
}
ClientUpdateResult contains the result from method Client.Update.
type CreateManagementGroupChildInfo ¶
type CreateManagementGroupChildInfo struct { // READ-ONLY; The list of children. Children []*CreateManagementGroupChildInfo `json:"children,omitempty" azure:"ro"` // READ-ONLY; The friendly name of the child resource. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the child entity. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups) Type *ManagementGroupChildType `json:"type,omitempty" azure:"ro"` }
CreateManagementGroupChildInfo - The child information of a management group used during creation.
func (CreateManagementGroupChildInfo) MarshalJSON ¶
func (c CreateManagementGroupChildInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateManagementGroupChildInfo.
type CreateManagementGroupDetails ¶
type CreateManagementGroupDetails struct { // (Optional) The ID of the parent management group used during creation. Parent *CreateParentGroupInfo `json:"parent,omitempty"` // READ-ONLY; The identity of the principal or process that updated the object. UpdatedBy *string `json:"updatedBy,omitempty" azure:"ro"` // READ-ONLY; The date and time when this object was last updated. UpdatedTime *time.Time `json:"updatedTime,omitempty" azure:"ro"` // READ-ONLY; The version number of the object. Version *int32 `json:"version,omitempty" azure:"ro"` }
CreateManagementGroupDetails - The details of a management group used during creation.
func (CreateManagementGroupDetails) MarshalJSON ¶
func (c CreateManagementGroupDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateManagementGroupDetails.
func (*CreateManagementGroupDetails) UnmarshalJSON ¶
func (c *CreateManagementGroupDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CreateManagementGroupDetails.
type CreateManagementGroupProperties ¶
type CreateManagementGroupProperties struct { // The details of a management group used during creation. Details *CreateManagementGroupDetails `json:"details,omitempty"` // The friendly name of the management group. If no value is passed then this field will be set to the groupId. DisplayName *string `json:"displayName,omitempty"` // READ-ONLY; The list of children. Children []*CreateManagementGroupChildInfo `json:"children,omitempty" azure:"ro"` // READ-ONLY; The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
CreateManagementGroupProperties - The generic properties of a management group used during creation.
func (CreateManagementGroupProperties) MarshalJSON ¶
func (c CreateManagementGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateManagementGroupProperties.
type CreateManagementGroupRequest ¶
type CreateManagementGroupRequest struct { // The name of the management group. For example, 00000000-0000-0000-0000-000000000000 Name *string `json:"name,omitempty"` // The generic properties of a management group used during creation. Properties *CreateManagementGroupProperties `json:"properties,omitempty"` // READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups Type *string `json:"type,omitempty" azure:"ro"` }
CreateManagementGroupRequest - Management group creation parameters.
type CreateOrUpdateSettingsProperties ¶
type CreateOrUpdateSettingsProperties struct { // Settings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup DefaultManagementGroup *string `json:"defaultManagementGroup,omitempty"` // Indicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will // require Microsoft.Management/managementGroups/write action on the root // Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating // new Management Groups, unless they are given access. RequireAuthorizationForGroupCreation *bool `json:"requireAuthorizationForGroupCreation,omitempty"` }
CreateOrUpdateSettingsProperties - The properties of the request to create or update Management Group settings
type CreateOrUpdateSettingsRequest ¶
type CreateOrUpdateSettingsRequest struct { // The properties of the request to create or update Management Group settings Properties *CreateOrUpdateSettingsProperties `json:"properties,omitempty"` }
CreateOrUpdateSettingsRequest - Parameters for creating or updating Management Group settings
func (CreateOrUpdateSettingsRequest) MarshalJSON ¶
func (c CreateOrUpdateSettingsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateOrUpdateSettingsRequest.
type CreateParentGroupInfo ¶
type CreateParentGroupInfo struct { // The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty"` // READ-ONLY; The friendly name of the parent management group. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; The name of the parent management group Name *string `json:"name,omitempty" azure:"ro"` }
CreateParentGroupInfo - (Optional) The ID of the parent management group used during creation.
type DescendantInfo ¶
type DescendantInfo struct { // The generic properties of an descendant. Properties *DescendantInfoProperties `json:"properties,omitempty"` // READ-ONLY; The fully qualified ID for the descendant. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 // or /subscriptions/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the descendant. For example, 00000000-0000-0000-0000-000000000000 Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups or /subscriptions Type *string `json:"type,omitempty" azure:"ro"` }
DescendantInfo - The descendant.
type DescendantInfoProperties ¶
type DescendantInfoProperties struct { // The friendly name of the management group. DisplayName *string `json:"displayName,omitempty"` // The ID of the parent management group. Parent *DescendantParentGroupInfo `json:"parent,omitempty"` }
DescendantInfoProperties - The generic properties of an descendant.
type DescendantListResult ¶
type DescendantListResult struct { // The list of descendants. Value []*DescendantInfo `json:"value,omitempty"` // READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
DescendantListResult - Describes the result of the request to view descendants.
func (DescendantListResult) MarshalJSON ¶
func (d DescendantListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DescendantListResult.
type DescendantParentGroupInfo ¶
type DescendantParentGroupInfo struct { // The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty"` }
DescendantParentGroupInfo - The ID of the parent management group.
type EntitiesClient ¶
type EntitiesClient struct {
// contains filtered or unexported fields
}
EntitiesClient contains the methods for the Entities group. Don't use this type directly, use NewEntitiesClient() instead.
func NewEntitiesClient ¶
func NewEntitiesClient(credential azcore.TokenCredential, options *arm.ClientOptions) *EntitiesClient
NewEntitiesClient creates a new instance of EntitiesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*EntitiesClient) List ¶
func (client *EntitiesClient) List(options *EntitiesClientListOptions) *EntitiesClientListPager
List - List all entities (Management Groups, Subscriptions, etc.) for the authenticated user. If the operation fails it returns an *azcore.ResponseError type. options - EntitiesClientListOptions contains the optional parameters for the EntitiesClient.List method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetEntities.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewEntitiesClient(cred, nil) pager := client.List(&armmanagementgroups.EntitiesClientListOptions{Skiptoken: nil, Skip: nil, Top: nil, Select: nil, Search: nil, Filter: nil, View: nil, GroupName: nil, CacheControl: nil, }) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
type EntitiesClientListOptions ¶ added in v0.3.0
type EntitiesClientListOptions struct { // Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. CacheControl *string // The filter parameter allows you to filter on the the name or display name fields. You can check for equality on the name // field (e.g. name eq '{entityName}') and you can check for substrings on either // the name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName, '{substringToSearch')). // Note that the '{entityName}' and '{substringToSearch}' fields are checked case // insensitively. Filter *string // A filter which allows the get entities call to focus on a particular group (i.e. "$filter=name eq 'groupName'") GroupName *string // The $search parameter is used in conjunction with the $filter parameter to return three different outputs depending on // the parameter passed in. With $search=AllowedParents the API will return the // entity info of all groups that the requested entity will be able to reparent to as determined by the user's permissions. // With $search=AllowedChildren the API will return the entity info of all // entities that can be added as children of the requested entity. With $search=ParentAndFirstLevelChildren the API will return // the parent and first level of children that the user has either direct // access to or indirect access via one of their descendants. With $search=ParentOnly the API will return only the group if // the user has access to at least one of the descendants of the group. With // $search=ChildrenOnly the API will return only the first level of children of the group entity info specified in $filter. // The user must have direct access to the children entities or one of it's // descendants for it to show up in the results. Search *EntitySearchType // This parameter specifies the fields to include in the response. Can include any combination of Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, // e.g. // '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the $select parameter can override // select in $skipToken. Select *string // Number of entities to skip over when retrieving results. Passing this in will override $skipToken. Skip *int32 // Page continuation token is only used if a previous operation returned a partial result. If a previous response contains // a nextLink element, the value of the nextLink element will include a token // parameter that specifies a starting point to use for subsequent calls. Skiptoken *string // Number of elements to return when retrieving results. Passing this in will override $skipToken. Top *int32 // The view parameter allows clients to filter the type of data that is returned by the getEntities call. View *EntityViewParameterType }
EntitiesClientListOptions contains the optional parameters for the EntitiesClient.List method.
type EntitiesClientListPager ¶ added in v0.3.0
type EntitiesClientListPager struct {
// contains filtered or unexported fields
}
EntitiesClientListPager provides operations for iterating over paged responses.
func (*EntitiesClientListPager) Err ¶ added in v0.3.0
func (p *EntitiesClientListPager) Err() error
Err returns the last error encountered while paging.
func (*EntitiesClientListPager) NextPage ¶ added in v0.3.0
func (p *EntitiesClientListPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*EntitiesClientListPager) PageResponse ¶ added in v0.3.0
func (p *EntitiesClientListPager) PageResponse() EntitiesClientListResponse
PageResponse returns the current EntitiesClientListResponse page.
type EntitiesClientListResponse ¶ added in v0.3.0
type EntitiesClientListResponse struct { EntitiesClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
EntitiesClientListResponse contains the response from method EntitiesClient.List.
type EntitiesClientListResult ¶ added in v0.3.0
type EntitiesClientListResult struct {
EntityListResult
}
EntitiesClientListResult contains the result from method EntitiesClient.List.
type EntityInfo ¶
type EntityInfo struct { // The generic properties of an entity. Properties *EntityInfoProperties `json:"properties,omitempty"` // READ-ONLY; The fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the entity. For example, 00000000-0000-0000-0000-000000000000 Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups Type *string `json:"type,omitempty" azure:"ro"` }
EntityInfo - The entity.
type EntityInfoProperties ¶
type EntityInfoProperties struct { // The friendly name of the management group. DisplayName *string `json:"displayName,omitempty"` // The users specific permissions to this item. InheritedPermissions *Permissions `json:"inheritedPermissions,omitempty"` // Number of children is the number of Groups that are exactly one level underneath the current Group. NumberOfChildGroups *int32 `json:"numberOfChildGroups,omitempty"` // Number of children is the number of Groups and Subscriptions that are exactly one level underneath the current Group. NumberOfChildren *int32 `json:"numberOfChildren,omitempty"` // Number of Descendants NumberOfDescendants *int32 `json:"numberOfDescendants,omitempty"` // (Optional) The ID of the parent management group. Parent *EntityParentGroupInfo `json:"parent,omitempty"` // The parent display name chain from the root group to the immediate parent ParentDisplayNameChain []*string `json:"parentDisplayNameChain,omitempty"` // The parent name chain from the root group to the immediate parent ParentNameChain []*string `json:"parentNameChain,omitempty"` // The users specific permissions to this item. Permissions *Permissions `json:"permissions,omitempty"` // The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000 TenantID *string `json:"tenantId,omitempty"` }
EntityInfoProperties - The generic properties of an entity.
func (EntityInfoProperties) MarshalJSON ¶
func (e EntityInfoProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EntityInfoProperties.
type EntityListResult ¶
type EntityListResult struct { // The list of entities. Value []*EntityInfo `json:"value,omitempty"` // READ-ONLY; Total count of records that match the filter Count *int32 `json:"count,omitempty" azure:"ro"` // READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
EntityListResult - Describes the result of the request to view entities.
func (EntityListResult) MarshalJSON ¶
func (e EntityListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EntityListResult.
type EntityParentGroupInfo ¶
type EntityParentGroupInfo struct { // The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty"` }
EntityParentGroupInfo - (Optional) The ID of the parent management group.
type EntitySearchType ¶ added in v0.4.0
type EntitySearchType string
const ( EntitySearchTypeAllowedChildren EntitySearchType = "AllowedChildren" EntitySearchTypeAllowedParents EntitySearchType = "AllowedParents" EntitySearchTypeChildrenOnly EntitySearchType = "ChildrenOnly" EntitySearchTypeParentAndFirstLevelChildren EntitySearchType = "ParentAndFirstLevelChildren" EntitySearchTypeParentOnly EntitySearchType = "ParentOnly" )
func PossibleEntitySearchTypeValues ¶ added in v0.4.0
func PossibleEntitySearchTypeValues() []EntitySearchType
PossibleEntitySearchTypeValues returns the possible values for the EntitySearchType const type.
func (EntitySearchType) ToPtr ¶ added in v0.4.0
func (c EntitySearchType) ToPtr() *EntitySearchType
ToPtr returns a *EntitySearchType pointing to the current value.
type EntityViewParameterType ¶ added in v0.4.0
type EntityViewParameterType string
const ( EntityViewParameterTypeAudit EntityViewParameterType = "Audit" EntityViewParameterTypeFullHierarchy EntityViewParameterType = "FullHierarchy" EntityViewParameterTypeGroupsOnly EntityViewParameterType = "GroupsOnly" EntityViewParameterTypeSubscriptionsOnly EntityViewParameterType = "SubscriptionsOnly" )
func PossibleEntityViewParameterTypeValues ¶ added in v0.4.0
func PossibleEntityViewParameterTypeValues() []EntityViewParameterType
PossibleEntityViewParameterTypeValues returns the possible values for the EntityViewParameterType const type.
func (EntityViewParameterType) ToPtr ¶ added in v0.4.0
func (c EntityViewParameterType) ToPtr() *EntityViewParameterType
ToPtr returns a *EntityViewParameterType pointing to the current value.
type HierarchySettings ¶
type HierarchySettings struct { // The generic properties of hierarchy settings. Properties *HierarchySettingsProperties `json:"properties,omitempty"` // READ-ONLY; The fully qualified ID for the settings object. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the object. In this case, default. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups/settings. Type *string `json:"type,omitempty" azure:"ro"` }
HierarchySettings - Settings defined at the Management Group scope.
type HierarchySettingsClient ¶
type HierarchySettingsClient struct {
// contains filtered or unexported fields
}
HierarchySettingsClient contains the methods for the HierarchySettings group. Don't use this type directly, use NewHierarchySettingsClient() instead.
func NewHierarchySettingsClient ¶
func NewHierarchySettingsClient(credential azcore.TokenCredential, options *arm.ClientOptions) *HierarchySettingsClient
NewHierarchySettingsClient creates a new instance of HierarchySettingsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*HierarchySettingsClient) CreateOrUpdate ¶
func (client *HierarchySettingsClient) CreateOrUpdate(ctx context.Context, groupID string, createTenantSettingsRequest CreateOrUpdateSettingsRequest, options *HierarchySettingsClientCreateOrUpdateOptions) (HierarchySettingsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates the hierarchy settings defined at the Management Group level. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. createTenantSettingsRequest - Tenant level settings request parameter. options - HierarchySettingsClientCreateOrUpdateOptions contains the optional parameters for the HierarchySettingsClient.CreateOrUpdate method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/PutHierarchySettings.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/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewHierarchySettingsClient(cred, nil) res, err := client.CreateOrUpdate(ctx, "<group-id>", armmanagementgroups.CreateOrUpdateSettingsRequest{ Properties: &armmanagementgroups.CreateOrUpdateSettingsProperties{ DefaultManagementGroup: to.StringPtr("<default-management-group>"), RequireAuthorizationForGroupCreation: to.BoolPtr(true), }, }, nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.HierarchySettingsClientCreateOrUpdateResult) }
Output:
func (*HierarchySettingsClient) Delete ¶
func (client *HierarchySettingsClient) Delete(ctx context.Context, groupID string, options *HierarchySettingsClientDeleteOptions) (HierarchySettingsClientDeleteResponse, error)
Delete - Deletes the hierarchy settings defined at the Management Group level. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. options - HierarchySettingsClientDeleteOptions contains the optional parameters for the HierarchySettingsClient.Delete method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/DeleteHierarchySettings.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewHierarchySettingsClient(cred, nil) _, err = client.Delete(ctx, "<group-id>", nil) if err != nil { log.Fatal(err) } }
Output:
func (*HierarchySettingsClient) Get ¶
func (client *HierarchySettingsClient) Get(ctx context.Context, groupID string, options *HierarchySettingsClientGetOptions) (HierarchySettingsClientGetResponse, error)
Get - Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. options - HierarchySettingsClientGetOptions contains the optional parameters for the HierarchySettingsClient.Get method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetHierarchySettings.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewHierarchySettingsClient(cred, nil) res, err := client.Get(ctx, "<group-id>", nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.HierarchySettingsClientGetResult) }
Output:
func (*HierarchySettingsClient) List ¶
func (client *HierarchySettingsClient) List(ctx context.Context, groupID string, options *HierarchySettingsClientListOptions) (HierarchySettingsClientListResponse, error)
List - Gets all the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. options - HierarchySettingsClientListOptions contains the optional parameters for the HierarchySettingsClient.List method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/ListHierarchySettings.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewHierarchySettingsClient(cred, nil) res, err := client.List(ctx, "<group-id>", nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.HierarchySettingsClientListResult) }
Output:
func (*HierarchySettingsClient) Update ¶
func (client *HierarchySettingsClient) Update(ctx context.Context, groupID string, createTenantSettingsRequest CreateOrUpdateSettingsRequest, options *HierarchySettingsClientUpdateOptions) (HierarchySettingsClientUpdateResponse, error)
Update - Updates the hierarchy settings defined at the Management Group level. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. createTenantSettingsRequest - Tenant level settings request parameter. options - HierarchySettingsClientUpdateOptions contains the optional parameters for the HierarchySettingsClient.Update method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/PatchHierarchySettings.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/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewHierarchySettingsClient(cred, nil) res, err := client.Update(ctx, "<group-id>", armmanagementgroups.CreateOrUpdateSettingsRequest{ Properties: &armmanagementgroups.CreateOrUpdateSettingsProperties{ DefaultManagementGroup: to.StringPtr("<default-management-group>"), RequireAuthorizationForGroupCreation: to.BoolPtr(true), }, }, nil) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.HierarchySettingsClientUpdateResult) }
Output:
type HierarchySettingsClientCreateOrUpdateOptions ¶ added in v0.3.0
type HierarchySettingsClientCreateOrUpdateOptions struct { }
HierarchySettingsClientCreateOrUpdateOptions contains the optional parameters for the HierarchySettingsClient.CreateOrUpdate method.
type HierarchySettingsClientCreateOrUpdateResponse ¶ added in v0.3.0
type HierarchySettingsClientCreateOrUpdateResponse struct { HierarchySettingsClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
HierarchySettingsClientCreateOrUpdateResponse contains the response from method HierarchySettingsClient.CreateOrUpdate.
type HierarchySettingsClientCreateOrUpdateResult ¶ added in v0.3.0
type HierarchySettingsClientCreateOrUpdateResult struct {
HierarchySettings
}
HierarchySettingsClientCreateOrUpdateResult contains the result from method HierarchySettingsClient.CreateOrUpdate.
type HierarchySettingsClientDeleteOptions ¶ added in v0.3.0
type HierarchySettingsClientDeleteOptions struct { }
HierarchySettingsClientDeleteOptions contains the optional parameters for the HierarchySettingsClient.Delete method.
type HierarchySettingsClientDeleteResponse ¶ added in v0.3.0
type HierarchySettingsClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
HierarchySettingsClientDeleteResponse contains the response from method HierarchySettingsClient.Delete.
type HierarchySettingsClientGetOptions ¶ added in v0.3.0
type HierarchySettingsClientGetOptions struct { }
HierarchySettingsClientGetOptions contains the optional parameters for the HierarchySettingsClient.Get method.
type HierarchySettingsClientGetResponse ¶ added in v0.3.0
type HierarchySettingsClientGetResponse struct { HierarchySettingsClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
HierarchySettingsClientGetResponse contains the response from method HierarchySettingsClient.Get.
type HierarchySettingsClientGetResult ¶ added in v0.3.0
type HierarchySettingsClientGetResult struct {
HierarchySettings
}
HierarchySettingsClientGetResult contains the result from method HierarchySettingsClient.Get.
type HierarchySettingsClientListOptions ¶ added in v0.3.0
type HierarchySettingsClientListOptions struct { }
HierarchySettingsClientListOptions contains the optional parameters for the HierarchySettingsClient.List method.
type HierarchySettingsClientListResponse ¶ added in v0.3.0
type HierarchySettingsClientListResponse struct { HierarchySettingsClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
HierarchySettingsClientListResponse contains the response from method HierarchySettingsClient.List.
type HierarchySettingsClientListResult ¶ added in v0.3.0
type HierarchySettingsClientListResult struct {
HierarchySettingsList
}
HierarchySettingsClientListResult contains the result from method HierarchySettingsClient.List.
type HierarchySettingsClientUpdateOptions ¶ added in v0.3.0
type HierarchySettingsClientUpdateOptions struct { }
HierarchySettingsClientUpdateOptions contains the optional parameters for the HierarchySettingsClient.Update method.
type HierarchySettingsClientUpdateResponse ¶ added in v0.3.0
type HierarchySettingsClientUpdateResponse struct { HierarchySettingsClientUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
HierarchySettingsClientUpdateResponse contains the response from method HierarchySettingsClient.Update.
type HierarchySettingsClientUpdateResult ¶ added in v0.3.0
type HierarchySettingsClientUpdateResult struct {
HierarchySettings
}
HierarchySettingsClientUpdateResult contains the result from method HierarchySettingsClient.Update.
type HierarchySettingsInfo ¶
type HierarchySettingsInfo struct { // The generic properties of hierarchy settings. Properties *HierarchySettingsProperties `json:"properties,omitempty"` // READ-ONLY; The fully qualified ID for the settings object. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the object. In this case, default. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups/settings. Type *string `json:"type,omitempty" azure:"ro"` }
HierarchySettingsInfo - The hierarchy settings resource.
type HierarchySettingsList ¶
type HierarchySettingsList struct { // The list of hierarchy settings. Value []*HierarchySettingsInfo `json:"value,omitempty"` // READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
HierarchySettingsList - Lists all hierarchy settings.
func (HierarchySettingsList) MarshalJSON ¶
func (h HierarchySettingsList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HierarchySettingsList.
type HierarchySettingsProperties ¶
type HierarchySettingsProperties struct { // Settings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup DefaultManagementGroup *string `json:"defaultManagementGroup,omitempty"` // Indicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will // require Microsoft.Management/managementGroups/write action on the root // Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating // new Management Groups, unless they are given access. RequireAuthorizationForGroupCreation *bool `json:"requireAuthorizationForGroupCreation,omitempty"` // The AAD Tenant ID associated with the hierarchy settings. For example, 00000000-0000-0000-0000-000000000000 TenantID *string `json:"tenantId,omitempty"` }
HierarchySettingsProperties - The generic properties of hierarchy settings.
type ListSubscriptionUnderManagementGroup ¶
type ListSubscriptionUnderManagementGroup struct { // The list of subscriptions. Value []*SubscriptionUnderManagementGroup `json:"value,omitempty"` // READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
ListSubscriptionUnderManagementGroup - The details of all subscriptions under management group.
func (ListSubscriptionUnderManagementGroup) MarshalJSON ¶
func (l ListSubscriptionUnderManagementGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListSubscriptionUnderManagementGroup.
type ManagementGroup ¶
type ManagementGroup struct { // The generic properties of a management group. Properties *ManagementGroupProperties `json:"properties,omitempty"` // READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000 Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups Type *string `json:"type,omitempty" azure:"ro"` }
ManagementGroup - The management group details.
type ManagementGroupChildInfo ¶
type ManagementGroupChildInfo struct { // The list of children. Children []*ManagementGroupChildInfo `json:"children,omitempty"` // The friendly name of the child resource. DisplayName *string `json:"displayName,omitempty"` // The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty"` // The name of the child entity. Name *string `json:"name,omitempty"` // The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups) Type *ManagementGroupChildType `json:"type,omitempty"` }
ManagementGroupChildInfo - The child information of a management group.
func (ManagementGroupChildInfo) MarshalJSON ¶
func (m ManagementGroupChildInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementGroupChildInfo.
type ManagementGroupChildType ¶
type ManagementGroupChildType string
ManagementGroupChildType - The type of child resource.
const ( ManagementGroupChildTypeMicrosoftManagementManagementGroups ManagementGroupChildType = "Microsoft.Management/managementGroups" ManagementGroupChildTypeSubscriptions ManagementGroupChildType = "/subscriptions" )
func PossibleManagementGroupChildTypeValues ¶
func PossibleManagementGroupChildTypeValues() []ManagementGroupChildType
PossibleManagementGroupChildTypeValues returns the possible values for the ManagementGroupChildType const type.
func (ManagementGroupChildType) ToPtr ¶
func (c ManagementGroupChildType) ToPtr() *ManagementGroupChildType
ToPtr returns a *ManagementGroupChildType pointing to the current value.
type ManagementGroupDetails ¶
type ManagementGroupDetails struct { // The ancestors of the management group. ManagementGroupAncestors []*string `json:"managementGroupAncestors,omitempty"` // The ancestors of the management group displayed in reversed order, from immediate parent to the root. ManagementGroupAncestorsChain []*ManagementGroupPathElement `json:"managementGroupAncestorsChain,omitempty"` // (Optional) The ID of the parent management group. Parent *ParentGroupInfo `json:"parent,omitempty"` // The path from the root to the current group. Path []*ManagementGroupPathElement `json:"path,omitempty"` // The identity of the principal or process that updated the object. UpdatedBy *string `json:"updatedBy,omitempty"` // The date and time when this object was last updated. UpdatedTime *time.Time `json:"updatedTime,omitempty"` // The version number of the object. Version *int32 `json:"version,omitempty"` }
ManagementGroupDetails - The details of a management group.
func (ManagementGroupDetails) MarshalJSON ¶
func (m ManagementGroupDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementGroupDetails.
func (*ManagementGroupDetails) UnmarshalJSON ¶
func (m *ManagementGroupDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementGroupDetails.
type ManagementGroupExpandType ¶ added in v0.4.0
type ManagementGroupExpandType string
const ( ManagementGroupExpandTypeAncestors ManagementGroupExpandType = "ancestors" ManagementGroupExpandTypeChildren ManagementGroupExpandType = "children" ManagementGroupExpandTypePath ManagementGroupExpandType = "path" )
func PossibleManagementGroupExpandTypeValues ¶ added in v0.4.0
func PossibleManagementGroupExpandTypeValues() []ManagementGroupExpandType
PossibleManagementGroupExpandTypeValues returns the possible values for the ManagementGroupExpandType const type.
func (ManagementGroupExpandType) ToPtr ¶ added in v0.4.0
func (c ManagementGroupExpandType) ToPtr() *ManagementGroupExpandType
ToPtr returns a *ManagementGroupExpandType pointing to the current value.
type ManagementGroupInfo ¶
type ManagementGroupInfo struct { // The generic properties of a management group. Properties *ManagementGroupInfoProperties `json:"properties,omitempty"` // READ-ONLY; The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000 Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups Type *string `json:"type,omitempty" azure:"ro"` }
ManagementGroupInfo - The management group resource.
type ManagementGroupInfoProperties ¶
type ManagementGroupInfoProperties struct { // The friendly name of the management group. DisplayName *string `json:"displayName,omitempty"` // The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 TenantID *string `json:"tenantId,omitempty"` }
ManagementGroupInfoProperties - The generic properties of a management group.
type ManagementGroupListResult ¶
type ManagementGroupListResult struct { // The list of management groups. Value []*ManagementGroupInfo `json:"value,omitempty"` // READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
ManagementGroupListResult - Describes the result of the request to list management groups.
func (ManagementGroupListResult) MarshalJSON ¶
func (m ManagementGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementGroupListResult.
type ManagementGroupPathElement ¶
type ManagementGroupPathElement struct { // The friendly name of the group. DisplayName *string `json:"displayName,omitempty"` // The name of the group. Name *string `json:"name,omitempty"` }
ManagementGroupPathElement - A path element of a management group ancestors.
type ManagementGroupProperties ¶
type ManagementGroupProperties struct { // The list of children. Children []*ManagementGroupChildInfo `json:"children,omitempty"` // The details of a management group. Details *ManagementGroupDetails `json:"details,omitempty"` // The friendly name of the management group. DisplayName *string `json:"displayName,omitempty"` // The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 TenantID *string `json:"tenantId,omitempty"` }
ManagementGroupProperties - The generic properties of a management group.
func (ManagementGroupProperties) MarshalJSON ¶
func (m ManagementGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementGroupProperties.
type ManagementGroupSubscriptionsClient ¶
type ManagementGroupSubscriptionsClient struct {
// contains filtered or unexported fields
}
ManagementGroupSubscriptionsClient contains the methods for the ManagementGroupSubscriptions group. Don't use this type directly, use NewManagementGroupSubscriptionsClient() instead.
func NewManagementGroupSubscriptionsClient ¶
func NewManagementGroupSubscriptionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) *ManagementGroupSubscriptionsClient
NewManagementGroupSubscriptionsClient creates a new instance of ManagementGroupSubscriptionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ManagementGroupSubscriptionsClient) Create ¶
func (client *ManagementGroupSubscriptionsClient) Create(ctx context.Context, groupID string, subscriptionID string, options *ManagementGroupSubscriptionsClientCreateOptions) (ManagementGroupSubscriptionsClientCreateResponse, error)
Create - Associates existing subscription with the management group. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. subscriptionID - Subscription ID. options - ManagementGroupSubscriptionsClientCreateOptions contains the optional parameters for the ManagementGroupSubscriptionsClient.Create method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/AddManagementGroupSubscription.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/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewManagementGroupSubscriptionsClient(cred, nil) res, err := client.Create(ctx, "<group-id>", "<subscription-id>", &armmanagementgroups.ManagementGroupSubscriptionsClientCreateOptions{CacheControl: to.StringPtr("<cache-control>")}) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.ManagementGroupSubscriptionsClientCreateResult) }
Output:
func (*ManagementGroupSubscriptionsClient) Delete ¶
func (client *ManagementGroupSubscriptionsClient) Delete(ctx context.Context, groupID string, subscriptionID string, options *ManagementGroupSubscriptionsClientDeleteOptions) (ManagementGroupSubscriptionsClientDeleteResponse, error)
Delete - De-associates subscription from the management group. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. subscriptionID - Subscription ID. options - ManagementGroupSubscriptionsClientDeleteOptions contains the optional parameters for the ManagementGroupSubscriptionsClient.Delete method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/RemoveManagementGroupSubscription.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/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewManagementGroupSubscriptionsClient(cred, nil) _, err = client.Delete(ctx, "<group-id>", "<subscription-id>", &armmanagementgroups.ManagementGroupSubscriptionsClientDeleteOptions{CacheControl: to.StringPtr("<cache-control>")}) if err != nil { log.Fatal(err) } }
Output:
func (*ManagementGroupSubscriptionsClient) GetSubscription ¶
func (client *ManagementGroupSubscriptionsClient) GetSubscription(ctx context.Context, groupID string, subscriptionID string, options *ManagementGroupSubscriptionsClientGetSubscriptionOptions) (ManagementGroupSubscriptionsClientGetSubscriptionResponse, error)
GetSubscription - Retrieves details about given subscription which is associated with the management group. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. subscriptionID - Subscription ID. options - ManagementGroupSubscriptionsClientGetSubscriptionOptions contains the optional parameters for the ManagementGroupSubscriptionsClient.GetSubscription method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetSubscriptionFromManagementGroup.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/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewManagementGroupSubscriptionsClient(cred, nil) res, err := client.GetSubscription(ctx, "<group-id>", "<subscription-id>", &armmanagementgroups.ManagementGroupSubscriptionsClientGetSubscriptionOptions{CacheControl: to.StringPtr("<cache-control>")}) if err != nil { log.Fatal(err) } log.Printf("Response result: %#v\n", res.ManagementGroupSubscriptionsClientGetSubscriptionResult) }
Output:
func (*ManagementGroupSubscriptionsClient) GetSubscriptionsUnderManagementGroup ¶
func (client *ManagementGroupSubscriptionsClient) GetSubscriptionsUnderManagementGroup(groupID string, options *ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupOptions) *ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager
GetSubscriptionsUnderManagementGroup - Retrieves details about all subscriptions which are associated with the management group. If the operation fails it returns an *azcore.ResponseError type. groupID - Management Group ID. options - ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupOptions contains the optional parameters for the ManagementGroupSubscriptionsClient.GetSubscriptionsUnderManagementGroup method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetAllSubscriptionsFromManagementGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewManagementGroupSubscriptionsClient(cred, nil) pager := client.GetSubscriptionsUnderManagementGroup("<group-id>", &armmanagementgroups.ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupOptions{Skiptoken: nil}) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
type ManagementGroupSubscriptionsClientCreateOptions ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientCreateOptions struct { // Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. CacheControl *string }
ManagementGroupSubscriptionsClientCreateOptions contains the optional parameters for the ManagementGroupSubscriptionsClient.Create method.
type ManagementGroupSubscriptionsClientCreateResponse ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientCreateResponse struct { ManagementGroupSubscriptionsClientCreateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ManagementGroupSubscriptionsClientCreateResponse contains the response from method ManagementGroupSubscriptionsClient.Create.
type ManagementGroupSubscriptionsClientCreateResult ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientCreateResult struct {
SubscriptionUnderManagementGroup
}
ManagementGroupSubscriptionsClientCreateResult contains the result from method ManagementGroupSubscriptionsClient.Create.
type ManagementGroupSubscriptionsClientDeleteOptions ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientDeleteOptions struct { // Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. CacheControl *string }
ManagementGroupSubscriptionsClientDeleteOptions contains the optional parameters for the ManagementGroupSubscriptionsClient.Delete method.
type ManagementGroupSubscriptionsClientDeleteResponse ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ManagementGroupSubscriptionsClientDeleteResponse contains the response from method ManagementGroupSubscriptionsClient.Delete.
type ManagementGroupSubscriptionsClientGetSubscriptionOptions ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientGetSubscriptionOptions struct { // Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. CacheControl *string }
ManagementGroupSubscriptionsClientGetSubscriptionOptions contains the optional parameters for the ManagementGroupSubscriptionsClient.GetSubscription method.
type ManagementGroupSubscriptionsClientGetSubscriptionResponse ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientGetSubscriptionResponse struct { ManagementGroupSubscriptionsClientGetSubscriptionResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ManagementGroupSubscriptionsClientGetSubscriptionResponse contains the response from method ManagementGroupSubscriptionsClient.GetSubscription.
type ManagementGroupSubscriptionsClientGetSubscriptionResult ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientGetSubscriptionResult struct {
SubscriptionUnderManagementGroup
}
ManagementGroupSubscriptionsClientGetSubscriptionResult contains the result from method ManagementGroupSubscriptionsClient.GetSubscription.
type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupOptions ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupOptions struct { // Page continuation token is only used if a previous operation returned a partial result. If a previous response contains // a nextLink element, the value of the nextLink element will include a token // parameter that specifies a starting point to use for subsequent calls. Skiptoken *string }
ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupOptions contains the optional parameters for the ManagementGroupSubscriptionsClient.GetSubscriptionsUnderManagementGroup method.
type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager struct {
// contains filtered or unexported fields
}
ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager provides operations for iterating over paged responses.
func (*ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager) Err ¶ added in v0.3.0
Err returns the last error encountered while paging.
func (*ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager) NextPage ¶ added in v0.3.0
func (p *ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager) PageResponse ¶ added in v0.3.0
func (p *ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupPager) PageResponse() ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResponse
PageResponse returns the current ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResponse page.
type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResponse ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResponse struct { ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResponse contains the response from method ManagementGroupSubscriptionsClient.GetSubscriptionsUnderManagementGroup.
type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResult ¶ added in v0.3.0
type ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResult struct {
ListSubscriptionUnderManagementGroup
}
ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupResult contains the result from method ManagementGroupSubscriptionsClient.GetSubscriptionsUnderManagementGroup.
type Operation ¶
type Operation struct { // The object that represents the operation. Display *OperationDisplayProperties `json:"display,omitempty"` // READ-ONLY; Operation name: {provider}/{resource}/{operation}. Name *string `json:"name,omitempty" azure:"ro"` }
Operation supported by the Microsoft.Management resource provider.
type OperationDisplayProperties ¶
type OperationDisplayProperties struct { // READ-ONLY; Operation description. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The operation that can be performed. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The name of the provider. Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; The resource on which the operation is performed. Resource *string `json:"resource,omitempty" azure:"ro"` }
OperationDisplayProperties - The object that represents the operation.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of operations supported by the Microsoft.Management resource provider. Value []*Operation `json:"value,omitempty" azure:"ro"` }
OperationListResult - Describes the result of the request to list Microsoft.Management operations.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) *OperationsClient
NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*OperationsClient) List ¶
func (client *OperationsClient) List(options *OperationsClientListOptions) *OperationsClientListPager
List - Lists all of the available Management REST API operations. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
x-ms-original-file: specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/ListOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client := armmanagementgroups.NewOperationsClient(cred, nil) pager := client.List(nil) for { nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } if !nextResult { break } for _, v := range pager.PageResponse().Value { log.Printf("Pager result: %#v\n", v) } } }
Output:
type OperationsClientListOptions ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListPager ¶ added in v0.3.0
type OperationsClientListPager struct {
// contains filtered or unexported fields
}
OperationsClientListPager provides operations for iterating over paged responses.
func (*OperationsClientListPager) Err ¶ added in v0.3.0
func (p *OperationsClientListPager) Err() error
Err returns the last error encountered while paging.
func (*OperationsClientListPager) NextPage ¶ added in v0.3.0
func (p *OperationsClientListPager) NextPage(ctx context.Context) bool
NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.
func (*OperationsClientListPager) PageResponse ¶ added in v0.3.0
func (p *OperationsClientListPager) PageResponse() OperationsClientListResponse
PageResponse returns the current OperationsClientListResponse page.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct { OperationsClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response }
OperationsClientListResponse contains the response from method OperationsClient.List.
type OperationsClientListResult ¶ added in v0.3.0
type OperationsClientListResult struct {
OperationListResult
}
OperationsClientListResult contains the result from method OperationsClient.List.
type ParentGroupInfo ¶
type ParentGroupInfo struct { // The friendly name of the parent management group. DisplayName *string `json:"displayName,omitempty"` // The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ID *string `json:"id,omitempty"` // The name of the parent management group Name *string `json:"name,omitempty"` }
ParentGroupInfo - (Optional) The ID of the parent management group.
type PatchManagementGroupRequest ¶
type PatchManagementGroupRequest struct { // The friendly name of the management group. DisplayName *string `json:"displayName,omitempty"` // (Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 ParentGroupID *string `json:"parentGroupId,omitempty"` }
PatchManagementGroupRequest - Management group patch parameters.
func (PatchManagementGroupRequest) MarshalJSON ¶
func (p PatchManagementGroupRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PatchManagementGroupRequest.
type Permissions ¶
type Permissions string
Permissions - The users specific permissions to this item.
const ( PermissionsDelete Permissions = "delete" PermissionsEdit Permissions = "edit" PermissionsNoaccess Permissions = "noaccess" PermissionsView Permissions = "view" )
func PossiblePermissionsValues ¶
func PossiblePermissionsValues() []Permissions
PossiblePermissionsValues returns the possible values for the Permissions const type.
func (Permissions) ToPtr ¶
func (c Permissions) ToPtr() *Permissions
ToPtr returns a *Permissions pointing to the current value.
type Reason ¶
type Reason string
Reason - Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.
func PossibleReasonValues ¶
func PossibleReasonValues() []Reason
PossibleReasonValues returns the possible values for the Reason const type.
type Status ¶
type Status string
Status - The status of the Tenant Backfill
func PossibleStatusValues ¶
func PossibleStatusValues() []Status
PossibleStatusValues returns the possible values for the Status const type.
type SubscriptionUnderManagementGroup ¶
type SubscriptionUnderManagementGroup struct { // The generic properties of subscription under a management group. Properties *SubscriptionUnderManagementGroupProperties `json:"properties,omitempty"` // READ-ONLY; The fully qualified ID for the subscription. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/subscriptions/0000000-0000-0000-0000-000000000001 ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The stringified id of the subscription. For example, 00000000-0000-0000-0000-000000000000 Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. For example, Microsoft.Management/managementGroups/subscriptions Type *string `json:"type,omitempty" azure:"ro"` }
SubscriptionUnderManagementGroup - The details of subscription under management group.
type SubscriptionUnderManagementGroupProperties ¶
type SubscriptionUnderManagementGroupProperties struct { // The friendly name of the subscription. DisplayName *string `json:"displayName,omitempty"` // The ID of the parent management group. Parent *DescendantParentGroupInfo `json:"parent,omitempty"` // The state of the subscription. State *string `json:"state,omitempty"` // The AAD Tenant ID associated with the subscription. For example, 00000000-0000-0000-0000-000000000000 Tenant *string `json:"tenant,omitempty"` }
SubscriptionUnderManagementGroupProperties - The generic properties of subscription under a management group.
type TenantBackfillStatusResult ¶
type TenantBackfillStatusResult struct { // READ-ONLY; The status of the Tenant Backfill Status *Status `json:"status,omitempty" azure:"ro"` // READ-ONLY; The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
TenantBackfillStatusResult - The tenant backfill status
Source Files ¶
- build.go
- zz_generated_api_client.go
- zz_generated_client.go
- zz_generated_constants.go
- zz_generated_entities_client.go
- zz_generated_hierarchysettings_client.go
- zz_generated_managementgroupsubscriptions_client.go
- zz_generated_models.go
- zz_generated_operations_client.go
- zz_generated_pagers.go
- zz_generated_pollers.go
- zz_generated_response_types.go
- zz_generated_time_rfc3339.go