resourcemanagerv2

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 40

Documentation

Overview

Package resourcemanagerv2 : Operations and models for the ResourceManagerV2 service

Index

Constants

View Source
const DefaultServiceName = "resource_manager"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://resource-controller.cloud.ibm.com/v2"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

func UnmarshalQuotaDefinition

func UnmarshalQuotaDefinition(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQuotaDefinition unmarshals an instance of QuotaDefinition from the specified map of raw messages.

func UnmarshalQuotaDefinitionList

func UnmarshalQuotaDefinitionList(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQuotaDefinitionList unmarshals an instance of QuotaDefinitionList from the specified map of raw messages.

func UnmarshalResCreateResourceGroup

func UnmarshalResCreateResourceGroup(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResCreateResourceGroup unmarshals an instance of ResCreateResourceGroup from the specified map of raw messages.

func UnmarshalResourceGroup

func UnmarshalResourceGroup(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResourceGroup unmarshals an instance of ResourceGroup from the specified map of raw messages.

func UnmarshalResourceGroupList

func UnmarshalResourceGroupList(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResourceGroupList unmarshals an instance of ResourceGroupList from the specified map of raw messages.

func UnmarshalResourceQuota

func UnmarshalResourceQuota(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResourceQuota unmarshals an instance of ResourceQuota from the specified map of raw messages.

Types

type CreateResourceGroupOptions

type CreateResourceGroupOptions struct {
	// The new name of the resource group.
	Name *string `json:"name,omitempty"`

	// The account id of the resource group.
	AccountID *string `json:"account_id,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateResourceGroupOptions : The CreateResourceGroup options.

func (*CreateResourceGroupOptions) SetAccountID

func (options *CreateResourceGroupOptions) SetAccountID(accountID string) *CreateResourceGroupOptions

SetAccountID : Allow user to set AccountID

func (*CreateResourceGroupOptions) SetHeaders

func (options *CreateResourceGroupOptions) SetHeaders(param map[string]string) *CreateResourceGroupOptions

SetHeaders : Allow user to set Headers

func (*CreateResourceGroupOptions) SetName

SetName : Allow user to set Name

type DeleteResourceGroupOptions

type DeleteResourceGroupOptions struct {
	// The short or long ID of the alias.
	ID *string `json:"id" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteResourceGroupOptions : The DeleteResourceGroup options.

func (*DeleteResourceGroupOptions) SetHeaders

func (options *DeleteResourceGroupOptions) SetHeaders(param map[string]string) *DeleteResourceGroupOptions

SetHeaders : Allow user to set Headers

func (*DeleteResourceGroupOptions) SetID

SetID : Allow user to set ID

type GetQuotaDefinitionOptions

type GetQuotaDefinitionOptions struct {
	// The id of the quota.
	ID *string `json:"id" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetQuotaDefinitionOptions : The GetQuotaDefinition options.

func (*GetQuotaDefinitionOptions) SetHeaders

func (options *GetQuotaDefinitionOptions) SetHeaders(param map[string]string) *GetQuotaDefinitionOptions

SetHeaders : Allow user to set Headers

func (*GetQuotaDefinitionOptions) SetID

SetID : Allow user to set ID

type GetResourceGroupOptions

type GetResourceGroupOptions struct {
	// The short or long ID of the alias.
	ID *string `json:"id" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetResourceGroupOptions : The GetResourceGroup options.

func (*GetResourceGroupOptions) SetHeaders

func (options *GetResourceGroupOptions) SetHeaders(param map[string]string) *GetResourceGroupOptions

SetHeaders : Allow user to set Headers

func (*GetResourceGroupOptions) SetID

SetID : Allow user to set ID

type ListQuotaDefinitionsOptions

type ListQuotaDefinitionsOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListQuotaDefinitionsOptions : The ListQuotaDefinitions options.

func (*ListQuotaDefinitionsOptions) SetHeaders

func (options *ListQuotaDefinitionsOptions) SetHeaders(param map[string]string) *ListQuotaDefinitionsOptions

SetHeaders : Allow user to set Headers

type ListResourceGroupsOptions

type ListResourceGroupsOptions struct {
	// The ID of the account that contains the resource groups that you want to get.
	AccountID *string `json:"account_id,omitempty"`

	// The date would be in a format of YYYY-MM which returns resource groups exclude the deleted ones before this month.
	Date *string `json:"date,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListResourceGroupsOptions : The ListResourceGroups options.

func (*ListResourceGroupsOptions) SetAccountID

func (options *ListResourceGroupsOptions) SetAccountID(accountID string) *ListResourceGroupsOptions

SetAccountID : Allow user to set AccountID

func (*ListResourceGroupsOptions) SetDate

SetDate : Allow user to set Date

func (*ListResourceGroupsOptions) SetHeaders

func (options *ListResourceGroupsOptions) SetHeaders(param map[string]string) *ListResourceGroupsOptions

SetHeaders : Allow user to set Headers

type QuotaDefinition

type QuotaDefinition struct {
	// An alpha-numeric value identifying the quota.
	ID *string `json:"id,omitempty"`

	// The human-readable name of the quota.
	Name *string `json:"name,omitempty"`

	// The type of the quota.
	Type *string `json:"type,omitempty"`

	// The total app limit.
	NumberOfApps *float64 `json:"number_of_apps,omitempty"`

	// The total service instances limit per app.
	NumberOfServiceInstances *float64 `json:"number_of_service_instances,omitempty"`

	// Default number of instances per lite plan.
	DefaultNumberOfInstancesPerLitePlan *float64 `json:"default_number_of_instances_per_lite_plan,omitempty"`

	// The total instances limit per app.
	InstancesPerApp *float64 `json:"instances_per_app,omitempty"`

	// The total memory of app instance.
	InstanceMemory *string `json:"instance_memory,omitempty"`

	// The total app memory capacity.
	TotalAppMemory *string `json:"total_app_memory,omitempty"`

	// The VSI limit.
	VsiLimit *float64 `json:"vsi_limit,omitempty"`

	// The resource quotas associated with a quota definition.
	ResourceQuotas []ResourceQuota `json:"resource_quotas,omitempty"`

	// The date when the quota was initially created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The date when the quota was last updated.
	UpdatedAt *strfmt.DateTime `json:"updated_at,omitempty"`
}

QuotaDefinition : A returned quota definition.

type QuotaDefinitionList

type QuotaDefinitionList struct {
	// The list of quota definitions.
	Resources []QuotaDefinition `json:"resources" validate:"required"`
}

QuotaDefinitionList : A list of quota definitions.

type ResCreateResourceGroup

type ResCreateResourceGroup struct {
	// An alpha-numeric value identifying the resource group.
	ID *string `json:"id,omitempty"`

	// The full CRN (cloud resource name) associated with the resource group. For more on this format, see [Cloud Resource
	// Names](https://cloud.ibm.com/docs/resources?topic=resources-crn).
	Crn *string `json:"crn,omitempty"`
}

ResCreateResourceGroup : A newly-created resource group.

type ResourceGroup

type ResourceGroup struct {
	// An alpha-numeric value identifying the resource group.
	ID *string `json:"id,omitempty"`

	// The full CRN (cloud resource name) associated with the resource group. For more on this format, see [Cloud Resource
	// Names](https://cloud.ibm.com/docs/resources?topic=resources-crn).
	Crn *string `json:"crn,omitempty"`

	// An alpha-numeric value identifying the account ID.
	AccountID *string `json:"account_id,omitempty"`

	// The human-readable name of the resource group.
	Name *string `json:"name,omitempty"`

	// The state of the resource group.
	State *string `json:"state,omitempty"`

	// Identify if this resource group is default of the account or not.
	Default *bool `json:"default,omitempty"`

	// An alpha-numeric value identifying the quota ID associated with the resource group.
	QuotaID *string `json:"quota_id,omitempty"`

	// The URL to access the quota details that associated with the resource group.
	QuotaURL *string `json:"quota_url,omitempty"`

	// The URL to access the payment methods details that associated with the resource group.
	PaymentMethodsURL *string `json:"payment_methods_url,omitempty"`

	// An array of the resources that linked to the resource group.
	ResourceLinkages []interface{} `json:"resource_linkages,omitempty"`

	// The URL to access the team details that associated with the resource group.
	TeamsURL *string `json:"teams_url,omitempty"`

	// The date when the resource group was initially created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The date when the resource group was last updated.
	UpdatedAt *strfmt.DateTime `json:"updated_at,omitempty"`
}

ResourceGroup : A resource group.

type ResourceGroupList

type ResourceGroupList struct {
	// The list of resource groups.
	Resources []ResourceGroup `json:"resources" validate:"required"`
}

ResourceGroupList : A list of resource groups.

type ResourceManagerV2

type ResourceManagerV2 struct {
	Service *core.BaseService
}

ResourceManagerV2 : Manage lifecycle of your Cloud resource groups using Resource Manager APIs.

Version: 2.0

func NewResourceManagerV2

func NewResourceManagerV2(options *ResourceManagerV2Options) (service *ResourceManagerV2, err error)

NewResourceManagerV2 : constructs an instance of ResourceManagerV2 with passed in options.

func NewResourceManagerV2UsingExternalConfig

func NewResourceManagerV2UsingExternalConfig(options *ResourceManagerV2Options) (resourceManager *ResourceManagerV2, err error)

NewResourceManagerV2UsingExternalConfig : constructs an instance of ResourceManagerV2 with passed in options and external configuration.

func (*ResourceManagerV2) CreateResourceGroup

func (resourceManager *ResourceManagerV2) CreateResourceGroup(createResourceGroupOptions *CreateResourceGroupOptions) (result *ResCreateResourceGroup, response *core.DetailedResponse, err error)

CreateResourceGroup : Create a new resource group Create a new resource group in an account.

func (*ResourceManagerV2) DeleteResourceGroup

func (resourceManager *ResourceManagerV2) DeleteResourceGroup(deleteResourceGroupOptions *DeleteResourceGroupOptions) (response *core.DetailedResponse, err error)

DeleteResourceGroup : Delete a resource group Delete a resource group by ID.

func (*ResourceManagerV2) GetQuotaDefinition

func (resourceManager *ResourceManagerV2) GetQuotaDefinition(getQuotaDefinitionOptions *GetQuotaDefinitionOptions) (result *QuotaDefinition, response *core.DetailedResponse, err error)

GetQuotaDefinition : Get a quota definition Get a a quota definition.

func (*ResourceManagerV2) GetResourceGroup

func (resourceManager *ResourceManagerV2) GetResourceGroup(getResourceGroupOptions *GetResourceGroupOptions) (result *ResourceGroup, response *core.DetailedResponse, err error)

GetResourceGroup : Get a resource group Retrieve a resource group by ID.

func (*ResourceManagerV2) ListQuotaDefinitions

func (resourceManager *ResourceManagerV2) ListQuotaDefinitions(listQuotaDefinitionsOptions *ListQuotaDefinitionsOptions) (result *QuotaDefinitionList, response *core.DetailedResponse, err error)

ListQuotaDefinitions : List quota definitions Get a list of all quota definitions.

func (*ResourceManagerV2) ListResourceGroups

func (resourceManager *ResourceManagerV2) ListResourceGroups(listResourceGroupsOptions *ListResourceGroupsOptions) (result *ResourceGroupList, response *core.DetailedResponse, err error)

ListResourceGroups : Get a list of all resource groups Get a list of all resource groups in an account.

func (*ResourceManagerV2) NewCreateResourceGroupOptions

func (*ResourceManagerV2) NewCreateResourceGroupOptions() *CreateResourceGroupOptions

NewCreateResourceGroupOptions : Instantiate CreateResourceGroupOptions

func (*ResourceManagerV2) NewDeleteResourceGroupOptions

func (*ResourceManagerV2) NewDeleteResourceGroupOptions(id string) *DeleteResourceGroupOptions

NewDeleteResourceGroupOptions : Instantiate DeleteResourceGroupOptions

func (*ResourceManagerV2) NewGetQuotaDefinitionOptions

func (*ResourceManagerV2) NewGetQuotaDefinitionOptions(id string) *GetQuotaDefinitionOptions

NewGetQuotaDefinitionOptions : Instantiate GetQuotaDefinitionOptions

func (*ResourceManagerV2) NewGetResourceGroupOptions

func (*ResourceManagerV2) NewGetResourceGroupOptions(id string) *GetResourceGroupOptions

NewGetResourceGroupOptions : Instantiate GetResourceGroupOptions

func (*ResourceManagerV2) NewListQuotaDefinitionsOptions

func (*ResourceManagerV2) NewListQuotaDefinitionsOptions() *ListQuotaDefinitionsOptions

NewListQuotaDefinitionsOptions : Instantiate ListQuotaDefinitionsOptions

func (*ResourceManagerV2) NewListResourceGroupsOptions

func (*ResourceManagerV2) NewListResourceGroupsOptions() *ListResourceGroupsOptions

NewListResourceGroupsOptions : Instantiate ListResourceGroupsOptions

func (*ResourceManagerV2) NewUpdateResourceGroupOptions

func (*ResourceManagerV2) NewUpdateResourceGroupOptions(id string) *UpdateResourceGroupOptions

NewUpdateResourceGroupOptions : Instantiate UpdateResourceGroupOptions

func (*ResourceManagerV2) SetServiceURL

func (resourceManager *ResourceManagerV2) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*ResourceManagerV2) UpdateResourceGroup

func (resourceManager *ResourceManagerV2) UpdateResourceGroup(updateResourceGroupOptions *UpdateResourceGroupOptions) (result *ResourceGroup, response *core.DetailedResponse, err error)

UpdateResourceGroup : Update a resource group Update a resource group by ID.

type ResourceManagerV2Options

type ResourceManagerV2Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

ResourceManagerV2Options : Service options

type ResourceQuota

type ResourceQuota struct {
	// An alpha-numeric value identifying the quota.
	ID *string `json:"_id,omitempty"`

	// The human-readable name of the quota.
	ResourceID *string `json:"resource_id,omitempty"`

	// The full CRN (cloud resource name) associated with the quota. For more on this format, see
	// https://cloud.ibm.com/docs/resources?topic=resources-crn#crn.
	Crn *string `json:"crn,omitempty"`

	// The limit number of this resource.
	Limit *float64 `json:"limit,omitempty"`
}

ResourceQuota : A resource quota.

type UpdateResourceGroupOptions

type UpdateResourceGroupOptions struct {
	// The short or long ID of the alias.
	ID *string `json:"id" validate:"required"`

	// The new name of the resource group.
	Name *string `json:"name,omitempty"`

	// The state of the resource group.
	State *string `json:"state,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateResourceGroupOptions : The UpdateResourceGroup options.

func (*UpdateResourceGroupOptions) SetHeaders

func (options *UpdateResourceGroupOptions) SetHeaders(param map[string]string) *UpdateResourceGroupOptions

SetHeaders : Allow user to set Headers

func (*UpdateResourceGroupOptions) SetID

SetID : Allow user to set ID

func (*UpdateResourceGroupOptions) SetName

SetName : Allow user to set Name

func (*UpdateResourceGroupOptions) SetState

SetState : Allow user to set State

Jump to

Keyboard shortcuts

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