UNPKG

@ibm-cloud/platform-services

Version:

Node.js client library for IBM Cloud Platform Services

870 lines 86.7 kB
/** * (C) Copyright IBM Corp. 2024. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /// <reference types="node" /> import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'; import { BaseService, SDKLogger, UserOptions } from 'ibm-cloud-sdk-core'; /** * Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are provisioned globally in an * account scope. Supports asynchronous provisioning of resources. Enables consumption of a global resource through a * Cloud Foundry space in any region. * * API Version: 2.0 */ declare class ResourceControllerV2 extends BaseService { static _logger: SDKLogger; static DEFAULT_SERVICE_URL: string; static DEFAULT_SERVICE_NAME: string; /************************* * Factory method ************************/ /** * Constructs an instance of ResourceControllerV2 with passed in options and external configuration. * * @param {UserOptions} [options] - The parameters to send to the service. * @param {string} [options.serviceName] - The name of the service to configure * @param {Authenticator} [options.authenticator] - The Authenticator object used to authenticate requests to the service * @param {string} [options.serviceUrl] - The base URL for the service * @returns {ResourceControllerV2} */ static newInstance(options: UserOptions): ResourceControllerV2; /** * Construct a ResourceControllerV2 object. * * @param {Object} options - Options for the service. * @param {string} [options.serviceUrl] - The base URL for the service * @param {OutgoingHttpHeaders} [options.headers] - Default headers that shall be included with every request to the service. * @param {Authenticator} options.authenticator - The Authenticator object used to authenticate requests to the service * @constructor * @returns {ResourceControllerV2} */ constructor(options: UserOptions); /************************* * resourceInstances ************************/ /** * Get a list of all resource instances. * * View a list of all available resource instances. Resources is a broad term that could mean anything from a service * instance to a virtual machine associated with the customer account. * * @param {Object} [params] - The parameters to send to the service. * @param {string} [params.guid] - The GUID of the instance. * @param {string} [params.name] - The human-readable name of the instance. * @param {string} [params.resourceGroupId] - The ID of the resource group. * @param {string} [params.resourceId] - The unique ID of the offering. This value is provided by and stored in the * global catalog. * @param {string} [params.resourcePlanId] - The unique ID of the plan associated with the offering. This value is * provided by and stored in the global catalog. * @param {string} [params.type] - The type of the instance, for example, `service_instance`. * @param {string} [params.subType] - The sub-type of instance, for example, `kms`. * @param {number} [params.limit] - Limit on how many items should be returned. * @param {string} [params.start] - An optional token that indicates the beginning of the page of results to be * returned. Any additional query parameters are ignored if a page token is present. If omitted, the first page of * results is returned. This value is obtained from the 'start' query parameter in the 'next_url' field of the * operation response. * @param {string} [params.state] - The state of the instance. If not specified, instances in state `active` and * `provisioning` are returned. * @param {string} [params.updatedFrom] - Start date inclusive filter. * @param {string} [params.updatedTo] - End date inclusive filter. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstancesList>>} */ listResourceInstances(params?: ResourceControllerV2.ListResourceInstancesParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstancesList>>; /** * Create (provision) a new resource instance. * * When you provision a service you get an instance of that service. An instance represents the resource with which * you create, and additionally, represents a chargeable record of which billing can occur. * * @param {Object} params - The parameters to send to the service. * @param {string} params.name - The name of the instance. Must be 180 characters or less and cannot include any * special characters other than `(space) - . _ :`. * @param {string} params.target - The deployment location where the instance should be hosted. * @param {string} params.resourceGroup - The ID of the resource group. * @param {string} params.resourcePlanId - The unique ID of the plan associated with the offering. This value is * provided by and stored in the global catalog. * @param {string[]} [params.tags] - Tags that are attached to the instance after provisioning. These tags can be * searched and managed through the Tagging API in IBM Cloud. * @param {boolean} [params.allowCleanup] - A boolean that dictates if the resource instance should be deleted * (cleaned up) during the processing of a region instance delete call. * @param {JsonObject} [params.parameters] - Configuration options represented as key-value pairs that are passed * through to the target resource brokers. Set the `onetime_credentials` property to specify whether newly created * resource key credentials can be retrieved by using get resource key or get a list of all of the resource keys * requests. * @param {boolean} [params.entityLock] - Indicates if the resource instance is locked for further update or delete * operations. It does not affect actions performed on child resources like aliases, bindings or keys. False by * default. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>} */ createResourceInstance(params: ResourceControllerV2.CreateResourceInstanceParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>; /** * Get a resource instance. * * Retrieve a resource instance by URL-encoded CRN or GUID. Find more details on a particular instance, like when it * was provisioned and who provisioned it. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource instance URL-encoded CRN or GUID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>} */ getResourceInstance(params: ResourceControllerV2.GetResourceInstanceParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>; /** * Delete a resource instance. * * Delete a resource instance by URL-encoded CRN or GUID. If the resource instance has any resource keys or aliases * associated with it, use the `recursive=true` parameter to delete it. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource instance URL-encoded CRN or GUID. * @param {boolean} [params.recursive] - Will delete resource bindings, keys and aliases associated with the instance. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.EmptyObject>>} */ deleteResourceInstance(params: ResourceControllerV2.DeleteResourceInstanceParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.EmptyObject>>; /** * Update a resource instance. * * Use the resource instance URL-encoded CRN or GUID to make updates to the resource instance, like changing the name * or plan. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource instance URL-encoded CRN or GUID. * @param {string} [params.name] - The new name of the instance. Must be 180 characters or less and cannot include any * special characters other than `(space) - . _ :`. * @param {JsonObject} [params.parameters] - The new configuration options for the instance. Set the * `onetime_credentials` property to specify whether newly created resource key credentials can be retrieved by using * get resource key or get a list of all of the resource keys requests. * @param {string} [params.resourcePlanId] - The unique ID of the plan associated with the offering. This value is * provided by and stored in the global catalog. * @param {boolean} [params.allowCleanup] - A boolean that dictates if the resource instance should be deleted * (cleaned up) during the processing of a region instance delete call. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>} */ updateResourceInstance(params: ResourceControllerV2.UpdateResourceInstanceParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>; /** * Get a list of all resource aliases for the instance. * * Retrieving a list of all resource aliases can help you find out who's using the resource instance. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource instance URL-encoded CRN or GUID. * @param {number} [params.limit] - Limit on how many items should be returned. * @param {string} [params.start] - An optional token that indicates the beginning of the page of results to be * returned. Any additional query parameters are ignored if a page token is present. If omitted, the first page of * results is returned. This value is obtained from the 'start' query parameter in the 'next_url' field of the * operation response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAliasesList>>} * @deprecated this method is deprecated and may be removed in a future release */ listResourceAliasesForInstance(params: ResourceControllerV2.ListResourceAliasesForInstanceParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAliasesList>>; /** * Get a list of all the resource keys for the instance. * * You may have many resource keys for one resource instance. For example, you may have a different resource key for * each user or each role. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource instance URL-encoded CRN or GUID. * @param {number} [params.limit] - Limit on how many items should be returned. * @param {string} [params.start] - An optional token that indicates the beginning of the page of results to be * returned. Any additional query parameters are ignored if a page token is present. If omitted, the first page of * results is returned. This value is obtained from the 'start' query parameter in the 'next_url' field of the * operation response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKeysList>>} */ listResourceKeysForInstance(params: ResourceControllerV2.ListResourceKeysForInstanceParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKeysList>>; /** * Lock a resource instance. * * Locks a resource instance. A locked instance can not be updated or deleted. It does not affect actions performed on * child resources like aliases, bindings, or keys. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource instance URL-encoded CRN or GUID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>} */ lockResourceInstance(params: ResourceControllerV2.LockResourceInstanceParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>; /** * Unlock a resource instance. * * Unlock a resource instance to update or delete it. Unlocking a resource instance does not affect child resources * like aliases, bindings or keys. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource instance URL-encoded CRN or GUID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>} */ unlockResourceInstance(params: ResourceControllerV2.UnlockResourceInstanceParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>; /** * Cancel the in progress last operation of the resource instance. * * Cancel the in progress last operation of the resource instance. After successful cancellation, the resource * instance is removed. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource instance URL-encoded CRN or GUID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>} */ cancelLastopResourceInstance(params: ResourceControllerV2.CancelLastopResourceInstanceParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceInstance>>; /************************* * resourceKeys ************************/ /** * Get a list of all of the resource keys. * * View all of the resource keys that exist for all of your resource instances. * * @param {Object} [params] - The parameters to send to the service. * @param {string} [params.guid] - The GUID of the key. * @param {string} [params.name] - The human-readable name of the key. * @param {string} [params.resourceGroupId] - The ID of the resource group. * @param {string} [params.resourceId] - The unique ID of the offering. This value is provided by and stored in the * global catalog. * @param {number} [params.limit] - Limit on how many items should be returned. * @param {string} [params.start] - An optional token that indicates the beginning of the page of results to be * returned. Any additional query parameters are ignored if a page token is present. If omitted, the first page of * results is returned. This value is obtained from the 'start' query parameter in the 'next_url' field of the * operation response. * @param {string} [params.updatedFrom] - Start date inclusive filter. * @param {string} [params.updatedTo] - End date inclusive filter. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKeysList>>} */ listResourceKeys(params?: ResourceControllerV2.ListResourceKeysParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKeysList>>; /** * Create a new resource key. * * A resource key is a saved credential you can use to authenticate with a resource instance. * * @param {Object} params - The parameters to send to the service. * @param {string} params.name - The name of the key. * @param {string} params.source - The ID of resource instance or alias. * @param {ResourceKeyPostParameters} [params.parameters] - Configuration options represented as key-value pairs. * Service defined options are passed through to the target resource brokers, whereas platform defined options are * not. * @param {string} [params.role] - The base IAM service role name (Reader, Writer, or Manager), or the service or * custom role CRN. Refer to service’s documentation for supported roles. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKey>>} */ createResourceKey(params: ResourceControllerV2.CreateResourceKeyParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKey>>; /** * Get resource key. * * View the details of a resource key by URL-encoded CRN or GUID, like the credentials for the key and who created it. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource key URL-encoded CRN or GUID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKey>>} */ getResourceKey(params: ResourceControllerV2.GetResourceKeyParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKey>>; /** * Delete a resource key. * * Deleting a resource key does not affect any resource instance or resource alias associated with the key. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource key URL-encoded CRN or GUID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.EmptyObject>>} */ deleteResourceKey(params: ResourceControllerV2.DeleteResourceKeyParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.EmptyObject>>; /** * Update a resource key. * * Use the resource key URL-encoded CRN or GUID to update the resource key. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource key URL-encoded CRN or GUID. * @param {string} params.name - The new name of the key. Must be 180 characters or less and cannot include any * special characters other than `(space) - . _ :`. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKey>>} */ updateResourceKey(params: ResourceControllerV2.UpdateResourceKeyParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceKey>>; /************************* * resourceBindings ************************/ /** * Get a list of all resource bindings. * * View all of the resource bindings that exist for all of your resource aliases. * * @param {Object} [params] - The parameters to send to the service. * @param {string} [params.guid] - The GUID of the binding. * @param {string} [params.name] - The human-readable name of the binding. * @param {string} [params.resourceGroupId] - The ID of the resource group. * @param {string} [params.resourceId] - The unique ID of the offering (service name). This value is provided by and * stored in the global catalog. * @param {string} [params.regionBindingId] - The ID of the binding in the target environment. For example, * `service_binding_id` in a given IBM Cloud environment. * @param {number} [params.limit] - Limit on how many items should be returned. * @param {string} [params.start] - An optional token that indicates the beginning of the page of results to be * returned. Any additional query parameters are ignored if a page token is present. If omitted, the first page of * results is returned. This value is obtained from the 'start' query parameter in the 'next_url' field of the * operation response. * @param {string} [params.updatedFrom] - Start date inclusive filter. * @param {string} [params.updatedTo] - End date inclusive filter. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBindingsList>>} * @deprecated this method is deprecated and may be removed in a future release */ listResourceBindings(params?: ResourceControllerV2.ListResourceBindingsParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBindingsList>>; /** * Create a new resource binding. * * A resource binding connects credentials to a resource alias. The credentials are in the form of a resource key. * * @param {Object} params - The parameters to send to the service. * @param {string} params.source - The ID of resource alias. * @param {string} params.target - The CRN of application to bind to in a specific environment, for example, Dallas * YP, CFEE instance. * @param {string} [params.name] - The name of the binding. Must be 180 characters or less and cannot include any * special characters other than `(space) - . _ :`. * @param {ResourceBindingPostParameters} [params.parameters] - Configuration options represented as key-value pairs. * Service defined options are passed through to the target resource brokers, whereas platform defined options are * not. * @param {string} [params.role] - The base IAM service role name (Reader, Writer, or Manager), or the service or * custom role CRN. Refer to service’s documentation for supported roles. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBinding>>} * @deprecated this method is deprecated and may be removed in a future release */ createResourceBinding(params: ResourceControllerV2.CreateResourceBindingParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBinding>>; /** * Get a resource binding. * * View a resource binding and all of its details, like who created it, the credential, and the resource alias that * the binding is associated with. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource binding URL-encoded CRN or GUID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBinding>>} * @deprecated this method is deprecated and may be removed in a future release */ getResourceBinding(params: ResourceControllerV2.GetResourceBindingParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBinding>>; /** * Delete a resource binding. * * Deleting a resource binding does not affect the resource alias that the binding is associated with. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource binding URL-encoded CRN or GUID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.EmptyObject>>} * @deprecated this method is deprecated and may be removed in a future release */ deleteResourceBinding(params: ResourceControllerV2.DeleteResourceBindingParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.EmptyObject>>; /** * Update a resource binding. * * Use the resource binding URL-encoded CRN or GUID to update the resource binding. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource binding URL-encoded CRN or GUID. * @param {string} params.name - The new name of the binding. Must be 180 characters or less and cannot include any * special characters other than `(space) - . _ :`. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBinding>>} * @deprecated this method is deprecated and may be removed in a future release */ updateResourceBinding(params: ResourceControllerV2.UpdateResourceBindingParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBinding>>; /************************* * resourceAliases ************************/ /** * Get a list of all resource aliases. * * View all of the resource aliases that exist for every resource instance. * * @param {Object} [params] - The parameters to send to the service. * @param {string} [params.guid] - The GUID of the alias. * @param {string} [params.name] - The human-readable name of the alias. * @param {string} [params.resourceInstanceId] - The ID of the resource instance. * @param {string} [params.regionInstanceId] - The ID of the instance in the target environment. For example, * `service_instance_id` in a given IBM Cloud environment. * @param {string} [params.resourceId] - The unique ID of the offering (service name). This value is provided by and * stored in the global catalog. * @param {string} [params.resourceGroupId] - The ID of the resource group. * @param {number} [params.limit] - Limit on how many items should be returned. * @param {string} [params.start] - An optional token that indicates the beginning of the page of results to be * returned. Any additional query parameters are ignored if a page token is present. If omitted, the first page of * results is returned. This value is obtained from the 'start' query parameter in the 'next_url' field of the * operation response. * @param {string} [params.updatedFrom] - Start date inclusive filter. * @param {string} [params.updatedTo] - End date inclusive filter. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAliasesList>>} * @deprecated this method is deprecated and may be removed in a future release */ listResourceAliases(params?: ResourceControllerV2.ListResourceAliasesParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAliasesList>>; /** * Create a new resource alias. * * Alias a resource instance into a targeted environment's (name)space. * * @param {Object} params - The parameters to send to the service. * @param {string} params.name - The name of the alias. Must be 180 characters or less and cannot include any special * characters other than `(space) - . _ :`. * @param {string} params.source - The ID of resource instance. * @param {string} params.target - The CRN of target name(space) in a specific environment, for example, space in * Dallas YP, CFEE instance etc. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAlias>>} * @deprecated this method is deprecated and may be removed in a future release */ createResourceAlias(params: ResourceControllerV2.CreateResourceAliasParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAlias>>; /** * Get a resource alias. * * View a resource alias and all of its details, like who created it and the resource instance that it's associated * with. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource alias URL-encoded CRN or GUID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAlias>>} * @deprecated this method is deprecated and may be removed in a future release */ getResourceAlias(params: ResourceControllerV2.GetResourceAliasParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAlias>>; /** * Delete a resource alias. * * Delete a resource alias by URL-encoded CRN or GUID. If the resource alias has any resource keys or bindings * associated with it, use the `recursive=true` parameter to delete it. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource alias URL-encoded CRN or GUID. * @param {boolean} [params.recursive] - Deletes the resource bindings and keys associated with the alias. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.EmptyObject>>} * @deprecated this method is deprecated and may be removed in a future release */ deleteResourceAlias(params: ResourceControllerV2.DeleteResourceAliasParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.EmptyObject>>; /** * Update a resource alias. * * Use the resource alias URL-encoded CRN or GUID to update the resource alias. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource alias URL-encoded CRN or GUID. * @param {string} params.name - The new name of the alias. Must be 180 characters or less and cannot include any * special characters other than `(space) - . _ :`. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAlias>>} * @deprecated this method is deprecated and may be removed in a future release */ updateResourceAlias(params: ResourceControllerV2.UpdateResourceAliasParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceAlias>>; /** * Get a list of all resource bindings for the alias. * * View all of the resource bindings associated with a specific resource alias. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The resource alias URL-encoded CRN or GUID. * @param {number} [params.limit] - Limit on how many items should be returned. * @param {string} [params.start] - An optional token that indicates the beginning of the page of results to be * returned. Any additional query parameters are ignored if a page token is present. If omitted, the first page of * results is returned. This value is obtained from the 'start' query parameter in the 'next_url' field of the * operation response. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBindingsList>>} * @deprecated this method is deprecated and may be removed in a future release */ listResourceBindingsForAlias(params: ResourceControllerV2.ListResourceBindingsForAliasParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ResourceBindingsList>>; /************************* * resourceReclamations ************************/ /** * Get a list of all reclamations. * * View all of the resource reclamations that exist for every resource instance. * * @param {Object} [params] - The parameters to send to the service. * @param {string} [params.accountId] - An alpha-numeric value identifying the account ID. * @param {string} [params.resourceInstanceId] - The GUID of the resource instance. * @param {string} [params.resourceGroupId] - The ID of the resource group. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.ReclamationsList>>} */ listReclamations(params?: ResourceControllerV2.ListReclamationsParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.ReclamationsList>>; /** * Perform a reclamation action. * * Reclaim a resource instance so that it can no longer be used, or restore the resource instance so that it's usable * again. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The ID associated with the reclamation. * @param {string} params.actionName - The reclamation action name. Specify `reclaim` to delete a resource, or * `restore` to restore a resource. * @param {string} [params.requestBy] - The request initiator, if different from the request token. * @param {string} [params.comment] - A comment to describe the action. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<ResourceControllerV2.Response<ResourceControllerV2.Reclamation>>} */ runReclamationAction(params: ResourceControllerV2.RunReclamationActionParams): Promise<ResourceControllerV2.Response<ResourceControllerV2.Reclamation>>; } /************************* * interfaces ************************/ declare namespace ResourceControllerV2 { /** An operation response. */ interface Response<T = any> { result: T; status: number; statusText: string; headers: IncomingHttpHeaders; } /** The callback for a service request. */ type Callback<T> = (error: any, response?: Response<T>) => void; /** The body of a service request that returns no response data. */ interface EmptyObject { } /** A standard JS object, defined to avoid the limitations of `Object` and `object` */ interface JsonObject { [key: string]: any; } /************************* * request interfaces ************************/ /** Parameters for the `listResourceInstances` operation. */ interface ListResourceInstancesParams { /** The GUID of the instance. */ guid?: string; /** The human-readable name of the instance. */ name?: string; /** The ID of the resource group. */ resourceGroupId?: string; /** The unique ID of the offering. This value is provided by and stored in the global catalog. */ resourceId?: string; /** The unique ID of the plan associated with the offering. This value is provided by and stored in the global * catalog. */ resourcePlanId?: string; /** The type of the instance, for example, `service_instance`. */ type?: string; /** The sub-type of instance, for example, `kms`. */ subType?: string; /** Limit on how many items should be returned. */ limit?: number; /** An optional token that indicates the beginning of the page of results to be returned. Any additional query * parameters are ignored if a page token is present. If omitted, the first page of results is returned. This value * is obtained from the 'start' query parameter in the 'next_url' field of the operation response. */ start?: string; /** The state of the instance. If not specified, instances in state `active` and `provisioning` are returned. */ state?: ListResourceInstancesConstants.State | string; /** Start date inclusive filter. */ updatedFrom?: string; /** End date inclusive filter. */ updatedTo?: string; headers?: OutgoingHttpHeaders; } /** Constants for the `listResourceInstances` operation. */ namespace ListResourceInstancesConstants { /** The state of the instance. If not specified, instances in state `active` and `provisioning` are returned. */ enum State { ACTIVE = "active", INACTIVE = "inactive", FAILED = "failed", PENDING_RECLAMATION = "pending_reclamation", PROVISIONING = "provisioning", PRE_PROVISIONING = "pre_provisioning", REMOVED = "removed" } } /** Parameters for the `createResourceInstance` operation. */ interface CreateResourceInstanceParams { /** The name of the instance. Must be 180 characters or less and cannot include any special characters other * than `(space) - . _ :`. */ name: string; /** The deployment location where the instance should be hosted. */ target: string; /** The ID of the resource group. */ resourceGroup: string; /** The unique ID of the plan associated with the offering. This value is provided by and stored in the global * catalog. */ resourcePlanId: string; /** Tags that are attached to the instance after provisioning. These tags can be searched and managed through * the Tagging API in IBM Cloud. */ tags?: string[]; /** A boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a * region instance delete call. */ allowCleanup?: boolean; /** Configuration options represented as key-value pairs that are passed through to the target resource brokers. * Set the `onetime_credentials` property to specify whether newly created resource key credentials can be * retrieved by using get resource key or get a list of all of the resource keys requests. */ parameters?: JsonObject; /** Indicates if the resource instance is locked for further update or delete operations. It does not affect * actions performed on child resources like aliases, bindings or keys. False by default. */ entityLock?: boolean; headers?: OutgoingHttpHeaders; } /** Parameters for the `getResourceInstance` operation. */ interface GetResourceInstanceParams { /** The resource instance URL-encoded CRN or GUID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteResourceInstance` operation. */ interface DeleteResourceInstanceParams { /** The resource instance URL-encoded CRN or GUID. */ id: string; /** Will delete resource bindings, keys and aliases associated with the instance. */ recursive?: boolean; headers?: OutgoingHttpHeaders; } /** Parameters for the `updateResourceInstance` operation. */ interface UpdateResourceInstanceParams { /** The resource instance URL-encoded CRN or GUID. */ id: string; /** The new name of the instance. Must be 180 characters or less and cannot include any special characters other * than `(space) - . _ :`. */ name?: string; /** The new configuration options for the instance. Set the `onetime_credentials` property to specify whether * newly created resource key credentials can be retrieved by using get resource key or get a list of all of the * resource keys requests. */ parameters?: JsonObject; /** The unique ID of the plan associated with the offering. This value is provided by and stored in the global * catalog. */ resourcePlanId?: string; /** A boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a * region instance delete call. */ allowCleanup?: boolean; headers?: OutgoingHttpHeaders; } /** Parameters for the `listResourceAliasesForInstance` operation. */ interface ListResourceAliasesForInstanceParams { /** The resource instance URL-encoded CRN or GUID. */ id: string; /** Limit on how many items should be returned. */ limit?: number; /** An optional token that indicates the beginning of the page of results to be returned. Any additional query * parameters are ignored if a page token is present. If omitted, the first page of results is returned. This value * is obtained from the 'start' query parameter in the 'next_url' field of the operation response. */ start?: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `listResourceKeysForInstance` operation. */ interface ListResourceKeysForInstanceParams { /** The resource instance URL-encoded CRN or GUID. */ id: string; /** Limit on how many items should be returned. */ limit?: number; /** An optional token that indicates the beginning of the page of results to be returned. Any additional query * parameters are ignored if a page token is present. If omitted, the first page of results is returned. This value * is obtained from the 'start' query parameter in the 'next_url' field of the operation response. */ start?: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `lockResourceInstance` operation. */ interface LockResourceInstanceParams { /** The resource instance URL-encoded CRN or GUID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `unlockResourceInstance` operation. */ interface UnlockResourceInstanceParams { /** The resource instance URL-encoded CRN or GUID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `cancelLastopResourceInstance` operation. */ interface CancelLastopResourceInstanceParams { /** The resource instance URL-encoded CRN or GUID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `listResourceKeys` operation. */ interface ListResourceKeysParams { /** The GUID of the key. */ guid?: string; /** The human-readable name of the key. */ name?: string; /** The ID of the resource group. */ resourceGroupId?: string; /** The unique ID of the offering. This value is provided by and stored in the global catalog. */ resourceId?: string; /** Limit on how many items should be returned. */ limit?: number; /** An optional token that indicates the beginning of the page of results to be returned. Any additional query * parameters are ignored if a page token is present. If omitted, the first page of results is returned. This value * is obtained from the 'start' query parameter in the 'next_url' field of the operation response. */ start?: string; /** Start date inclusive filter. */ updatedFrom?: string; /** End date inclusive filter. */ updatedTo?: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `createResourceKey` operation. */ interface CreateResourceKeyParams { /** The name of the key. */ name: string; /** The ID of resource instance or alias. */ source: string; /** Configuration options represented as key-value pairs. Service defined options are passed through to the * target resource brokers, whereas platform defined options are not. */ parameters?: ResourceKeyPostParameters; /** The base IAM service role name (Reader, Writer, or Manager), or the service or custom role CRN. Refer to * service’s documentation for supported roles. */ role?: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `getResourceKey` operation. */ interface GetResourceKeyParams { /** The resource key URL-encoded CRN or GUID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteResourceKey` operation. */ interface DeleteResourceKeyParams { /** The resource key URL-encoded CRN or GUID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `updateResourceKey` operation. */ interface UpdateResourceKeyParams { /** The resource key URL-encoded CRN or GUID. */ id: string; /** The new name of the key. Must be 180 characters or less and cannot include any special characters other than * `(space) - . _ :`. */ name: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `listResourceBindings` operation. */ interface ListResourceBindingsParams { /** The GUID of the binding. */ guid?: string; /** The human-readable name of the binding. */ name?: string; /** The ID of the resource group. */ resourceGroupId?: string; /** The unique ID of the offering (service name). This value is provided by and stored in the global catalog. */ resourceId?: string; /** The ID of the binding in the target environment. For example, `service_binding_id` in a given IBM Cloud * environment. */ regionBindingId?: string; /** Limit on how many items should be returned. */ limit?: number; /** An optional token that indicates the beginning of the page of results to be returned. Any additional query * parameters are ignored if a page token is present. If omitted, the first page of results is returned. This value * is obtained from the 'start' query parameter in the 'next_url' field of the operation response. */ start?: string; /** Start date inclusive filter. */ updatedFrom?: string; /** End date inclusive filter. */ updatedTo?: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `createResourceBinding` operation. */ interface CreateResourceBindingParams { /** The ID of resource alias. */ source: string; /** The CRN of application to bind to in a specific environment, for example, Dallas YP, CFEE instance. */ target: string; /** The name of the binding. Must be 180 characters or less and cannot include any special characters other than * `(space) - . _ :`. */ name?: string; /** Configuration options represented as key-value pairs. Service defined options are passed through to the * target resource brokers, whereas platform defined options are not. */ parameters?: ResourceBindingPostParameters; /** The base IAM service role name (Reader, Writer, or Manager), or the service or custom role CRN. Refer to * service’s documentation for supported roles. */ role?: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `getResourceBinding` operation. */ interface GetResourceBindingParams { /** The resource binding URL-encoded CRN or GUID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteResourceBinding` operation. */ interface DeleteResourceBindingParams { /** The resource binding URL-encoded CRN or GUID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `updateResourceBinding` operation. */ interface UpdateResourceBindingParams { /** The resource binding URL-encoded CRN or GUID. */ id: string; /** The new name of the binding. Must be 180 characters or less and cannot include any special characters other * than `(space) - . _ :`. */ name: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `listResourceAliases` operation. */ interface ListResourceAliasesParams { /** The GUID of the alias. */ guid?: string; /** The human-readable name of the alias. */ name?: string; /** The ID of the resource instance. */ resourceInstanceId?: string; /** The ID of the instance in the target environment. For example, `service_instance_id` in a given IBM Cloud * environment. */ regionInstanceId?: string; /** The unique ID of the offering (service name). This value is provided by and stored in the global catalog. */ resourceId?: string; /** The ID of the resource group. */ resourceGroupId?: string; /** Limit on how many items should be returned. */ limit?: number; /** An optional token that indicates the beginning of the page of results to be returned. Any additional query * parameters are ignored if a page token is present. If omitted, the first page of results is returned. This value * is obtained from the 'start' query parameter in the 'next_url' field of the operation response. */ start?: string; /** Start date inclusive filter. */ updatedFrom?: string; /** End date inclusive filter. */ upd