@ibm-cloud/ibm-schematics
Version:
IBM Cloud Node SDK
752 lines • 418 kB
TypeScript
/**
* (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" />
/// <reference types="node" />
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http';
import { BaseService, SDKLogger, UserOptions } from 'ibm-cloud-sdk-core';
/**
* IBM Cloud Schematics service is to provide the capability to manage resources of cloud provider infrastructure by
* using file based configurations. With the IBM Cloud Schematics service you can specify the required set of
* resources and the configuration in `config files`, and then pass the config files to the service to fulfill it by
* calling the necessary actions on the infrastructure. This principle is known as Infrastructure as Code. For more
* information, refer to [Getting started with IBM Cloud Schematics]
* (https://cloud.ibm.com/docs/schematics?topic=schematics-getting-started).
*
* API Version: 1.0
*/
declare class SchematicsV1 extends BaseService {
static _logger: SDKLogger;
static DEFAULT_SERVICE_URL: string;
static DEFAULT_SERVICE_NAME: string;
/*************************
* Factory method
************************/
/**
* Constructs an instance of SchematicsV1 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 {SchematicsV1}
*/
static newInstance(options: UserOptions): SchematicsV1;
/**
* Construct a SchematicsV1 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 {SchematicsV1}
*/
constructor(options: UserOptions);
/*************************
* util
************************/
/**
* List supported schematics locations.
*
* Retrieve a list of IBM Cloud locations where you can create the Schematics workspace or action. workspaces.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} [params] - The parameters to send to the service.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.SchematicsLocations[]>>}
*/
listSchematicsLocation(params?: SchematicsV1.ListSchematicsLocationParams): Promise<SchematicsV1.Response<SchematicsV1.SchematicsLocations[]>>;
/**
* List supported locations.
*
* Retrieve a list of IBM Cloud locations where you can work with the Schematics objects.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} [params] - The parameters to send to the service.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.SchematicsLocationsList>>}
*/
listLocations(params?: SchematicsV1.ListLocationsParams): Promise<SchematicsV1.Response<SchematicsV1.SchematicsLocationsList>>;
/**
* List resource groups.
*
* Retrieve a list of IBM Cloud resource groups that your account has access to.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} [params] - The parameters to send to the service.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.ResourceGroupResponse[]>>}
*/
listResourceGroup(params?: SchematicsV1.ListResourceGroupParams): Promise<SchematicsV1.Response<SchematicsV1.ResourceGroupResponse[]>>;
/**
* Get Schematics API information.
*
* Retrieve detailed information about the IBM Cloud Schematics API version and the version of the provider plug-ins
* that the API uses.
*
* @param {Object} [params] - The parameters to send to the service.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.VersionResponse>>}
*/
getSchematicsVersion(params?: SchematicsV1.GetSchematicsVersionParams): Promise<SchematicsV1.Response<SchematicsV1.VersionResponse>>;
/**
* Get variable metadata by parsing the template.
*
* Get the variable metadata from the template. This metadata can be passed in the payload during Schematics workspace
* create or update API call.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions, see
* [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.templateType - Template type such as **terraform**, **ansible**, **helm**, **cloudpak**, or
* **bash script**.
* @param {ExternalSource} params.source - Source of templates, playbooks, or controls.
* @param {string} [params.region] - Region on which request should process. Applicable only on global endpoint.
* @param {string} [params.sourceType] - Type of source for the Template.
* @param {string} [params.xGithubToken] - The personal access token to authenticate with your private GitHub or
* GitLab repository and access your Terraform template.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.TemplateMetaDataResponse>>}
*/
processTemplateMetaData(params: SchematicsV1.ProcessTemplateMetaDataParams): Promise<SchematicsV1.Response<SchematicsV1.TemplateMetaDataResponse>>;
/*************************
* workspaces
************************/
/**
* List workspaces.
*
* Retrieve a list of Schematics workspaces from your IBM Cloud account that you have access to. The list of
* workspaces that is returned depends on the API endpoint that you use. For example, if you use an API endpoint for a
* geography, such as North America, only workspaces that are created in `us-south` or `us-east` are returned.
*
* For more information about supported API endpoints, see [API endpoints](/apidocs/schematics#api-endpoints).
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} [params] - The parameters to send to the service.
* @param {number} [params.offset] - The starting position of the item in the list of items. For example, if you have
* three workspaces in your account, the first workspace is assigned position number 0, the second workspace is
* assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces
* `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the
* `offset` option. Negative numbers are not supported and are ignored.
* @param {number} [params.limit] - The maximum number of items that you want to list. The number must be a positive
* integer between 1 and 2000. If no value is provided, 100 is used by default.
* @param {string} [params.profile] - Level of details returned by the get method.
* @param {string} [params.resourceGroup] - The resource group (by default, fetch from all resource groups) name or
* ID.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponseList>>}
*/
listWorkspaces(params?: SchematicsV1.ListWorkspacesParams): Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponseList>>;
/**
* Create a workspace.
*
* Create an IBM Cloud Schematics workspace that points to the source repository where your Terraform template or the
* IBM Cloud software template is stored. You can decide to create your workspace without connecting it to a GitHub or
* GitLab repository. Your workspace is then created with a **Draft** state. To later connect your workspace to a
* GitHub or GitLab repository, you must use the `PUT /v1/workspaces/{id}` API to update the workspace or use the
* `/v1/workspaces/{id}/templates/{template_id}/template_repo_upload` API to upload a TAR file instead.
*
* **Getting API endpoint**:-
*
* * The Schematics API endpoint that you use to create the workspace determines where your Schematics actions run
* and your data is stored. See [API endpoints](/apidocs/schematics#api-endpoints) for more information.
* * If you use the API endpoint for a geography and not a specific location, such as North America, you can specify
* the location in your API request body.
* * If you do not specify the location in the request body, Schematics determines your workspace location based on
* availability.
* * If you use an API endpoint for a specific location, such as Frankfurt, the location that you enter in your API
* request body must match your API endpoint.
* * You also have the option to not specify a location in your API request body if you use a location-specific API
* endpoint.
*
* **Getting IAM access token** :-
* * Before you create Schematics workspace, you need to create the IAM access token for your IBM Cloud Account.
* * To create IAM access token, use `export IBMCLOUD_API_KEY=<ibmcloud_api_key>` and execute `curl -X POST
* "https://iam.cloud.ibm.com/identity/token" -H "Content-Type= application/x-www-form-urlencoded" -d
* "grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey=$IBMCLOUD_API_KEY" -u bx:bx`. For more information, about
* creating IAM access token and API Docs, see [IAM access token](/apidocs/iam-identity-token-api#gettoken-password)
* and [Create API key](/apidocs/iam-identity-token-api#create-api-key).
* * You can set the environment values `export ACCESS_TOKEN=<access_token>` and `export
* REFRESH_TOKEN=<refresh_token>`.
* * You can use the obtained IAM access token in create workspace `curl` command.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} [params] - The parameters to send to the service.
* @param {string[]} [params.appliedShareddataIds] - Deprecated: List of applied shared dataset ID.
* @param {CatalogRef} [params.catalogRef] - Information about the software template that you chose from the IBM Cloud
* catalog. This information is returned for IBM Cloud catalog offerings only.
* @param {Dependencies} [params.dependencies] - Workspace dependencies.
* @param {string} [params.description] - The description of the workspace.
* @param {string} [params.location] - The location where you want to create your Schematics workspace and run the
* Schematics jobs. The location that you enter must match the API endpoint that you use. For example, if you use the
* Frankfurt API endpoint, you must specify `eu-de` as your location. If you use an API endpoint for a geography and
* you do not specify a location, Schematics determines the location based on availability.
* @param {string} [params.name] - The name of your workspace. The name can be up to 128 characters long and can
* include alphanumeric characters, spaces, dashes, and underscores. When you create a workspace for your own
* Terraform template, consider including the microservice component that you set up with your Terraform template and
* the IBM Cloud environment where you want to deploy your resources in your name.
* @param {string} [params.resourceGroup] - The ID of the resource group where you want to provision the workspace.
* @param {SharedTargetData} [params.sharedData] - Information about the Target used by the templates originating from
* the IBM Cloud catalog offerings. This information is not relevant for workspace created using your own Terraform
* template.
* @param {string[]} [params.tags] - A list of tags that are associated with the workspace.
* @param {TemplateSourceDataRequest[]} [params.templateData] - Input data for the Template.
* @param {string} [params.templateRef] - Workspace template ref.
* @param {TemplateRepoRequest} [params.templateRepo] - Input variables for the Template repoository, while creating a
* workspace.
* @param {string[]} [params.type] - List of Workspace type.
* @param {WorkspaceStatusRequest} [params.workspaceStatus] - WorkspaceStatusRequest -.
* @param {string} [params.agentId] - agent id which is binded to with the workspace.
* @param {VariableData[]} [params.settings] - Input settings to be applied to the workspace, for example,
* `job_timeout_override`.
* @param {string} [params.xGithubToken] - The personal access token to authenticate with your private GitHub or
* GitLab repository and access your Terraform template.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponse>>}
*/
createWorkspace(params?: SchematicsV1.CreateWorkspaceParams): Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponse>>;
/**
* Get workspace details.
*
* Retrieve detailed information for a workspace in your IBM Cloud account.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions, see [Schematics service access
* roles and required permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponse>>}
*/
getWorkspace(params: SchematicsV1.GetWorkspaceParams): Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponse>>;
/**
* Update workspace.
*
* Use this API to update or replace the entire workspace, including the Terraform template (`template_repo`) or IBM
* Cloud catalog software template (`catalog_ref`) that your workspace points to.
*
* **Tip**:- If you want to update workspace metadata, use the `PATCH /v1/workspaces/{id}` API.
* To update workspace variables, use the `PUT /v1/workspaces/{id}/template_data/{template_id}/values` API.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {CatalogRef} [params.catalogRef] - Information about the software template that you chose from the IBM Cloud
* catalog. This information is returned for IBM Cloud catalog offerings only.
* @param {string} [params.description] - The description of the workspace.
* @param {Dependencies} [params.dependencies] - Workspace dependencies.
* @param {string} [params.name] - The name of the workspace.
* @param {SharedTargetData} [params.sharedData] - Information about the Target used by the templates originating from
* the IBM Cloud catalog offerings. This information is not relevant for workspace created using your own Terraform
* template.
* @param {string[]} [params.tags] - A list of tags that you want to associate with your workspace.
* @param {TemplateSourceDataRequest[]} [params.templateData] - Input data for the Template.
* @param {TemplateRepoUpdateRequest} [params.templateRepo] - Input to update the template repository data.
* @param {string[]} [params.type] - List of Workspace type.
* @param {WorkspaceStatusUpdateRequest} [params.workspaceStatus] - Input to update the workspace status.
* @param {WorkspaceStatusMessage} [params.workspaceStatusMsg] - Information about the last job that ran against the
* workspace. -.
* @param {string} [params.agentId] - agent id that process workspace jobs.
* @param {VariableData[]} [params.settings] - Input settings to be applied to the workspace, for example,
* `job_timeout_override`.
* @param {string} [params.xGithubToken] - The personal access token to authenticate with your private GitHub or
* GitLab repository and access your Terraform template.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponse>>}
*/
replaceWorkspace(params: SchematicsV1.ReplaceWorkspaceParams): Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponse>>;
/**
* Delete a workspace.
*
* Deletes a workspace from IBM Cloud Schematics. Deleting a workspace does not automatically remove the IBM Cloud
* resources that the workspace manages. To remove all resources that are associated with the workspace, use the
* `DELETE /v1/workspaces/{id}?destroy_resources=true` API.
*
* **Note**: If you delete a workspace without deleting the resources,
* you must manage your resources with the resource dashboard or CLI afterwards.
* You cannot use IBM Cloud Schematics anymore to manage your resources.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.refreshToken - The IAM refresh token for the user or service identity. The IAM refresh token
* is required only if you want to destroy the Terraform resources before deleting the Schematics workspace. If you
* want to delete the workspace only and keep all your Terraform resources, refresh token is not required.
*
* **Retrieving refresh token**:
* * Use `export IBMCLOUD_API_KEY=<ibmcloud_api_key>`, and execute `curl -X POST
* "https://iam.cloud.ibm.com/identity/token" -H "Content-Type: application/x-www-form-urlencoded" -d
* "grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey=$IBMCLOUD_API_KEY" -u bx:bx`.
* * For more information, about creating IAM access token and API Docs, refer, [IAM access
* token](/apidocs/iam-identity-token-api#gettoken-password) and [Create API
* key](/apidocs/iam-identity-token-api#create-api-key).
*
* **Limitation**:
* * If the token is expired, you can use `refresh token` to get a new IAM access token.
* * The `refresh_token` parameter cannot be used to retrieve a new IAM access token.
* * When the IAM access token is about to expire, use the API key to create a new access token.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {string} [params.destroyResources] - If set to `true`, refresh_token header configuration is required to
* delete all the Terraform resources, and the Schematics workspace. If set to `false`, you can remove only the
* workspace. Your Terraform resources are still available and must be managed with the resource dashboard or CLI.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<string>>}
*/
deleteWorkspace(params: SchematicsV1.DeleteWorkspaceParams): Promise<SchematicsV1.Response<string>>;
/**
* Update workspace metadata.
*
* Use this API to update the following workspace metadata:
*
* * Workspace name (`name`) - **Note**: Updating the workspace name does not update the ID of the workspace.
* * Workspace description (`description`)
* * Tags (`tags[]`)
* * Resource group (`resource_group`)
* * Workspace status (`workspace_status.frozen`)
*
*
* **Tip**: If you want to update information about the Terraform template
* or IBM Cloud catalog software template that your workspace points to,
* use the `PUT /v1/workspaces/{id}` API. To update workspace variables,
* use the `PUT /v1/workspaces/{id}/template_data/{template_id}/values` API.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {CatalogRef} [params.catalogRef] - Information about the software template that you chose from the IBM Cloud
* catalog. This information is returned for IBM Cloud catalog offerings only.
* @param {string} [params.description] - The description of the workspace.
* @param {Dependencies} [params.dependencies] - Workspace dependencies.
* @param {string} [params.name] - The name of the workspace.
* @param {SharedTargetData} [params.sharedData] - Information about the Target used by the templates originating from
* the IBM Cloud catalog offerings. This information is not relevant for workspace created using your own Terraform
* template.
* @param {string[]} [params.tags] - A list of tags that you want to associate with your workspace.
* @param {TemplateSourceDataRequest[]} [params.templateData] - Input data for the Template.
* @param {TemplateRepoUpdateRequest} [params.templateRepo] - Input to update the template repository data.
* @param {string[]} [params.type] - List of Workspace type.
* @param {WorkspaceStatusUpdateRequest} [params.workspaceStatus] - Input to update the workspace status.
* @param {WorkspaceStatusMessage} [params.workspaceStatusMsg] - Information about the last job that ran against the
* workspace. -.
* @param {string} [params.agentId] - agent id that process workspace jobs.
* @param {VariableData[]} [params.settings] - Input settings to be applied to the workspace, for example,
* `job_timeout_override`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponse>>}
*/
updateWorkspace(params: SchematicsV1.UpdateWorkspaceParams): Promise<SchematicsV1.Response<SchematicsV1.WorkspaceResponse>>;
/**
* Show workspace template readme.
*
* Retrieve the `README.md` file of the Terraform of IBM Cloud catalog template that your workspace points to.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {string} [params.ref] - The GitHub or GitLab branch where the `README.md` file is stored, or the commit ID
* or tag that references the `README.md` file that you want to retrieve. If you do not specify this option, the
* `README.md` file is retrieved from the master branch by default.
* @param {string} [params.formatted] - The format of the readme file. Value ''markdown'' will give markdown,
* otherwise html.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.TemplateReadme>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
getWorkspaceReadme(params: SchematicsV1.GetWorkspaceReadmeParams): Promise<SchematicsV1.Response<SchematicsV1.TemplateReadme>>;
/**
* Upload a TAR file to your workspace.
*
* Provide your Terraform template by uploading a TAR file from your local machine. Before you use this API, you must
* create a workspace without a link to a GitHub or GitLab repository with the `POST /v1/workspaces` API.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace where you want to upload your `.tar` file. To find the
* workspace ID, use the `GET /v1/workspaces` API.
* @param {string} params.tId - The ID of the Terraform template in your workspace. When you create a workspace, a
* unique ID is assigned to your Terraform template, even if no template was provided during workspace creation. To
* find this ID, use the `GET /v1/workspaces` API and review the `template_data.id` value.
* @param {NodeJS.ReadableStream | Buffer} [params.file] - Template tar file.
* @param {string} [params.fileContentType] - The content type of file.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.TemplateRepoTarUploadResponse>>}
*/
templateRepoUpload(params: SchematicsV1.TemplateRepoUploadParams): Promise<SchematicsV1.Response<SchematicsV1.TemplateRepoTarUploadResponse>>;
/**
* List workspace input variables.
*
* Retrieve a list of input variables that are declared in your Terraform or IBM Cloud catalog template.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {string} params.tId - The ID of the Terraform template in your workspace. When you create a workspace, the
* Terraform template that your workspace points to is assigned a unique ID. Use the `GET /v1/workspaces` to look up
* the workspace IDs and template IDs or `template_data.id` in your IBM Cloud account.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.TemplateValues>>}
*/
getWorkspaceInputs(params: SchematicsV1.GetWorkspaceInputsParams): Promise<SchematicsV1.Response<SchematicsV1.TemplateValues>>;
/**
* Replace workspace input variables.
*
* Replace or Update the input variables for the template that your workspace points to.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {string} params.tId - The ID of the Terraform template in your workspace. When you create a workspace, the
* Terraform template that your workspace points to is assigned a unique ID. Use the `GET /v1/workspaces` to look up
* the workspace IDs and template IDs or `template_data.id` in your IBM Cloud account.
* @param {JsonObject[]} [params.envValues] - A list of environment variables that you want to apply during the
* execution of a bash script or Terraform job. This field must be provided as a list of key-value pairs, for example,
* **TF_LOG=debug**. Each entry will be a map with one entry where `key is the environment variable name and value is
* value`. You can define environment variables for IBM Cloud catalog offerings that are provisioned by using a bash
* script. See [example to use special environment
* variable](https://cloud.ibm.com/docs/schematics?topic=schematics-set-parallelism#parallelism-example) that are
* supported by Schematics.
* @param {string} [params.values] - User values.
* @param {WorkspaceVariableRequest[]} [params.variablestore] - VariablesRequest -.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.UserValues>>}
*/
replaceWorkspaceInputs(params: SchematicsV1.ReplaceWorkspaceInputsParams): Promise<SchematicsV1.Response<SchematicsV1.UserValues>>;
/**
* Get workspace template details.
*
* Retrieve detailed information about the Terraform template that your workspace points to.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace for which you want to retrieve input parameters and values.
* To find the workspace ID, use the `GET /workspaces` API.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.WorkspaceTemplateValuesResponse>>}
*/
getAllWorkspaceInputs(params: SchematicsV1.GetAllWorkspaceInputsParams): Promise<SchematicsV1.Response<SchematicsV1.WorkspaceTemplateValuesResponse>>;
/**
* List workspace variable metadata.
*
* Retrieve the metadata for all the workspace input variables that are declared in the template that your workspace
* points to.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace for which you want to retrieve the metadata of the input
* variables that are declared in the template. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {string} params.tId - The ID of the Terraform template for which you want to retrieve the metadata of your
* input variables. When you create a workspace, the Terraform template that your workspace points to is assigned a
* unique ID. To find this ID, use the `GET /v1/workspaces` API and review the `template_data.id` value.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.JsonObject[]>>}
*/
getWorkspaceInputMetadata(params: SchematicsV1.GetWorkspaceInputMetadataParams): Promise<SchematicsV1.Response<SchematicsV1.JsonObject[]>>;
/**
* List workspace output values.
*
* Retrieve a list of Terraform output variables. You define output values in your Terraform template to include
* information that you want to make accessible for other Terraform templates.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace for which you want to retrieve output parameters and values.
* To find the workspace ID, use the `GET /workspaces` API.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.OutputValuesInner[]>>}
*/
getWorkspaceOutputs(params: SchematicsV1.GetWorkspaceOutputsParams): Promise<SchematicsV1.Response<SchematicsV1.OutputValuesInner[]>>;
/**
* List workspace resources.
*
* Retrieve a list of IBM Cloud resources that you created with your workspace.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.TemplateResources[]>>}
*/
getWorkspaceResources(params: SchematicsV1.GetWorkspaceResourcesParams): Promise<SchematicsV1.Response<SchematicsV1.TemplateResources[]>>;
/**
* Get Terraform statefile URL.
*
* This API is deprecated, and is replaced by the `GET /v2/jobs/{job_id}/files`, with `file_type` equal `state_file`.
* Retrieve the URL to the Terraform statefile (`terraform.tfstate`). You use the URL to access the Terraform
* statefile. The Terraform statefile includes detailed information about the IBM Cloud resources that you provisioned
* with IBM Cloud Schematics and Schematics uses the file to determine future create, modify, or delete actions for
* your resources. To show the content of the Terraform statefile, use the `GET
* /v1/workspaces/{id}/runtime_data/{template_id}/state_store` API.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace for which you want to retrieve the Terraform statefile. To
* find the workspace ID, use the `GET /v1/workspaces` API.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.StateStoreResponseList>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
getWorkspaceState(params: SchematicsV1.GetWorkspaceStateParams): Promise<SchematicsV1.Response<SchematicsV1.StateStoreResponseList>>;
/**
* Show Terraform statefile content.
*
* This API is deprecated, and is replaced by the `GET /v2/jobs/{job_id}/files`, with `file_type` equal `state_file`.
* Show the content of the Terraform statefile (`terraform.tfstate`) that was created when your Terraform template was
* applied in IBM Cloud. The statefile holds detailed information about the IBM Cloud resources that were created by
* IBM Cloud Schematics and Schematics uses the file to determine future create, modify, or delete actions for your
* resources.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace for which you want to retrieve the Terraform statefile. To
* find the workspace ID, use the `GET /v1/workspaces` API.
* @param {string} params.tId - The ID of the Terraform template for which you want to retrieve the Terraform
* statefile. When you create a workspace, the Terraform template that your workspace points to is assigned a unique
* ID. To find this ID, use the `GET /v1/workspaces` API and review the template_data.id value.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.TemplateStateStore>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
getWorkspaceTemplateState(params: SchematicsV1.GetWorkspaceTemplateStateParams): Promise<SchematicsV1.Response<SchematicsV1.TemplateStateStore>>;
/**
* Get workspace job log URL.
*
* Get the Terraform log file URL for a workspace job. You can retrieve the log URL for jobs that were created with
* the `PUT /v1/workspaces/{id}/apply`, `POST /v1/workspaces/{id}/plan`, or `DELETE /v1/workspaces/{id}/destroy` API.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace for which you want to retrieve the Terraform statefile. To
* find the workspace ID, use the `GET /v1/workspaces` API.
* @param {string} params.activityId - The ID of the activity or job, for which you want to retrieve details. To find
* the job ID, use the `GET /v1/workspaces/{id}/actions` API.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.WorkspaceActivityLogs>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
getWorkspaceActivityLogs(params: SchematicsV1.GetWorkspaceActivityLogsParams): Promise<SchematicsV1.Response<SchematicsV1.WorkspaceActivityLogs>>;
/**
* Get latest workspace job log URL for all workspace templates.
*
* Retrieve the log file URL for the latest job of a template that ran against your workspace. You use this URL to
* retrieve detailed logs for the latest job.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.LogStoreResponseList>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
getWorkspaceLogUrls(params: SchematicsV1.GetWorkspaceLogUrlsParams): Promise<SchematicsV1.Response<SchematicsV1.LogStoreResponseList>>;
/**
* Show latest logs for a workspace template.
*
* Show the Terraform logs for the most recent job of a template that ran against your workspace.
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {string} params.tId - The ID of the Terraform template or IBM Cloud catalog software template in the
* workspace. Use the `GET /v1/workspaces` to look up the workspace IDs and template IDs or `template_data.id`.
* @param {boolean} [params.logTfCmd] - Enter false to replace the first line in each Terraform command section, such
* as Terraform INIT or Terraform PLAN, with Schematics INIT (Schematics PLAN) in your log output. In addition, the
* log lines Starting command: terraform init -input=false -no-color and Starting command: terraform apply
* -state=terraform.tfstate -var-file=schematics.tfvars -auto-approve -no-color are suppressed. All subsequent
* command lines still use the Terraform command prefix. To remove this prefix, use the log_tf_prefix option.
* @param {boolean} [params.logTfPrefix] - `false` will hide all the terraform command prefix in the log statements.
* @param {boolean} [params.logTfNullResource] - `false` will hide all the null resource prefix in the log statements.
* @param {boolean} [params.logTfAnsible] - `true` will format all logs to withhold the original format of ansible
* output in the log statements.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<string>>}
*/
getTemplateLogs(params: SchematicsV1.GetTemplateLogsParams): Promise<SchematicsV1.Response<string>>;
/**
* Show logs for a workspace job.
*
* Show the Terraform logs for an job that ran against your workspace.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.wId - The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.
* @param {string} params.tId - The ID of the Terraform template or IBM Cloud catalog software template in the
* workspace. Use the `GET /v1/workspaces` to look up the workspace IDs and template IDs or `template_data.id`.
* @param {string} params.activityId - The ID of the activity or job, for which you want to retrieve details. To find
* the job ID, use the `GET /v1/workspaces/{id}/actions` API.
* @param {boolean} [params.logTfCmd] - Enter false to replace the first line in each Terraform command section, such
* as Terraform INIT or Terraform PLAN, with Schematics INIT (Schematics PLAN) in your log output. In addition, the
* log lines Starting command: terraform init -input=false -no-color and Starting command: terraform apply
* -state=terraform.tfstate -var-file=schematics.tfvars -auto-approve -no-color are suppressed. All subsequent
* command lines still use the Terraform command prefix. To remove this prefix, use the log_tf_prefix option.
* @param {boolean} [params.logTfPrefix] - `false` will hide all the terraform command prefix in the log statements.
* @param {boolean} [params.logTfNullResource] - `false` will hide all the null resource prefix in the log statements.
* @param {boolean} [params.logTfAnsible] - `true` will format all logs to withhold the original format of ansible
* output in the log statements.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<string>>}
*/
getTemplateActivityLog(params: SchematicsV1.GetTemplateActivityLogParams): Promise<SchematicsV1.Response<string>>;
/*************************
* actions
************************/
/**
* List actions.
*
* Retrieve a list of all Schematics actions that depends on the API endpoint that you have access. For example, if
* you use an API endpoint for a geography, such as North America, only actions that are created in `us-south` or
* `us-east` are retrieved.
*
* For more information, about supported API endpoints, see
* [API endpoints](/apidocs/schematics#api-endpoints).
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions, see
* [Schematics service access roles and required
* permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).
*
* @param {Object} [params] - The parameters to send to the service.
* @param {number} [params.offset] - The starting position of the item in the list of items. For example, if you have
* three workspaces in your account, the first workspace is assigned position number 0, the second workspace is
* assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces
* `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the
* `offset` option. Negative numbers are not supported and are ignored.
* @param {number} [params.limit] - The maximum number of items that you want to list. The number must be a positive
* integer between 1 and 2000. If no value is provided, 100 is used by default.
* @param {string} [params.sort] - Name of the field to sort-by; Use the '.' character to delineate sub-resources and
* sub-fields (eg. owner.last_name). Prepend the field with '+' or '-', indicating 'ascending' or 'descending'
* (default is ascending) Ignore unrecognized or unsupported sort field.
* @param {string} [params.profile] - Level of details returned by the get method.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<SchematicsV1.Response<SchematicsV1.ActionList>>}
*/
listActions(params?: SchematicsV1.ListActionsParams): Promise<SchematicsV1.Response<SchematicsV1.ActionList>>;
/**
* Create an action.
*
* Create an IBM Cloud Schematics action to run on a single target or groups of target hosts, roles, policies, or
* steps to deploy your resources in the target hosts. You can run the IBM Cloud resources the order in which you want
* to execute them. **Note** If your Git repository already contains a host file. Schematics does not overwrite the
* host file already present in your Git repository. For sample templates, see IBM Cloud Automation
* [templates](https://github.com/Cloud-Schematics).
*
* The Schematics action API now supports bastion host connection with `non-root` user, and bastion connection type
* is marked as optional, when inventory connection type is set as [Windows Remote
* Management](https://www.ibm.com/docs/en/license-metric-tool?topic=v-configuring-winrm-hyper-hosts)(`winrm`).
*
* For more information, about the Schematics create action,
* see [ibmcloud schematics action
* create](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-reference#schematics-create-action).
* **Note** you cannot update the location and region once an action is created.
* Also, make sure your IP addresses are in the
* [allowlist](https://cloud.ibm.com/docs/schematics?topic=schematics-allowed-ipaddresses).
*
* <h3>Authorization</h3>
*
* Schematics support generic authorization for its resources.
* For more information, about Schematics access and permissions,
* see [Schematics service access roles and required
* permissions](/docs/schematics?topic=schematics-access#action-permissions).
*
* @param {Object} [params] - The parameters to send to the service.
* @param {string} [params.name] - The unique name of your action. The name can be up to 128 characters long and can
* include alphanumeric characters, spaces, dashes, and underscores. **Example** you can use the name to stop action.
* @param {string} [params.description] - Action description.
* @param {string} [params.location] - List of locations supported by IBM Cloud Schematics service. W