management

package
v12.4.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package management implements the Azure ARM Management service API version 2017-08-31-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 Management
	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
	GroupID uuid.UUID
}

BaseClient is the base client for Management.

func New

func New(groupID uuid.UUID) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, groupID uuid.UUID) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type ChildType

type ChildType string

ChildType enumerates the values for child type.

const (
	// Account ...
	Account ChildType = "Account"
	// Department ...
	Department ChildType = "Department"
	// Enrollment ...
	Enrollment ChildType = "Enrollment"
	// Subscription ...
	Subscription ChildType = "Subscription"
)

type ChildType1

type ChildType1 string

ChildType1 enumerates the values for child type 1.

const (
	// ChildType1Account ...
	ChildType1Account ChildType1 = "Account"
	// ChildType1Department ...
	ChildType1Department ChildType1 = "Department"
	// ChildType1Enrollment ...
	ChildType1Enrollment ChildType1 = "Enrollment"
	// ChildType1Subscription ...
	ChildType1Subscription ChildType1 = "Subscription"
)

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"`
	// Target - (Optional) The target of the error.
	Target *string `json:"target,omitempty"`
}

ErrorDetails the details of the error.

type ErrorResponse

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

ErrorResponse the error object.

type Group

type Group struct {
	// ID - The ID of the management group. E.g. /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000
	ID *string `json:"id,omitempty"`
	// Type - The type of the resource. E.g. /providers/Microsoft.Management/managementGroups
	Type *string `json:"type,omitempty"`
	// Name - The name of the management group. E.g. 20000000-0000-0000-0000-000000000000
	Name             *uuid.UUID `json:"name,omitempty"`
	*GroupProperties `json:"properties,omitempty"`
}

Group the management group details.

func (*Group) UnmarshalJSON

func (g *Group) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Group struct.

type GroupChildInfo

type GroupChildInfo struct {
	// ChildType - Possible values include: 'Enrollment', 'Department', 'Account', 'Subscription'
	ChildType ChildType `json:"childType,omitempty"`
	// ChildID - The ID of the child resource (management group or subscription). E.g. /providers/Microsoft.Management/managementGroups/40000000-0000-0000-0000-000000000000
	ChildID *string `json:"childId,omitempty"`
	// DisplayName - The friendly name of the child resource.
	DisplayName *string `json:"displayName,omitempty"`
	// TenantID - (Optional) The AAD Tenant ID associated with the child resource.
	TenantID *uuid.UUID `json:"tenantId,omitempty"`
}

GroupChildInfo the unique identifier (ID) of a management group.

type GroupDetailsProperties

type GroupDetailsProperties 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"`
	// ManagementGroupType - Possible values include: 'ManagementGroupTypeEnrollment', 'ManagementGroupTypeDepartment', 'ManagementGroupTypeAccount', 'ManagementGroupTypeSubscription'
	ManagementGroupType ManagementGroupType `json:"managementGroupType,omitempty"`
}

GroupDetailsProperties the details properties of a management group.

type GroupInfo

type GroupInfo struct {
	// ID - The ID of the management group. E.g. /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000
	ID *string `json:"id,omitempty"`
	// Type - The type of the resource. E.g. /providers/Microsoft.Management/managementGroups
	Type *string `json:"type,omitempty"`
	// Name - The name of the management group. E.g. 20000000-0000-0000-0000-000000000000
	Name                 *uuid.UUID `json:"name,omitempty"`
	*GroupInfoProperties `json:"properties,omitempty"`
}

GroupInfo the management group.

func (*GroupInfo) UnmarshalJSON

func (gi *GroupInfo) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for GroupInfo struct.

type GroupInfoProperties

type GroupInfoProperties struct {
	// TenantID - The AAD Tenant ID associated with the management group. E.g. 10000000-0000-0000-0000-000000000000
	TenantID *uuid.UUID `json:"tenantId,omitempty"`
	// DisplayName - The friendly name of the management group.
	DisplayName *string `json:"displayName,omitempty"`
}

GroupInfoProperties the generic properties of a management group.

type GroupListResult

type GroupListResult struct {
	autorest.Response `json:"-"`
	// Value - The list of management groups.
	Value *[]GroupInfo `json:"value,omitempty"`
	// NextLink - The URL to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

GroupListResult the result of listing management groups.

func (GroupListResult) IsEmpty

func (glr GroupListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type GroupListResultIterator

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

GroupListResultIterator provides access to a complete listing of GroupInfo values.

func (*GroupListResultIterator) Next

func (iter *GroupListResultIterator) 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.

func (GroupListResultIterator) NotDone

func (iter GroupListResultIterator) NotDone() bool

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

func (GroupListResultIterator) Response

func (iter GroupListResultIterator) Response() GroupListResult

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

func (GroupListResultIterator) Value

func (iter GroupListResultIterator) Value() GroupInfo

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

type GroupListResultPage

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

GroupListResultPage contains a page of GroupInfo values.

func (*GroupListResultPage) Next

func (page *GroupListResultPage) 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.

func (GroupListResultPage) NotDone

func (page GroupListResultPage) NotDone() bool

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

func (GroupListResultPage) Response

func (page GroupListResultPage) Response() GroupListResult

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

func (GroupListResultPage) Values

func (page GroupListResultPage) Values() []GroupInfo

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

type GroupProperties

type GroupProperties struct {
	// TenantID - The AAD Tenant ID associated with the management group. E.g. 10000000-0000-0000-0000-000000000000
	TenantID *uuid.UUID `json:"tenantId,omitempty"`
	// DisplayName - The friendly name of the management group.
	DisplayName *string                 `json:"displayName,omitempty"`
	Details     *GroupDetailsProperties `json:"details,omitempty"`
}

GroupProperties the generic properties of a management group.

type GroupPropertiesWithChildren

type GroupPropertiesWithChildren struct {
	// TenantID - The AAD Tenant ID associated with the management group. E.g. 10000000-0000-0000-0000-000000000000
	TenantID *uuid.UUID `json:"tenantId,omitempty"`
	// DisplayName - The friendly name of the management group.
	DisplayName *string                 `json:"displayName,omitempty"`
	Details     *GroupDetailsProperties `json:"details,omitempty"`
	// Children - The list of children.
	Children *[]GroupChildInfo `json:"children,omitempty"`
}

GroupPropertiesWithChildren the generic properties of a management group.

type GroupPropertiesWithHierarchy

type GroupPropertiesWithHierarchy struct {
	// TenantID - The AAD Tenant ID associated with the management group. E.g. 10000000-0000-0000-0000-000000000000
	TenantID *uuid.UUID `json:"tenantId,omitempty"`
	// DisplayName - The friendly name of the management group.
	DisplayName *string                 `json:"displayName,omitempty"`
	Details     *GroupDetailsProperties `json:"details,omitempty"`
	// Children - The list of children.
	Children *[]GroupRecursiveChildInfo `json:"children,omitempty"`
}

GroupPropertiesWithHierarchy the generic properties of a management group.

type GroupRecursiveChildInfo

type GroupRecursiveChildInfo struct {
	// ChildType - Possible values include: 'ChildType1Enrollment', 'ChildType1Department', 'ChildType1Account', 'ChildType1Subscription'
	ChildType ChildType `json:"childType,omitempty"`
	// ChildID - The ID of the child resource (management group or subscription). E.g. /providers/Microsoft.Management/managementGroups/40000000-0000-0000-0000-000000000000
	ChildID *string `json:"childId,omitempty"`
	// DisplayName - The friendly name of the child resource.
	DisplayName *string `json:"displayName,omitempty"`
	// TenantID - (Optional) The AAD Tenant ID associated with the child resource.
	TenantID *uuid.UUID `json:"tenantId,omitempty"`
	// Children - The list of children.
	Children *[]GroupRecursiveChildInfo `json:"children,omitempty"`
}

GroupRecursiveChildInfo the unique identifier (ID) of a management group.

type GroupWithChildren

type GroupWithChildren struct {
	// ID - The ID of the management group. E.g. /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000
	ID *string `json:"id,omitempty"`
	// Type - The type of the resource. E.g. /providers/Microsoft.Management/managementGroups
	Type *string `json:"type,omitempty"`
	// Name - The name of the management group. E.g. 20000000-0000-0000-0000-000000000000
	Name                         *uuid.UUID `json:"name,omitempty"`
	*GroupPropertiesWithChildren `json:"properties,omitempty"`
}

GroupWithChildren the management group details.

func (*GroupWithChildren) UnmarshalJSON

func (gwc *GroupWithChildren) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for GroupWithChildren struct.

type GroupWithHierarchy

type GroupWithHierarchy struct {
	autorest.Response `json:"-"`
	// ID - The ID of the management group. E.g. /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000
	ID *string `json:"id,omitempty"`
	// Type - The type of the resource. E.g. /providers/Microsoft.Management/managementGroups
	Type *string `json:"type,omitempty"`
	// Name - The name of the management group. E.g. 20000000-0000-0000-0000-000000000000
	Name                          *uuid.UUID `json:"name,omitempty"`
	*GroupPropertiesWithHierarchy `json:"properties,omitempty"`
}

GroupWithHierarchy the management group details.

func (*GroupWithHierarchy) UnmarshalJSON

func (gwh *GroupWithHierarchy) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for GroupWithHierarchy struct.

type GroupsClient

type GroupsClient struct {
	BaseClient
}

GroupsClient 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 NewGroupsClient

func NewGroupsClient(groupID uuid.UUID) GroupsClient

NewGroupsClient creates an instance of the GroupsClient client.

func NewGroupsClientWithBaseURI

func NewGroupsClientWithBaseURI(baseURI string, groupID uuid.UUID) GroupsClient

NewGroupsClientWithBaseURI creates an instance of the GroupsClient client.

func (GroupsClient) Get

func (client GroupsClient) Get(ctx context.Context, expand string, recurse *bool) (result GroupWithHierarchy, err error)

Get get the details of the management group.

expand is the $expand=children query string parameter allows clients to request inclusion of children in the response payload. recurse is the $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response payload.

func (GroupsClient) GetPreparer

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

GetPreparer prepares the Get request.

func (GroupsClient) GetResponder

func (client GroupsClient) GetResponder(resp *http.Response) (result GroupWithHierarchy, err error)

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

func (GroupsClient) GetSender

func (client GroupsClient) 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 (GroupsClient) List

func (client GroupsClient) List(ctx context.Context, skiptoken string) (result GroupListResultPage, err error)

List list management groups for the authenticated user.

skiptoken is 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 (GroupsClient) ListComplete

func (client GroupsClient) ListComplete(ctx context.Context, skiptoken string) (result GroupListResultIterator, err error)

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

func (GroupsClient) ListPreparer

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

ListPreparer prepares the List request.

func (GroupsClient) ListResponder

func (client GroupsClient) ListResponder(resp *http.Response) (result GroupListResult, err error)

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

func (GroupsClient) ListSender

func (client GroupsClient) 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 ManagementGroupType

type ManagementGroupType string

ManagementGroupType enumerates the values for management group type.

const (
	// ManagementGroupTypeAccount ...
	ManagementGroupTypeAccount ManagementGroupType = "Account"
	// ManagementGroupTypeDepartment ...
	ManagementGroupTypeDepartment ManagementGroupType = "Department"
	// ManagementGroupTypeEnrollment ...
	ManagementGroupTypeEnrollment ManagementGroupType = "Enrollment"
	// ManagementGroupTypeSubscription ...
	ManagementGroupTypeSubscription ManagementGroupType = "Subscription"
)

type Operation

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

Operation a Management REST API operation.

type OperationDisplay

type OperationDisplay struct {
	// Provider - Service provider: Microsoft.Management.
	Provider *string `json:"provider,omitempty"`
	// Resource - Resource on which the operation is performed: Invoice, etc.
	Resource *string `json:"resource,omitempty"`
	// Operation - Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`
}

OperationDisplay the object that represents the operation.

type OperationListResult

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

OperationListResult result listing operations. It contains a list of operations and a URL link to get the next set of results.

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 (*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.

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 (*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.

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(groupID uuid.UUID) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, groupID uuid.UUID) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

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 ID of the parent management group. E.g. /providers/Microsoft.Management/managementGroups/30000000-0000-0000-0000-000000000000
	ParentID *string `json:"parentId,omitempty"`
	// DisplayName - The friendly name of the management group.
	DisplayName *string `json:"displayName,omitempty"`
}

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

Jump to

Keyboard shortcuts

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