managementgroups

package
v44.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package managementgroups implements the Azure ARM Managementgroups service API version 2017-11-01-preview.

The Azure Management Groups API enables consolidation of multiple subscriptions/resources into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those resources.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Managementgroups
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI string
}

BaseClient is the base client for Managementgroups.

func New

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type ChildInfo

type ChildInfo struct {
	// ChildType - Possible values include: 'ChildTypeManagementGroup', 'ChildTypeSubscription'
	ChildType ChildType `json:"childType,omitempty"`
	// ChildID - The fully qualified ID for the child resource (management group or subscription).  For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
	ChildID *string `json:"childId,omitempty"`
	// DisplayName - The friendly name of the child resource.
	DisplayName *string `json:"displayName,omitempty"`
	// Children - The list of children.
	Children *[]ChildInfo `json:"children,omitempty"`
}

ChildInfo the child information of a management group.

type ChildType

type ChildType string

ChildType enumerates the values for child type.

const (
	// ChildTypeManagementGroup ...
	ChildTypeManagementGroup ChildType = "ManagementGroup"
	// ChildTypeSubscription ...
	ChildTypeSubscription ChildType = "Subscription"
)

func PossibleChildTypeValues

func PossibleChildTypeValues() []ChildType

PossibleChildTypeValues returns an array of possible values for the ChildType const type.

type Client

type Client struct {
	BaseClient
}

Client is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those resources.

func NewClient

func NewClient() Client

NewClient creates an instance of the Client client.

func NewClientWithBaseURI

func NewClientWithBaseURI(baseURI string) Client

NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (Client) CreateOrUpdate

func (client Client) CreateOrUpdate(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (result ManagementGroup, err error)

CreateOrUpdate 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. Parameters: groupID - management Group ID. createManagementGroupRequest - management group creation parameters. cacheControl - indicates that the request shouldn't utilize any caches.

func (Client) CreateOrUpdatePreparer

func (client Client) CreateOrUpdatePreparer(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (Client) CreateOrUpdateResponder

func (client Client) CreateOrUpdateResponder(resp *http.Response) (result ManagementGroup, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (Client) CreateOrUpdateSender

func (client Client) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (Client) Delete

func (client Client) Delete(ctx context.Context, groupID string, cacheControl string) (result autorest.Response, err error)

Delete delete management group. If a management group contains child resources, the request will fail. Parameters: groupID - management Group ID. cacheControl - indicates that the request shouldn't utilize any caches.

func (Client) DeletePreparer

func (client Client) DeletePreparer(ctx context.Context, groupID string, cacheControl string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (Client) DeleteResponder

func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (Client) DeleteSender

func (client Client) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (Client) Get

func (client Client) Get(ctx context.Context, groupID string, expand string, recurse *bool, cacheControl string) (result ManagementGroup, err error)

Get get the details of the management group. Parameters: groupID - management Group ID. expand - the $expand=children query string parameter allows clients to request inclusion of children in the response payload. recurse - the $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response payload. cacheControl - indicates that the request shouldn't utilize any caches.

func (Client) GetPreparer

func (client Client) GetPreparer(ctx context.Context, groupID string, expand string, recurse *bool, cacheControl string) (*http.Request, error)

GetPreparer prepares the Get request.

func (Client) GetResponder

func (client Client) GetResponder(resp *http.Response) (result ManagementGroup, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (Client) GetSender

func (client Client) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (Client) List

func (client Client) List(ctx context.Context, cacheControl string, skiptoken string) (result ListResultPage, err error)

List list management groups for the authenticated user. Parameters: cacheControl - indicates that the request shouldn't utilize any caches. skiptoken - 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.

func (Client) ListComplete

func (client Client) ListComplete(ctx context.Context, cacheControl string, skiptoken string) (result ListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (Client) ListPreparer

func (client Client) ListPreparer(ctx context.Context, cacheControl string, skiptoken string) (*http.Request, error)

ListPreparer prepares the List request.

func (Client) ListResponder

func (client Client) ListResponder(resp *http.Response) (result ListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (Client) ListSender

func (client Client) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

func (Client) Update

func (client Client) Update(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (result ManagementGroup, err error)

Update update a management group. Parameters: groupID - management Group ID. createManagementGroupRequest - management group creation parameters. cacheControl - indicates that the request shouldn't utilize any caches.

func (Client) UpdatePreparer

func (client Client) UpdatePreparer(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (Client) UpdateResponder

func (client Client) UpdateResponder(resp *http.Response) (result ManagementGroup, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (Client) UpdateSender

func (client Client) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type CreateManagementGroupRequest

type CreateManagementGroupRequest struct {
	// DisplayName - The friendly name of the management group.
	DisplayName *string `json:"displayName,omitempty"`
	// ParentID - (Optional) The fully qualified ID for the parent management group.  For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
	ParentID *string `json:"parentId,omitempty"`
}

CreateManagementGroupRequest management group creation parameters.

type Details

type Details struct {
	// Version - The version number of the object.
	Version *float64 `json:"version,omitempty"`
	// UpdatedTime - The date and time when this object was last updated.
	UpdatedTime *date.Time `json:"updatedTime,omitempty"`
	// UpdatedBy - The identity of the principal or process that updated the object.
	UpdatedBy *string          `json:"updatedBy,omitempty"`
	Parent    *ParentGroupInfo `json:"parent,omitempty"`
}

Details the details of a management group.

type ErrorDetails

type ErrorDetails struct {
	// Code - One of a server-defined set of error codes.
	Code *string `json:"code,omitempty"`
	// Message - A human-readable representation of the error.
	Message *string `json:"message,omitempty"`
}

ErrorDetails the details of the error.

type ErrorResponse

type ErrorResponse struct {
	Error *ErrorDetails `json:"error,omitempty"`
}

ErrorResponse the error object.

type Info

type Info struct {
	// ID - 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"`
	// Type - READ-ONLY; The type of the resource. For example, /providers/Microsoft.Management/managementGroups
	Type *string `json:"type,omitempty"`
	// Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000
	Name            *string `json:"name,omitempty"`
	*InfoProperties `json:"properties,omitempty"`
}

Info the management group resource.

func (Info) MarshalJSON

func (i Info) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Info.

func (*Info) UnmarshalJSON

func (i *Info) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Info struct.

type InfoProperties

type InfoProperties struct {
	// TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
	TenantID *string `json:"tenantId,omitempty"`
	// DisplayName - The friendly name of the management group.
	DisplayName *string `json:"displayName,omitempty"`
}

InfoProperties the generic properties of a management group.

type ListResult

type ListResult struct {
	autorest.Response `json:"-"`
	// Value - The list of management groups.
	Value *[]Info `json:"value,omitempty"`
	// NextLink - READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`
}

ListResult describes the result of the request to list management groups.

func (ListResult) IsEmpty

func (lr ListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type ListResultIterator

type ListResultIterator struct {
	// contains filtered or unexported fields
}

ListResultIterator provides access to a complete listing of Info values.

func NewListResultIterator

func NewListResultIterator(page ListResultPage) ListResultIterator

Creates a new instance of the ListResultIterator type.

func (*ListResultIterator) Next

func (iter *ListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ListResultIterator) NextWithContext

func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (ListResultIterator) NotDone

func (iter ListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (ListResultIterator) Response

func (iter ListResultIterator) Response() ListResult

Response returns the raw server response from the last page request.

func (ListResultIterator) Value

func (iter ListResultIterator) Value() Info

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type ListResultPage

type ListResultPage struct {
	// contains filtered or unexported fields
}

ListResultPage contains a page of Info values.

func NewListResultPage

func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage

Creates a new instance of the ListResultPage type.

func (*ListResultPage) Next

func (page *ListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ListResultPage) NextWithContext

func (page *ListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (ListResultPage) NotDone

func (page ListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (ListResultPage) Response

func (page ListResultPage) Response() ListResult

Response returns the raw server response from the last page request.

func (ListResultPage) Values

func (page ListResultPage) Values() []Info

Values returns the slice of values for the current page or nil if there are no values.

type ManagementGroup

type ManagementGroup struct {
	autorest.Response `json:"-"`
	// ID - 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"`
	// Type - READ-ONLY; The type of the resource.  For example, /providers/Microsoft.Management/managementGroups
	Type *string `json:"type,omitempty"`
	// Name - READ-ONLY; The name of the management group. For example, 00000000-0000-0000-0000-000000000000
	Name        *string `json:"name,omitempty"`
	*Properties `json:"properties,omitempty"`
}

ManagementGroup the management group details.

func (ManagementGroup) MarshalJSON

func (mg ManagementGroup) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ManagementGroup.

func (*ManagementGroup) UnmarshalJSON

func (mg *ManagementGroup) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ManagementGroup struct.

type Operation

type Operation struct {
	// Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}.
	Name *string `json:"name,omitempty"`
	// Display - The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation operation supported by the Microsoft.Management resource provider.

type OperationDisplay

type OperationDisplay struct {
	// Provider - READ-ONLY; The name of the provider.
	Provider *string `json:"provider,omitempty"`
	// Resource - READ-ONLY; The resource on which the operation is performed.
	Resource *string `json:"resource,omitempty"`
	// Operation - READ-ONLY; The operation that can be performed.
	Operation *string `json:"operation,omitempty"`
	// Description - READ-ONLY; Operation description.
	Description *string `json:"description,omitempty"`
}

OperationDisplay the object that represents the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; List of operations supported by the Microsoft.Management resource provider.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult describes the result of the request to list Microsoft.Management operations.

func (OperationListResult) IsEmpty

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator

type OperationListResultIterator struct {
	// contains filtered or unexported fields
}

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next

func (iter *OperationListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultIterator) NextWithContext

func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (OperationListResultIterator) NotDone

func (iter OperationListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (OperationListResultIterator) Response

Response returns the raw server response from the last page request.

func (OperationListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type OperationListResultPage

type OperationListResultPage struct {
	// contains filtered or unexported fields
}

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage

func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next

func (page *OperationListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultPage) NextWithContext

func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (OperationListResultPage) NotDone

func (page OperationListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (OperationListResultPage) Response

Response returns the raw server response from the last page request.

func (OperationListResultPage) Values

func (page OperationListResultPage) Values() []Operation

Values returns the slice of values for the current page or nil if there are no values.

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those resources.

func NewOperationsClient

func NewOperationsClient() OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (OperationsClient) List

func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available Management REST API operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ParentGroupInfo

type ParentGroupInfo struct {
	// ParentID - The fully qualified ID for the parent management group.  For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
	ParentID *string `json:"parentId,omitempty"`
	// DisplayName - The friendly name of the parent management group.
	DisplayName *string `json:"displayName,omitempty"`
}

ParentGroupInfo (Optional) The ID of the parent management group.

type Properties

type Properties struct {
	// TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
	TenantID *string `json:"tenantId,omitempty"`
	// DisplayName - The friendly name of the management group.
	DisplayName *string  `json:"displayName,omitempty"`
	Details     *Details `json:"details,omitempty"`
	// Children - The list of children.
	Children *[]ChildInfo `json:"children,omitempty"`
}

Properties the generic properties of a management group.

type SubscriptionsClient

type SubscriptionsClient struct {
	BaseClient
}

SubscriptionsClient is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those resources.

func NewSubscriptionsClient

func NewSubscriptionsClient() SubscriptionsClient

NewSubscriptionsClient creates an instance of the SubscriptionsClient client.

func NewSubscriptionsClientWithBaseURI

func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient

NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (SubscriptionsClient) Create

func (client SubscriptionsClient) Create(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error)

Create associates existing subscription with the management group. Parameters: groupID - management Group ID. subscriptionID - subscription ID. cacheControl - indicates that the request shouldn't utilize any caches.

func (SubscriptionsClient) CreatePreparer

func (client SubscriptionsClient) CreatePreparer(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (*http.Request, error)

CreatePreparer prepares the Create request.

func (SubscriptionsClient) CreateResponder

func (client SubscriptionsClient) CreateResponder(resp *http.Response) (result autorest.Response, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (SubscriptionsClient) CreateSender

func (client SubscriptionsClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (SubscriptionsClient) Delete

func (client SubscriptionsClient) Delete(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error)

Delete de-associates subscription from the management group. Parameters: groupID - management Group ID. subscriptionID - subscription ID. cacheControl - indicates that the request shouldn't utilize any caches.

func (SubscriptionsClient) DeletePreparer

func (client SubscriptionsClient) DeletePreparer(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (SubscriptionsClient) DeleteResponder

func (client SubscriptionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (SubscriptionsClient) DeleteSender

func (client SubscriptionsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL