Documentation ¶
Overview ¶
Package resourcecontroller implements resourcecontroller code.
Index ¶
- Constants
- type ResourceController
- type Service
- func (s *Service) CreateResourceInstance(options *resourcecontrollerv2.CreateResourceInstanceOptions) (*resourcecontrollerv2.ResourceInstance, *core.DetailedResponse, error)
- func (s *Service) CreateResourceKey(options *resourcecontrollerv2.CreateResourceKeyOptions) (*resourcecontrollerv2.ResourceKey, *core.DetailedResponse, error)
- func (s *Service) DeleteResourceInstance(options *resourcecontrollerv2.DeleteResourceInstanceOptions) (*core.DetailedResponse, error)
- func (s *Service) GetInstanceByName(name, resourceID, planID string) (*resourcecontrollerv2.ResourceInstance, error)
- func (s *Service) GetResourceInstance(getResourceInstanceOptions *resourcecontrollerv2.GetResourceInstanceOptions) (result *resourcecontrollerv2.ResourceInstance, response *core.DetailedResponse, ...)
- func (s *Service) GetServiceInstance(id, name string, zone *string) (*resourcecontrollerv2.ResourceInstance, error)
- func (s *Service) GetServiceURL() string
- func (s *Service) ListResourceInstances(...) (result *resourcecontrollerv2.ResourceInstancesList, ...)
- func (s *Service) SetServiceURL(url string) error
- type ServiceOptions
Constants ¶
const ( // PowerVSResourceID is Power VS power-iaas service id, can be retrieved using ibmcloud cli // ibmcloud catalog service power-iaas. PowerVSResourceID = "abd259f0-9990-11e8-acc8-b9f54a8f1661" // PowerVSResourcePlanID is Power VS power-iaas plan id, can be retrieved using ibmcloud cli // ibmcloud catalog service power-iaas. PowerVSResourcePlanID = "f165dd34-3a40-423b-9d95-e90a23f724dd" // CosResourceID is IBM COS service id, can be retrieved using ibmcloud cli // ibmcloud catalog service cloud-object-storage. CosResourceID = "dff97f5c-bc5e-4455-b470-411c3edbe49c" // CosResourcePlanID is IBM COS plan id, can be retrieved using ibmcloud cli // ibmcloud catalog service cloud-object-storage. CosResourcePlanID = "1e4e33e4-cfa6-4f12-9016-be594a6d5f87" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceController ¶
type ResourceController interface { ListResourceInstances(listResourceInstancesOptions *resourcecontrollerv2.ListResourceInstancesOptions) (result *resourcecontrollerv2.ResourceInstancesList, response *core.DetailedResponse, err error) GetResourceInstance(*resourcecontrollerv2.GetResourceInstanceOptions) (*resourcecontrollerv2.ResourceInstance, *core.DetailedResponse, error) CreateResourceInstance(*resourcecontrollerv2.CreateResourceInstanceOptions) (*resourcecontrollerv2.ResourceInstance, *core.DetailedResponse, error) GetServiceInstance(string, string, *string) (*resourcecontrollerv2.ResourceInstance, error) DeleteResourceInstance(*resourcecontrollerv2.DeleteResourceInstanceOptions) (*core.DetailedResponse, error) GetInstanceByName(string, string, string) (*resourcecontrollerv2.ResourceInstance, error) CreateResourceKey(*resourcecontrollerv2.CreateResourceKeyOptions) (*resourcecontrollerv2.ResourceKey, *core.DetailedResponse, error) SetServiceURL(string) error GetServiceURL() string }
ResourceController interface defines a method that a IBMCLOUD service object should implement in order to use the resourcecontrollerv2 package for listing resource instances.
func NewService ¶
func NewService(options ServiceOptions) (ResourceController, error)
NewService returns a new service for the IBM Cloud Resource Controller api client.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service holds the IBM Cloud Resource Controller Service specific information.
func (*Service) CreateResourceInstance ¶ added in v0.8.0
func (s *Service) CreateResourceInstance(options *resourcecontrollerv2.CreateResourceInstanceOptions) (*resourcecontrollerv2.ResourceInstance, *core.DetailedResponse, error)
CreateResourceInstance creates the resource instance.
func (*Service) CreateResourceKey ¶ added in v0.8.0
func (s *Service) CreateResourceKey(options *resourcecontrollerv2.CreateResourceKeyOptions) (*resourcecontrollerv2.ResourceKey, *core.DetailedResponse, error)
CreateResourceKey creates a new resource key.
func (*Service) DeleteResourceInstance ¶ added in v0.8.0
func (s *Service) DeleteResourceInstance(options *resourcecontrollerv2.DeleteResourceInstanceOptions) (*core.DetailedResponse, error)
DeleteResourceInstance deletes the resource instance.
func (*Service) GetInstanceByName ¶ added in v0.8.0
func (s *Service) GetInstanceByName(name, resourceID, planID string) (*resourcecontrollerv2.ResourceInstance, error)
GetInstanceByName returns instance with given name, planID and resourceID. If not found, returns nil.
func (*Service) GetResourceInstance ¶
func (s *Service) GetResourceInstance(getResourceInstanceOptions *resourcecontrollerv2.GetResourceInstanceOptions) (result *resourcecontrollerv2.ResourceInstance, response *core.DetailedResponse, err error)
GetResourceInstance will get the resource instance.
func (*Service) GetServiceInstance ¶ added in v0.8.0
func (s *Service) GetServiceInstance(id, name string, zone *string) (*resourcecontrollerv2.ResourceInstance, error)
GetServiceInstance returns service instance with given name or id. If not found, returns nil. TODO: Combine GetSreviceInstance() and GetInstanceByName().
func (*Service) GetServiceURL ¶ added in v0.3.0
GetServiceURL will get the service URL.
func (*Service) ListResourceInstances ¶
func (s *Service) ListResourceInstances(listResourceInstancesOptions *resourcecontrollerv2.ListResourceInstancesOptions) (result *resourcecontrollerv2.ResourceInstancesList, response *core.DetailedResponse, err error)
ListResourceInstances will list all the resource instances.
func (*Service) SetServiceURL ¶ added in v0.3.0
SetServiceURL sets the service URL.
type ServiceOptions ¶
type ServiceOptions struct {
*resourcecontrollerv2.ResourceControllerV2Options
}
ServiceOptions holds the IBM Cloud Resource Controller Service Options specific information.