IBM Cloud API Docs

Introduction

IBM Cloud® projects are a named collection of configurations that are used to manage and deploy related resources and Infrastructure as Code (IaC). Projects ensure that the IaC is always managed, secure, and compliant. Use the API to create, manage, and deploy by using projects.

SDKs for Node, Python, and Go are available to make it easier to programmatically access the API from your code. The client libraries that are provided by the SDKs implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries.

For more information about using projects, see Learn about IaC deployments with projects.

Installing the Node SDK

npm install @ibm-cloud/project-node-client

View on GitHub

Installing the Python SDK

pip install ibm-project-sdk

Then in your code, you can import the service

from ibm_project_sdk.project_v1 import *

View on GitHub

Installing the Go SDK

Go modules (recommended): Add the following import in your code, and then run go build or go mod tidy

import (
	"github.com/IBM/project-go-sdk/projectv1"
)

Go get

go get -u github.com/IBM/project-go-sdk/1

View on GitHub

Endpoint URLs

The projects API uses the following global endpoint URL for all regions. When you call the API, add the path for each method to form the complete API endpoint for your requests. In the request examples, replace the {base_url} parameter with the endpoint URL.

https://projects.api.cloud.ibm.com

Example API request

curl --request POST --header "content-type: application/json" --header "accept: application/json" --header "authorization: Bearer <IAM_token>" --data "{\"query\":\"string\"}" --url "https://projects.api.cloud.ibm.com"

Replace <IAM token> in this example with your token value for your particular API call.

Authentication

The IBM Cloud projects API uses IBM Cloud Identity and Access Management (IAM) to authenticate requests.

To work with the API, authenticate your application or service by including your IBM Cloud IAM access token in API requests. In the request examples, replace any {IAM_Token} and {iam_token} parameters with the access token that you obtained from IAM.

To call each method, you need to be assigned a role that includes the required IAM actions. Each method lists the associated action. For more information about IAM actions and how they map to roles, see Assigning access to account management services.

To retrieve your access token, replace <API_KEY> with your IAM API key:

curl -X POST   "https://iam.cloud.ibm.com/identity/token"   --header 'Content-Type: application/x-www-form-urlencoded'   --header 'Accept: application/json'   --data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey'   --data-urlencode 'apikey=<API_KEY>'

To use the API, replace {IAM_Token} with the access token that you obtained from IAM, replace {http_method} with an HTTP method such as GET, and replace {url} with a request URL such as https://projects.api.cloud.ibm.com/projects?resource_group=Default&location=us-south":

curl -H "Authorization: Bearer {IAM_Token}" -X {http_method} "{url}"

Security scheme

Authentication to this API's methods uses one of the following security schemes.

basicAuth

Basic authentication: Set the IAM ID. Any IBM Cloud user can call the service broker API with a valid IAM ID.

Value
  • HTTP
  • Basic

selfCRNAuth

The self-CRN authorization.

Value
  • HTTP
  • Bearer

configCRNAuth

The config-CRN authorization.

Value
  • HTTP
  • Bearer

serviceEditorAuth

The service authorization with service IDs that have editor role permissions.

Value
  • HTTP
  • Bearer

serviceGhostAuth

The service authorization with service IDs for Ghost integration.

Value
  • HTTP
  • Bearer

serviceWebhookAuth

The service authorization with service IDs for webhook.

Value
  • HTTP
  • Bearer

userAuth

The user authorization level.

Value
  • HTTP
  • Bearer

Auditing

You can monitor API activity within your account by using the IBM Cloud Activity Tracker service. Whenever an API method is called, an event is generated that you can then track and audit from within Activity Tracker. The specific event type is listed for each individual method.

For more information about tracking project activity, see Auditing events for projects.

Error handling

This API uses standard HTTP status codes to indicate whether a method completed successfully. A 400 type response indicates a failure, and a 500 type response indicates an internal system error.

Table 1. Error codes
HTTP Error Code Description Recovery
400 Bad Request The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request.
401 Unauthorized You are not authorized to make this request. Log in to IBM Cloud and try again. If this error persists, contact the account owner to check your permissions.
403 Forbidden The supplied authentication is not authorized to access this resource.
404 Not Found The requested resource could not be found.
405 Method Not Allowed The requested resource doesn't support the request method.
408 Request Timeout The connection to the server timed out. Wait a few minutes, then try again.
409 Conflict The entity is already in the requested state.
410 Gone The requested resource is no longer available.
429 Too many requests Rate limiting in use. The user has sent too many requests.
500 Internal Server Error The request could not be completed by the server. It could be due to an internal error, or in some cases invalid data in the request.

Pagination

The IBM Cloud Projects API endpoints to list projects (GET /v1/projects), list configs (GET /v1/projects/{project_id}/configs), and list environments (GET /v1/projects/{project_id}/environments) can return many results. To improve performance, results are returned one page at a time, with a limited number of results on each page. The default page size is typically 10 items, with a maximum size of 100.

To specify a different page size, use the limit query parameter.

For a request that uses pagination, the response includes extra properties:

  • The first.href property links to the first page of resources
  • The next.href property links to the next page of resources (included for all pages except for the last page)

Use query parameters to page through your available resources and retrieve a subset of records. To retrieve the first page of results, make the request without specifying a token query parameter. If the results cannot fit on the first page, the response will include a next property, whose value can then be specified as the token parameter when the next page request is made. Each page of results is based on the resources that exist at the time of each paginated request. Therefore, the results might include resources that did not exist when the first request was made. The last page of results does not include a next property.

Rate limiting

Rate limits for API requests are enforced based on the number of requests from a user ID or client ID. If the number of requests from a particular user ID or client IP reaches the request limit within the specified time window, no further requests are accepted until the timer expires. After the timer expires, a new time window begins with the next accepted request.

The response to each HTTP request includes headers that you can use to determine whether you are close to the rate limit:

  • RateLimit-Reset: the time the current timer expires (in UNIX epoch time)
  • RateLimit-Remaining: the number of requests that remain in the current time window
  • RateLimit-Limit: the total number of requests that are allowed within the time window
  • Retry-After: the time to wait before a follow-up request is attempted

An HTTP status code of 429 indicates that the rate limit was exceeded.

The number of allowed requests and the length of the time window is the same for all methods and endpoints.

Change log

Important changes, such as additions, updates, and breaking changes, are marked with a change notice in this reference.

For a complete list of changes and improvements to this API, see the Projects API change log. Changes that require a new version are highlighted in the change log.

The configurations response models for all methods no longer use a pipeline_state. All status information of a configuration is available in the augmented state property in the canonical schema of a configuration. This update is a breaking change. For more information, see the Projects API change log for 6 November 2023.

Methods

Create a project

Create a new project and asynchronously setup the tools to manage it. Add a deployable architecture by customizing the configuration. After the changes are validated and approved, deploy the resources that the project configures. For more information, see Creating a project.

Create a new project and asynchronously setup the tools to manage it. Add a deployable architecture by customizing the configuration. After the changes are validated and approved, deploy the resources that the project configures. For more information, see Creating a project.

Create a new project and asynchronously setup the tools to manage it. Add a deployable architecture by customizing the configuration. After the changes are validated and approved, deploy the resources that the project configures. For more information, see Creating a project.

Create a new project and asynchronously setup the tools to manage it. Add a deployable architecture by customizing the configuration. After the changes are validated and approved, deploy the resources that the project configures. For more information, see Creating a project.

POST /v1/projects
create_project(
        self,
        definition: 'ProjectPrototypeDefinition',
        location: str,
        resource_group: str,
        *,
        configs: Optional[List['ProjectConfigPrototype']] = None,
        environments: Optional[List['EnvironmentPrototype']] = None,
        **kwargs,
    ) -> DetailedResponse
createProject(params)
(project *ProjectV1) CreateProject(createProjectOptions *CreateProjectOptions) (result *Project, response *core.DetailedResponse, err error)
(project *ProjectV1) CreateProjectWithContext(ctx context.Context, createProjectOptions *CreateProjectOptions) (result *Project, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to the project creation.

  • project.instance.create

Auditing

Calling this method generates the following auditing event.

  • project.project.create

Request

Instantiate the CreateProjectOptions struct and set the fields to provide parameter values for the CreateProject method.

A valid project definition document that adheres to the Project Definition schema.

Examples:

A project example request with configurations.

{
  "definition": {
    "name": "acme-microservice",
    "description": "A microservice to deploy on top of ACME infrastructure.",
    "authorizations": {
      "method": "trusted_profile",
      "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
    }
  },
  "configs": [
    {
      "definition": {
        "name": "account-stage",
        "description": "The stage account configuration.",
        "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
      }
    },
    {
      "definition": {
        "name": "env-stage",
        "description": "The stage environment configuration that includes services common to all the environment regions.",
        "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
        "inputs": {
          "account_id": "ref:/configs/account-stage/inputs/account_id",
          "resource_group": "stage",
          "access_tags": [
            "env:stage"
          ],
          "logdna_name": "The name of the LogDNA stage service instance.",
          "sysdig_name": "The name of the SysDig stage service instance."
        }
      }
    },
    {
      "definition": {
        "name": "region-us-south-stage",
        "description": "The stage us-south configuration.",
        "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
      }
    },
    {
      "definition": {
        "name": "region-eu-de-stage",
        "description": "The stage eu-de configuration.",
        "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
        "inputs": {
          "account_id": "ref:/configs/account-stage/inputs/account_id",
          "resource_group": "ref:/configs/env-stage/outputs/resource_group_id",
          "logdna_id": "ref:/configs/env-stage/outputs/logdna_id",
          "sysdig_id": "ref:/configs/env-stage/outputs/sysdig_id",
          "access_tags": [
            "region:eu-de"
          ]
        }
      }
    }
  ],
  "location": "us-south",
  "resource_group": "Default"
}

An empty project example request.

{
  "definition": {
    "name": "acme-microservice",
    "description": "A microservice to deploy on top of ACME infrastructure.",
    "authorizations": {
      "method": "trusted_profile",
      "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
    }
  },
  "location": "us-south",
  "resource_group": "Default"
}

An example request for project configurations environments.

{
  "definition": {
    "name": "acme-microservice",
    "description": "A microservice to deploy on top of ACME infrastructure."
  },
  "environments": [
    {
      "definition": {
        "name": "development",
        "description": "The 'development' environment.",
        "authorizations": {
          "method": "trusted_profile",
          "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
        },
        "inputs": {
          "resource_group": "stage",
          "region": "us-south"
        }
      }
    },
    {
      "definition": {
        "name": "production",
        "description": "The production environment."
      }
    }
  ],
  "location": "us-south",
  "resource_group": "Default"
}

A project example request for configurations by using a Schematics workspace.

{
  "definition": {
    "name": "acme-microservice",
    "description": "A microservice to deploy on top of ACME infrastructure.",
    "authorizations": {
      "method": "trusted_profile",
      "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
    }
  },
  "configs": [
    {
      "definition": {
        "name": "account-stage",
        "description": "The stage account configuration."
      },
      "schematics": {
        "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
      }
    }
  ],
  "location": "us-south",
  "resource_group": "Default"
}

parameters

  • The definition of the project.

  • The IBM Cloud location where a resource is deployed.

    Allowable values: [us-south,us-east,eu-gb,eu-de,ca-tor]

    Examples:
  • The resource group name where the project's data and tools are created.

    Possible values: 0 ≤ length ≤ 64, Value must match regular expression /^(?!\\s)(?!.*\\s$)[^'\"`<>{}\\x00-\\x1F]*$/

    Examples:
  • The project configurations. These configurations are included in the response of creating a project only if a configuration array is specified in the request payload.

    Possible values: 0 ≤ number of items ≤ 100

    Default: []

    Examples:
  • The project environment. These environments are included in the response of creating a project only if an environment array is specified in the request payload.

    Possible values: 0 ≤ number of items ≤ 20

    Default: []

parameters

  • The definition of the project.

  • The IBM Cloud location where a resource is deployed.

    Allowable values: [us-south,us-east,eu-gb,eu-de,ca-tor]

    Examples:
  • The resource group name where the project's data and tools are created.

    Possible values: 0 ≤ length ≤ 64, Value must match regular expression /^(?!\\s)(?!.*\\s$)[^'\"`<>{}\\x00-\\x1F]*$/

    Examples:
  • The project configurations. These configurations are included in the response of creating a project only if a configuration array is specified in the request payload.

    Possible values: 0 ≤ number of items ≤ 100

    Default: []

    Examples:
  • The project environment. These environments are included in the response of creating a project only if an environment array is specified in the request payload.

    Possible values: 0 ≤ number of items ≤ 20

    Default: []

WithContext method only

The CreateProject options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "definition": { "name": "acme-microservice", "description": "A microservice to deploy on top of ACME infrastructure.", "authorizations": { "method": "trusted_profile", "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12" } }, "configs": [ { "definition": { "name": "account-stage", "description": "The stage account configuration.", "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global" } }, { "definition": { "name": "env-stage", "description": "The stage environment configuration that includes services common to all the environment regions.", "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global", "inputs": { "account_id": "ref:/configs/account-stage/inputs/account_id", "resource_group": "stage", "access_tags": [ "env:stage" ], "logdna_name": "The name of the LogDNA stage service instance.", "sysdig_name": "The name of the SysDig stage service instance." } } }, { "definition": { "name": "region-us-south-stage", "description": "The stage us-south configuration.", "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global" } }, { "definition": { "name": "region-eu-de-stage", "description": "The stage eu-de configuration.", "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global", "inputs": { "account_id": "ref:/configs/account-stage/inputs/account_id", "resource_group": "ref:/configs/env-stage/outputs/resource_group_id", "logdna_id": "ref:/configs/env-stage/outputs/logdna_id", "sysdig_id": "ref:/configs/env-stage/outputs/sysdig_id", "access_tags": [ "region:eu-de" ] } } } ], "location": "us-south", "resource_group": "Default" }'   "{base_url}/v1/projects"
  • projectPrototypeDefinitionModel := &projectv1.ProjectPrototypeDefinition{
      Name: core.StringPtr("acme-microservice"),
      Description: core.StringPtr("A microservice to deploy on top of ACME infrastructure."),
    }
    
    projectConfigDefinitionPrototypeModel := &projectv1.ProjectConfigDefinitionPrototypeDAConfigDefinitionPropertiesPrototype{
      LocatorID: core.StringPtr("1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"),
      Description: core.StringPtr("The stage account configuration."),
      Name: core.StringPtr("account-stage"),
    }
    
    projectConfigPrototypeModel := &projectv1.ProjectConfigPrototype{
      Definition: projectConfigDefinitionPrototypeModel,
    }
    
    createProjectOptions := projectService.NewCreateProjectOptions(
      projectPrototypeDefinitionModel,
      "us-south",
      "Default",
    )
    createProjectOptions.SetConfigs([]projectv1.ProjectConfigPrototype{*projectConfigPrototypeModel})
    
    project, response, err := projectService.CreateProject(createProjectOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(project, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ProjectPrototypeDefinition
    const projectPrototypeDefinitionModel = {
      name: 'acme-microservice',
      description: 'A microservice to deploy on top of ACME infrastructure.',
    };
    
    // ProjectConfigDefinitionPrototypeDAConfigDefinitionPropertiesPrototype
    const projectConfigDefinitionPrototypeModel = {
      locator_id: '1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global',
      description: 'The stage account configuration.',
      name: 'account-stage',
    };
    
    // ProjectConfigPrototype
    const projectConfigPrototypeModel = {
      definition: projectConfigDefinitionPrototypeModel,
    };
    
    const params = {
      definition: projectPrototypeDefinitionModel,
      location: 'us-south',
      resourceGroup: 'Default',
      configs: [projectConfigPrototypeModel],
    };
    
    let res;
    try {
      res = await projectService.createProject(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • project_prototype_definition_model = {
      'name': 'acme-microservice',
      'description': 'A microservice to deploy on top of ACME infrastructure.',
    }
    
    project_config_definition_prototype_model = {
      'locator_id': '1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global',
      'description': 'The stage account configuration.',
      'name': 'account-stage',
    }
    
    project_config_prototype_model = {
      'definition': project_config_definition_prototype_model,
    }
    
    response = project_service.create_project(
      definition=project_prototype_definition_model,
      location='us-south',
      resource_group='Default',
      configs=[project_config_prototype_model],
    )
    project = response.get_result()
    
    print(json.dumps(project, indent=2))

Response

The standard schema of a project.

The standard schema of a project.

The standard schema of a project.

The standard schema of a project.

Status Code

  • OK

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

Example responses
  • The sample response to a request to retrieve an empty project.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "cumulative_needs_attention_view": [],
      "configs": [],
      "environments": [],
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }
  • The sample response to a request to retrieve an empty project.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "cumulative_needs_attention_view": [],
      "configs": [],
      "environments": [],
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }
  • The sample response to a request to retrieve a project with configurations.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "cumulative_needs_attention_view": [],
      "configs": [
        {
          "id": "673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "common-variables",
            "description": "The common-variables configuration."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "update_available": false,
          "version": 1
        },
        {
          "id": "4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "account-stage",
            "description": "The stage account configuration. The stage account hosts test environments prestage, performance, stage."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration. It includes services that are common to all the environment regions."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-us-south-stage",
            "description": "The stage `us-south` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage us-south."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-eu-de-stage",
            "description": "The stage `eu-de` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `eu-de`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        }
      ],
      "environments": [],
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }
  • The sample response to a request to retrieve a project with configurations.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "cumulative_needs_attention_view": [],
      "configs": [
        {
          "id": "673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "common-variables",
            "description": "The common-variables configuration."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "update_available": false,
          "version": 1
        },
        {
          "id": "4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "account-stage",
            "description": "The stage account configuration. The stage account hosts test environments prestage, performance, stage."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration. It includes services that are common to all the environment regions."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-us-south-stage",
            "description": "The stage `us-south` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage us-south."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-eu-de-stage",
            "description": "The stage `eu-de` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `eu-de`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        }
      ],
      "environments": [],
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }
  • The sample response to a request to retrieve a project with environments.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "cumulative_needs_attention_view": [],
      "configs": [],
      "environments": [
        {
          "id": "b0c44146-1ef6-40c2-82ba-74d51149770a",
          "definition": {
            "name": "development",
            "description": "The development environment."
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "acme-microservice"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-02-10T10:05:35.787Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments/b0c44146-1ef6-40c2-82ba-74d51149770a"
        },
        {
          "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "definition": {
            "name": "production",
            "description": "The production environment."
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "acme-microservice"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-02-10T10:05:35.787Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments/9c7afed6-17fb-4c56-a13d-440a78f936bd"
        }
      ],
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }
  • The sample response to a request to retrieve a project with environments.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "cumulative_needs_attention_view": [],
      "configs": [],
      "environments": [
        {
          "id": "b0c44146-1ef6-40c2-82ba-74d51149770a",
          "definition": {
            "name": "development",
            "description": "The development environment."
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "acme-microservice"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-02-10T10:05:35.787Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments/b0c44146-1ef6-40c2-82ba-74d51149770a"
        },
        {
          "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "definition": {
            "name": "production",
            "description": "The production environment."
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "acme-microservice"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-02-10T10:05:35.787Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments/9c7afed6-17fb-4c56-a13d-440a78f936bd"
        }
      ],
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }

List projects

List existing projects. Projects are sorted by ID.

List existing projects. Projects are sorted by ID.

List existing projects. Projects are sorted by ID.

List existing projects. Projects are sorted by ID.

GET /v1/projects
list_projects(
        self,
        *,
        token: Optional[str] = None,
        limit: Optional[int] = None,
        **kwargs,
    ) -> DetailedResponse
listProjects(params)
(project *ProjectV1) ListProjects(listProjectsOptions *ListProjectsOptions) (result *ProjectCollection, response *core.DetailedResponse, err error)
(project *ProjectV1) ListProjectsWithContext(ctx context.Context, listProjectsOptions *ListProjectsOptions) (result *ProjectCollection, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to getting projects.

  • project.instance.retrieve-all

Auditing

Calling this method generates the following auditing event.

  • project.project.list

Request

Instantiate the ListProjectsOptions struct and set the fields to provide parameter values for the ListProjects method.

Query Parameters

  • The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression ^$|^(?!\s)(?!.*\s$)[^\x00-\x1F]*$

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

parameters

  • The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression /^$|^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]*$/

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

parameters

  • The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression /^$|^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]*$/

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

WithContext method only

The ListProjects options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects"
  • listProjectsOptions := &projectv1.ListProjectsOptions{
      Limit: core.Int64Ptr(int64(10)),
    }
    
    pager, err := projectService.NewProjectsPager(listProjectsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []projectv1.ProjectSummary
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • const params = {
      limit: 10,
    };
    
    const allResults = [];
    try {
      const pager = new ProjectV1.ProjectsPager(projectService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = ProjectsPager(
      client=project_service,
      limit=10,
    )
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))

Response

Projects list

Projects list.

Projects list.

Projects list.

Status Code

  • The request was successful.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

Example responses
  • An example request to list projects.

    {
      "limit": 10,
      "first": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
      },
      "next": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/12349050-1234-ac97-0000-ba5a12fe9087"
      },
      "projects": [
        {
          "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
          "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
          "created_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
          "definition": {
            "description": "A project example.",
            "name": "iaas-infra-prestage-env",
            "auto_deploy": false,
            "destroy_on_delete": false,
            "monitoring_enabled": false
          },
          "location": "us-south",
          "state": "ready",
          "resource_group": "Default",
          "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
          "cumulative_needs_attention_view": [
            {
              "event": "project.instance.update"
            },
            {
              "event_id": "489f0090-6d7c-4af5-8f20-9106543e4974"
            },
            {
              "config_id": "069ab83e-5016-4bf2-bd50-cc95cf678293"
            },
            {
              "config_version": 1
            }
          ]
        },
        {
          "id": "1123ed42-4356-efa1-1101-235900fe9087",
          "created_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
          "definition": {
            "description": "A project example.",
            "name": "iaas-infra-stage-env",
            "auto_deploy": false,
            "destroy_on_delete": false,
            "monitoring_enabled": false
          },
          "crn": "crn:v1:staging:public:project:eu-de:a/06580d923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
          "location": "eu-gb",
          "state": "ready",
          "resource_group": "Default",
          "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
          "cumulative_needs_attention_view": []
        }
      ]
    }
  • An example request to list projects.

    {
      "limit": 10,
      "first": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
      },
      "next": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/12349050-1234-ac97-0000-ba5a12fe9087"
      },
      "projects": [
        {
          "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
          "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
          "created_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
          "definition": {
            "description": "A project example.",
            "name": "iaas-infra-prestage-env",
            "auto_deploy": false,
            "destroy_on_delete": false,
            "monitoring_enabled": false
          },
          "location": "us-south",
          "state": "ready",
          "resource_group": "Default",
          "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
          "cumulative_needs_attention_view": [
            {
              "event": "project.instance.update"
            },
            {
              "event_id": "489f0090-6d7c-4af5-8f20-9106543e4974"
            },
            {
              "config_id": "069ab83e-5016-4bf2-bd50-cc95cf678293"
            },
            {
              "config_version": 1
            }
          ]
        },
        {
          "id": "1123ed42-4356-efa1-1101-235900fe9087",
          "created_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
          "definition": {
            "description": "A project example.",
            "name": "iaas-infra-stage-env",
            "auto_deploy": false,
            "destroy_on_delete": false,
            "monitoring_enabled": false
          },
          "crn": "crn:v1:staging:public:project:eu-de:a/06580d923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
          "location": "eu-gb",
          "state": "ready",
          "resource_group": "Default",
          "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
          "cumulative_needs_attention_view": []
        }
      ]
    }

Get a project

Get information about a project.

Get information about a project.

Get information about a project.

Get information about a project.

GET /v1/projects/{id}
get_project(
        self,
        id: str,
        **kwargs,
    ) -> DetailedResponse
getProject(params)
(project *ProjectV1) GetProject(getProjectOptions *GetProjectOptions) (result *Project, response *core.DetailedResponse, err error)
(project *ProjectV1) GetProjectWithContext(ctx context.Context, getProjectOptions *GetProjectOptions) (result *Project, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to getting a project.

  • project.instance.retrieve

Auditing

Calling this method generates the following auditing event.

  • project.project.read

Request

Instantiate the GetProjectOptions struct and set the fields to provide parameter values for the GetProject method.

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

WithContext method only

The GetProject options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{id}"
  • getProjectOptions := projectService.NewGetProjectOptions(
      projectIdLink,
    )
    
    project, response, err := projectService.GetProject(getProjectOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(project, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: projectIdLink,
    };
    
    let res;
    try {
      res = await projectService.getProject(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = project_service.get_project(
      id=project_id_link,
    )
    project = response.get_result()
    
    print(json.dumps(project, indent=2))

Response

The standard schema of a project.

The standard schema of a project.

The standard schema of a project.

The standard schema of a project.

Status Code

  • The request was successful.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

Example responses
  • A sample response for retrieving a project with configurations.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "configs": [
        {
          "id": "673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "common-variables",
            "description": "The common-variables configuration."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "update_available": false,
          "version": 1
        },
        {
          "id": "4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "account-stage",
            "description": "The stage account configuration. The stage account hosts test environments prestage, performance, stage. This configuration configures services that are common to all these environments and regions. It's a `terraform_template` type of configuration that points to a GitHub repository that hosts the terraform modules that a Schematics workspace can deploy."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration. It includes services that are common to all the environment regions. You must have a blueprint that configures all the services that are common to the stage regions. It's a `terraform_template` type of configuration that points to a GitHub repository that hosts the Terraform modules that a Schematics workspace can deploy."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-us-south-stage",
            "description": "The stage `us-south` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `us-south`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-eu-de-stage",
            "description": "The stage `eu-de` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `eu-de`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        }
      ],
      "environments": [
        {
          "id": "b0c44146-1ef6-40c2-82ba-74d51149770a",
          "definition": {
            "name": "dev-environment",
            "description": "The development environment."
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-02-10T10:05:35.787Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments/b0c44146-1ef6-40c2-82ba-74d51149770a"
        }
      ],
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "cumulative_needs_attention_view": [
        {
          "event": "project.instance.update"
        },
        {
          "event_id": "489f0090-6d7c-4af5-8f20-9106543e4974"
        },
        {
          "config_id": "069ab83e-5016-4bf2-bd50-cc95cf678293"
        },
        {
          "config_version": 1
        }
      ],
      "event_notifications_crn": "crn:v1:staging:public:event-notifications:us-south:a/06580c923e40314421d3b6cb40c01c68:instance-id::",
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }
  • A sample response for retrieving a project with configurations.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "configs": [
        {
          "id": "673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "common-variables",
            "description": "The common-variables configuration."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "update_available": false,
          "version": 1
        },
        {
          "id": "4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "account-stage",
            "description": "The stage account configuration. The stage account hosts test environments prestage, performance, stage. This configuration configures services that are common to all these environments and regions. It's a `terraform_template` type of configuration that points to a GitHub repository that hosts the terraform modules that a Schematics workspace can deploy."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration. It includes services that are common to all the environment regions. You must have a blueprint that configures all the services that are common to the stage regions. It's a `terraform_template` type of configuration that points to a GitHub repository that hosts the Terraform modules that a Schematics workspace can deploy."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-us-south-stage",
            "description": "The stage `us-south` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `us-south`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-eu-de-stage",
            "description": "The stage `eu-de` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `eu-de`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        }
      ],
      "environments": [
        {
          "id": "b0c44146-1ef6-40c2-82ba-74d51149770a",
          "definition": {
            "name": "dev-environment",
            "description": "The development environment."
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-02-10T10:05:35.787Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments/b0c44146-1ef6-40c2-82ba-74d51149770a"
        }
      ],
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "cumulative_needs_attention_view": [
        {
          "event": "project.instance.update"
        },
        {
          "event_id": "489f0090-6d7c-4af5-8f20-9106543e4974"
        },
        {
          "config_id": "069ab83e-5016-4bf2-bd50-cc95cf678293"
        },
        {
          "config_version": 1
        }
      ],
      "event_notifications_crn": "crn:v1:staging:public:event-notifications:us-south:a/06580c923e40314421d3b6cb40c01c68:instance-id::",
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }

Update a project

Update a project by specifying its ID.

Update a project by specifying its ID.

Update a project by specifying its ID.

Update a project by specifying its ID.

PATCH /v1/projects/{id}
update_project(
        self,
        id: str,
        definition: 'ProjectPatchDefinitionBlock',
        **kwargs,
    ) -> DetailedResponse
updateProject(params)
(project *ProjectV1) UpdateProject(updateProjectOptions *UpdateProjectOptions) (result *Project, response *core.DetailedResponse, err error)
(project *ProjectV1) UpdateProjectWithContext(ctx context.Context, updateProjectOptions *UpdateProjectOptions) (result *Project, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to updating projects.

  • project.instance.update

Auditing

Calling this method generates the following auditing event.

  • project.project.update

Request

Instantiate the UpdateProjectOptions struct and set the fields to provide parameter values for the UpdateProject method.

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

The request body of the new project definition document.

Examples:

A project update example request.

{
  "definition": {
    "name": "acme-microservice",
    "description": "A microservice to deploy on top of ACME infrastructure.",
    "authorizations": {
      "method": "trusted_profile",
      "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
    }
  }
}

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The definition of the project.

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The definition of the project.

WithContext method only

The UpdateProject options.

  • curl -X PATCH --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "definition": { "name": "acme-microservice", "description": "A microservice to deploy on top of ACME infrastructure.", "authorizations": { "method": "trusted_profile", "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12" } } }'   "{base_url}/v1/projects/{id}"
  • projectPatchDefinitionBlockModel := &projectv1.ProjectPatchDefinitionBlock{
      Name: core.StringPtr("acme-microservice"),
      Description: core.StringPtr("A microservice to deploy on top of ACME infrastructure."),
    }
    
    updateProjectOptions := projectService.NewUpdateProjectOptions(
      projectIdLink,
      projectPatchDefinitionBlockModel,
    )
    
    project, response, err := projectService.UpdateProject(updateProjectOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(project, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ProjectPatchDefinitionBlock
    const projectPatchDefinitionBlockModel = {
      name: 'acme-microservice',
      description: 'A microservice to deploy on top of ACME infrastructure.',
    };
    
    const params = {
      id: projectIdLink,
      definition: projectPatchDefinitionBlockModel,
    };
    
    let res;
    try {
      res = await projectService.updateProject(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • project_patch_definition_block_model = {
      'name': 'acme-microservice',
      'description': 'A microservice to deploy on top of ACME infrastructure.',
    }
    
    response = project_service.update_project(
      id=project_id_link,
      definition=project_patch_definition_block_model,
    )
    project = response.get_result()
    
    print(json.dumps(project, indent=2))

Response

The standard schema of a project.

The standard schema of a project.

The standard schema of a project.

The standard schema of a project.

Status Code

  • The request was successful.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

Example responses
  • A sample response for retrieving a project with configurations.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "configs": [
        {
          "id": "673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "common-variables",
            "description": "The common-variables configuration."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "update_available": false,
          "version": 1
        },
        {
          "id": "4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "account-stage",
            "description": "The stage account configuration. The stage account hosts test environments prestage, performance, stage. This configuration configures services that are common to all these environments and regions. It's a `terraform_template` type of configuration that points to a GitHub repository that hosts the terraform modules that a Schematics workspace can deploy."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration. It includes services that are common to all the environment regions. You must have a blueprint that configures all the services that are common to the stage regions. It's a `terraform_template` type of configuration that points to a GitHub repository that hosts the Terraform modules that a Schematics workspace can deploy."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-us-south-stage",
            "description": "The stage `us-south` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `us-south`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-eu-de-stage",
            "description": "The stage `eu-de` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `eu-de`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        }
      ],
      "environments": [
        {
          "id": "b0c44146-1ef6-40c2-82ba-74d51149770a",
          "definition": {
            "name": "dev-environment",
            "description": "The development environment."
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-02-10T10:05:35.787Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments/b0c44146-1ef6-40c2-82ba-74d51149770a"
        }
      ],
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "cumulative_needs_attention_view": [
        {
          "event": "project.instance.update"
        },
        {
          "event_id": "489f0090-6d7c-4af5-8f20-9106543e4974"
        },
        {
          "config_id": "069ab83e-5016-4bf2-bd50-cc95cf678293"
        },
        {
          "config_version": 1
        }
      ],
      "event_notifications_crn": "crn:v1:staging:public:event-notifications:us-south:a/06580c923e40314421d3b6cb40c01c68:instance-id::",
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }
  • A sample response for retrieving a project with configurations.

    {
      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
      "created_at": "2023-02-22T19:51:23.253Z",
      "modified_at": "2023-02-22T19:51:23.253Z",
      "href": "https://projects.service.url/v1/projects/cfbf901-ab8e-ac97-b01b-ab5af830be8a",
      "definition": {
        "name": "acme-microservice",
        "description": "A microservice to deploy on top of ACME infrastructure.",
        "auto_deploy": false,
        "destroy_on_delete": true,
        "monitoring_enabled": false
      },
      "configs": [
        {
          "id": "673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "common-variables",
            "description": "The common-variables configuration."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/673d79e4-52bf-4184-b8e9-d3ca3c110f96",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "update_available": false,
          "version": 1
        },
        {
          "id": "4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "account-stage",
            "description": "The stage account configuration. The stage account hosts test environments prestage, performance, stage. This configuration configures services that are common to all these environments and regions. It's a `terraform_template` type of configuration that points to a GitHub repository that hosts the terraform modules that a Schematics workspace can deploy."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/4a1d4ba2-54ba-43a7-975a-d82b5a7612d1",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration. It includes services that are common to all the environment regions. You must have a blueprint that configures all the services that are common to the stage regions. It's a `terraform_template` type of configuration that points to a GitHub repository that hosts the Terraform modules that a Schematics workspace can deploy."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-us-south-stage",
            "description": "The stage `us-south` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `us-south`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/596e8656-9d4b-41a5-8340-b0cbe8bd374a",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        },
        {
          "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "created_at": "2023-02-22T19:51:23.253Z",
          "definition": {
            "name": "region-eu-de-stage",
            "description": "The stage `eu-de` configuration. You must have a blueprint that configures the Virtual Private Cloud and Red Hat OpenShift stage `eu-de`."
          },
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd",
          "is_draft": true,
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "state": "draft",
          "update_available": false,
          "modified_at": "2023-02-22T19:51:23.253Z",
          "version": 1
        }
      ],
      "environments": [
        {
          "id": "b0c44146-1ef6-40c2-82ba-74d51149770a",
          "definition": {
            "name": "dev-environment",
            "description": "The development environment."
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-02-10T10:05:35.787Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments/b0c44146-1ef6-40c2-82ba-74d51149770a"
        }
      ],
      "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
      "cumulative_needs_attention_view": [
        {
          "event": "project.instance.update"
        },
        {
          "event_id": "489f0090-6d7c-4af5-8f20-9106543e4974"
        },
        {
          "config_id": "069ab83e-5016-4bf2-bd50-cc95cf678293"
        },
        {
          "config_version": 1
        }
      ],
      "event_notifications_crn": "crn:v1:staging:public:event-notifications:us-south:a/06580c923e40314421d3b6cb40c01c68:instance-id::",
      "location": "us-south",
      "resource_group": "Default",
      "resource_group_id": "f37d2637ea814cfd9a1742683a713d24",
      "state": "ready"
    }

Delete a project

Delete a project document by specifying the ID. A project can be deleted only after you delete all of its resources.

Delete a project document by specifying the ID. A project can be deleted only after you delete all of its resources.

Delete a project document by specifying the ID. A project can be deleted only after you delete all of its resources.

Delete a project document by specifying the ID. A project can be deleted only after you delete all of its resources.

DELETE /v1/projects/{id}
delete_project(
        self,
        id: str,
        **kwargs,
    ) -> DetailedResponse
deleteProject(params)
(project *ProjectV1) DeleteProject(deleteProjectOptions *DeleteProjectOptions) (result *ProjectDeleteResponse, response *core.DetailedResponse, err error)
(project *ProjectV1) DeleteProjectWithContext(ctx context.Context, deleteProjectOptions *DeleteProjectOptions) (result *ProjectDeleteResponse, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

Delete a project instance by specifying its ID.

  • project.instance.delete

Auditing

Calling this method generates the following auditing event.

  • project.project.delete

Request

Instantiate the DeleteProjectOptions struct and set the fields to provide parameter values for the DeleteProject method.

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

WithContext method only

The DeleteProject options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{id}"
  • deleteProjectOptions := projectService.NewDeleteProjectOptions(
      projectIdLink,
    )
    
    projectDeleteResponse, response, err := projectService.DeleteProject(deleteProjectOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(projectDeleteResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: projectIdLink,
    };
    
    let res;
    try {
      res = await projectService.deleteProject(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = project_service.delete_project(
      id=project_id_link,
    )
    project_delete_response = response.get_result()
    
    print(json.dumps(project_delete_response, indent=2))

Response

The ID of the deleted project.

The ID of the deleted project.

The ID of the deleted project.

The ID of the deleted project.

Status Code

  • The server successfully accepted the request to process the resource.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

  • The project cannot be deleted. You're receiving this response because at least one of the configurations is in an active pipeline state (validating/deploying/undeploying). Wait for these pipeline actions to end before you run the deletion again.

Example responses
  • The example response to a request to delete a project.

    {
      "id": "4059955c-ccb3-4fd3-aa48-34e3b8334f80"
    }
  • The example response to a request to delete a project.

    {
      "id": "4059955c-ccb3-4fd3-aa48-34e3b8334f80"
    }

Sync a project

Sync a project.

POST /v1/projects/{id}/sync

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to the syncing a project.

  • project.instance.sync

Auditing

Calling this method generates the following auditing event.

  • project.project.update

Request

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

Response

Status Code

  • The request was successful but the response is empty.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The request cannot be processed because of a conflict between the request and the current client-controlled state in the system.

No Sample Response

This method does not specify any sample responses.

Get project spending

The spending data on a project

POST /v1/projects/{project_id}/spending

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action will reveal spending data on a project

  • project.spending.retrieve-all

Request

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

Query Parameters

  • The last entry that is returned on the page. The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression ^$|^(?!\s)(?!.*\s$)[^\x00-\x1F]*$

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

Data to create a specified report

Response

The spending details on a project

Status Code

  • Success

  • Bad Request

Example responses
  • Sample spending API response.

    {
      "configs": [
        {
          "config_id": "some-config-id",
          "config_name": "config-1",
          "usage": [
            {
              "month": "2024-03",
              "limit": 30,
              "count": 4,
              "first": {
                "href": "/v4/accounts/some-account-id/resource_instances/usage/2024-03?_limit=30&_names=false&_tags=true"
              },
              "next": {
                "href": "/v4/accounts/some-account-id/resource_instances/usage/2024-03?_limit=30&_names=false&_start=some-long-start-string&_names=false&_tags=true",
                "offset": "some-offset-string"
              },
              "resources": [
                {
                  "account_id": "some-account-id",
                  "resource_instance_id": "crn:v1:staging:public:continuous-delivery:us-south:a/some-account-id:some-instance-id::",
                  "resource_group_id": "some-resource-group-id",
                  "month": "2024-03",
                  "pricing_country": "USA",
                  "billing_country": "USA",
                  "currency_code": "USD",
                  "plan_id": "some-plan-id",
                  "resource_id": "some-resource-id",
                  "billable": true,
                  "pricing_plan_id": "billable:v4:some-plan-id::some-pricing-id:",
                  "region": "us-south",
                  "usage": [
                    {
                      "metric": "AUTHORIZED_USERS_PER_MONTH",
                      "unit": "Authorized User",
                      "price": [
                        {
                          "unitQuantity": "1",
                          "tier_model": "Granular Tier",
                          "price": 37.7,
                          "quantity_tier": "1"
                        }
                      ],
                      "additional_properties": null,
                      "quantity": 0.3870967741935484,
                      "cost": 14.580414193548387,
                      "rated_cost": 14.593548387096774,
                      "rateable_quantity": 0.3870967741935484,
                      "discounts": [
                        {
                          "name": "platform discount",
                          "display_name": "platform discount",
                          "ref": "discount-some-discount-id",
                          "discount": 0.09
                        }
                      ]
                    }
                  ],
                  "currency_rate": 1,
                  "tags": null,
                  "service_tags": [
                    "project::config_id:some-config-id",
                    "project::project_id:some-project-id"
                  ]
                }
              ]
            }
          ]
        }
      ],
      "token": "some-token-string",
      "first": {
        "href": "https://projects.api.test.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/spending?limit=10"
      },
      "next": {
        "href": "https://projects.api.test.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/spending?limit=10&start=some-offset-string"
      }
    }

Resolve project references

Resolve project references.

POST /v1/resolve

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies to resolving project references.

  • project.instance.retrieve

Auditing

Calling this method generates the following auditing event.

  • project.project.read

Request

A batch of one or more references.

Examples:

The example of a request for a collection of project batch references.

{
  "references": [
    {
      "reference": "ref://project.myproject/configs/myconfig/inputs/region"
    },
    {
      "reference": "ref:./inputs/region",
      "context": "ref://project.myproject/configs/myconfig/"
    }
  ]
}

Response

The resolved batch reference collection.

Status Code

  • You successfully resolved project references.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

Example responses
  • The example of a resolved project batch reference collection.

    {
      "correlation_id": "3cd535c7-04a9-4198-a550-8b7737bf748a",
      "references": [
        {
          "reference": "ref://project.myproject/configs/myconfig/inputs/region",
          "state": "The project reference was resolved.",
          "code": 200,
          "request_id": "66c535c7-03a0-6144-b340-8e5737bf688c",
          "value": "us-south",
          "content_type": "text/plain"
        },
        {
          "reference": "ref:./inputs/region",
          "context": "ref://project.myproject/configs/myconfig/",
          "state": "The project reference was resolved.",
          "code": 200,
          "request_id": "66c535c7-03a0-6144-b340-8e5737bf688c",
          "value": "us-south",
          "content_type": "text/plain"
        },
        {
          "reference": "ref:./inputs/regionx",
          "context": "ref://project.myproject/configs/myconfig/",
          "state": "The project reference ref://project.myproject/configs/myconfig/inputs/regionx is invalid",
          "state_code": "INVALID_PROJECT_REFERENCE_ERROR",
          "code": 400,
          "request_id": "66c535c7-03a0-6144-b340-8e5737bf688c"
        }
      ]
    }

List allowed locations for project creation

Returns list of allowed locations that caller is allowed to create projects from.

GET /v1/locations

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to the project creation.

  • project.instance.create

Request

No Request Parameters

This method does not accept any request parameters.

Response

Response containing locations user is allowed to create projects from.

Status Code

  • The request was successful.

  • The credentials are invalid or authentication is required to succeed.

  • The request was not completed by the server. It could be due to an internal error or in some cases, invalid data in the request.

Example responses
  • The sample response for retrieving the allowed project locations for project creation.

    {
      "locations": [
        {
          "location": "us-south",
          "location_display_name": "Dallas"
        },
        {
          "location": "us-east",
          "location_display_name": "Washington DC"
        },
        {
          "location": "eu-de",
          "location_display_name": "Frankfurt"
        },
        {
          "location": "eu-gb",
          "location_display_name": "London"
        },
        {
          "location": "ca-tor",
          "location_display_name": "Toronto"
        }
      ]
    }

List project resources

List resources that have been added to a project.

GET /v1/projects/{id}/resources

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to the project get resources.

  • project.resources.retrieve-all

Auditing

Calling this method generates the following auditing event.

  • project.project.read

Request

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

Query Parameters

  • The last entry that is returned on the page. The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression ^$|^(?!\s)(?!.*\s$)[^\x00-\x1F]*$

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

  • An optional string indicating what type of resources are to be included in the search results.

    Allowable values: [user_deployed,project_deployed,all]

  • The unique configuration ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

Response

The project resource list.

Status Code

  • You successfully retrieved the resources added to the project.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

  • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

Example responses
  • The example response to a request to get project resources.

    {
      "resources": [
        {
          "resource_crn": "crn:v1:staging:public:toolchain:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::",
          "resource_name": "toolchain_instance",
          "account_id": "499b176abb3e1c9727df87ae48b27c7b",
          "location": "us-south",
          "resource_type": "user_deployed",
          "resource_status": "active",
          "resource_group_id": "5201af285aba49fa97c31ad44967010f",
          "tags": [],
          "service_tags": [
            "project::project_id:cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          ],
          "project_id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
          "terraform_type": "ibm_cd_toolchain",
          "resource_group_name": "Default"
        },
        {
          "resource_crn": "crn:v1:staging:public:cloud-object-storage:global:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::",
          "resource_name": "cos_bucket_instance",
          "account_id": "499b176abb3e1c9727df87ae48b27c7b",
          "location": "us-south",
          "resource_type": "project_deployed",
          "resource_status": "active",
          "resource_group_id": "3201af285aba49fa97c31ad44967010f",
          "tags": [],
          "service_tags": [
            "project::project_id:cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          ],
          "project_id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
          "terraform_type": "ibm_cos_bucket",
          "resource_group_name": "Default"
        }
      ],
      "token": "eyJhY2NvdW50SWQiOiIqIiwidXNlcklk",
      "limit": 10,
      "first": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/resources"
      },
      "next": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/resources?&start=eyJhY2NvdW50SWQiOiIqIiwidXNlcklk"
      }
    }

Updates the resources in a project

Updates the resources in a project using a collection of JSON patch-like operations.

POST /v1/projects/{id}/resources

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to the project update resource bindings.

  • project.resources.update

Auditing

Calling this method generates the following auditing event.

  • project.project.read

Request

Custom Headers

  • The IBM trusted profile ID

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

  • The IBM Cloud API key. It can be either raw or pulled from the catalog via a CRN or JSON blob.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

The request body for the change delta of the project resources to update.

Examples:

The example request to update project resources.

{
  "resources": [
    {
      "op": "add",
      "value": {
        "resource_crn": "crn:v1:staging:public:toolchain:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::"
      }
    },
    {
      "op": "remove",
      "value": {
        "resource_crn": "crn:v1:staging:public:cloud-object-storage:global:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::"
      }
    }
  ]
}

Response

The project resources update response.

Status Code

  • Some or all of the resource operations were successfully executed.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

  • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

Example responses
  • An example response from updating project resources.

    {
      "resources": [
        {
          "op": "add",
          "value": {
            "resource_crn": "crn:v1:staging:public:toolchain:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-a6d576183bb2::"
          }
        }
      ],
      "errors": [
        {
          "code": "not_found",
          "message": "The resource with CRN crn:v1:staging:public:toolchain:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb3::' could not be found in the account with ID a94cbc051abd47828a396c94adaba9c1."
        },
        {
          "code": "bad_request",
          "message": "The resource with CRN crn:v1:staging:public:toolchain:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb8::' was added to another project. A resource can be added only to a single project."
        }
      ],
      "status_code": 200
    }

List all project available resources

Lists resources in an account that are available to add to the project. The account is specified using a trusted profile or API key.

GET /v1/projects/{id}/available_resources

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to the project get available resources.

  • project.available-resources.retrieve-all

Auditing

Calling this method generates the following auditing event.

  • project.project.read

Request

Custom Headers

  • The IBM trusted profile ID

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

  • The IBM Cloud API key. It can be either raw or pulled from the catalog via a CRN or JSON blob.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

Query Parameters

  • The last entry that is returned on the page. The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression ^$|^(?!\s)(?!.*\s$)[^\x00-\x1F]*$

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

Response

The project resource list.

Status Code

  • You successfully retrieved the resources.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

  • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

Example responses
  • The example response to a request to get project resources.

    {
      "resources": [
        {
          "resource_crn": "crn:v1:staging:public:toolchain:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::",
          "resource_name": "toolchain_instance",
          "account_id": "499b176abb3e1c9727df87ae48b27c7b",
          "location": "us-south",
          "resource_type": "user_deployed",
          "resource_status": "active",
          "resource_group_id": "5201af285aba49fa97c31ad44967010f",
          "tags": [],
          "service_tags": [
            "project::project_id:cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          ],
          "project_id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
          "terraform_type": "ibm_cd_toolchain",
          "resource_group_name": "Default"
        },
        {
          "resource_crn": "crn:v1:staging:public:cloud-object-storage:global:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::",
          "resource_name": "cos_bucket_instance",
          "account_id": "499b176abb3e1c9727df87ae48b27c7b",
          "location": "us-south",
          "resource_type": "project_deployed",
          "resource_status": "active",
          "resource_group_id": "3201af285aba49fa97c31ad44967010f",
          "tags": [],
          "service_tags": [
            "project::project_id:cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          ],
          "project_id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
          "terraform_type": "ibm_cos_bucket",
          "resource_group_name": "Default"
        }
      ],
      "token": "eyJhY2NvdW50SWQiOiIqIiwidXNlcklk",
      "limit": 10,
      "first": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/resources"
      },
      "next": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/resources?&start=eyJhY2NvdW50SWQiOiIqIiwidXNlcklk"
      }
    }

Get project resources for an account

Get the project resources for an account, as returned by Schematics. This information is used by the GhoST service.

GET /v1/projects_resources

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies to getting the project resources for an account.

  • project.resources.sync

Request

Query Parameters

  • The IBM Cloud account id of the account owning the resource.

    Possible values: 0 ≤ length ≤ 256, Value must match regular expression ^(?!\s)(?!.*\s$).*$

  • The last entry that is returned on the page. The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression ^$|^(?!\s)(?!.*\s$)[^\x00-\x1F]*$

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

Response

The project resources returned by Schematics

Status Code

  • You successfully retrieved the resources.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

  • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

Example responses
  • An example response from project resources for an account.

    {
      "limit": 10,
      "first": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects_resources?account_id=e8bb1d11250e14b0de3dfa9f42a60e00"
      },
      "next": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects_resources?account_id=e8bb1d11250e14b0de3dfa9f42a60e00&limit=100&start=6860801d-994a-497f-8b51-9166cae1c8ff"
      },
      "projects": [
        {
          "id": "6860801d-994a-497f-8b51-9166cae1c8ff",
          "resources": [
            {
              "project_id": "6860801d-994a-497f-8b51-9166cae1c8ff",
              "config_id": "1d70615f-387c-4325-af7c-a2067dc042fa",
              "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.26e5e9c0-745d-4e5a-ad5a-08bc0a374b5a-global",
              "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/e8bb1d11250e14b0de3dfa9f42a60e00:503c8368-9953-4695-b1ff-7e30f32cdb7f:bucket:sample-solution-app",
              "crn_type": "ibm",
              "id": "cos_bucket_instance_id",
              "name": "cos_bucket_instance",
              "type": "ibm_cos_bucket"
            }
          ]
        }
      ]
    }

Get project resources for a single project

Get the project resources for a single project, as returned by Schematics. This information is used by the GhoST service.

GET /v1/projects_resources/{id}/resources

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies to getting the project resources for a single project.

  • project.resources.sync

Request

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

Response

The project resources returned by Schematics

Status Code

  • You successfully retrieved the resources.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

  • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

Example responses
  • An example response from getting resources for a project.

    {
      "id": "6860801d-994a-497f-8b51-9166cae1c8ff",
      "resources": [
        {
          "project_id": "6860801d-994a-497f-8b51-9166cae1c8ff",
          "config_id": "1d70615f-387c-4325-af7c-a2067dc042fa",
          "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.26e5e9c0-745d-4e5a-ad5a-08bc0a374b5a-global",
          "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/e8bb1d11250e14b0de3dfa9f42a60e00:503c8368-9953-4695-b1ff-7e30f32cdb7f::",
          "crn_type": "ibm",
          "id": "cos_instance_id",
          "name": "cos_instance",
          "type": "ibm_cos"
        },
        {
          "project_id": "6860801d-994a-497f-8b51-9166cae1c8ff",
          "config_id": "1d70615f-387c-4325-af7c-a2067dc042fa",
          "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.26e5e9c0-745d-4e5a-ad5a-08bc0a374b5a-global",
          "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/e8bb1d11250e14b0de3dfa9f42a60e00:503c8368-9953-4695-b1ff-7e30f32cdb7f:bucket:sample-solution-app",
          "crn_type": "ibm",
          "id": "cos_bucket_instance_id",
          "name": "cos_bucket_instance",
          "type": "ibm_cos_bucket"
        }
      ]
    }

Get project resource detail

Get the project resource detail, as returned by Schematics. This information is used by the GhoST service.

GET /v1/projects_resources/{id}/resources/{resource_crn}

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies to getting the project resource detail.

  • project.resources.sync

Request

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

  • The CRN of the resource.

    Possible values: 4 ≤ length ≤ 512, Value must match regular expression (?!\s)(?!.*\s$)^(crn)[^'"`<>{}\s\x00-\x1F]*

    Example: crn:v1:staging:public:project:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::

Response

The project resource returned by Schematics

Status Code

  • You successfully retrieved the resource.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

  • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

Example responses
  • An example response from getting detail for a project resource.

    {
      "id": "6860801d-994a-497f-8b51-9166cae1c8ff",
      "resources": [
        {
          "project_id": "6860801d-994a-497f-8b51-9166cae1c8ff",
          "config_id": "1d70615f-387c-4325-af7c-a2067dc042fa",
          "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.26e5e9c0-745d-4e5a-ad5a-08bc0a374b5a-global",
          "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/e8bb1d11250e14b0de3dfa9f42a60e00:503c8368-9953-4695-b1ff-7e30f32cdb7f:bucket:sample-solution-app",
          "crn_type": "ibm",
          "id": "cos_bucket_instance_id",
          "name": "cos_bucket_instance",
          "type": "ibm_cos_bucket"
        }
      ]
    }

Create an environment

Create an environment to group related configurations together and share values across them for easier deployment. For more information, see Creating an environment.

Create an environment to group related configurations together and share values across them for easier deployment. For more information, see Creating an environment.

Create an environment to group related configurations together and share values across them for easier deployment. For more information, see Creating an environment.

Create an environment to group related configurations together and share values across them for easier deployment. For more information, see Creating an environment.

POST /v1/projects/{project_id}/environments
create_project_environment(
        self,
        project_id: str,
        definition: 'EnvironmentDefinitionRequiredProperties',
        **kwargs,
    ) -> DetailedResponse
createProjectEnvironment(params)
(project *ProjectV1) CreateProjectEnvironment(createProjectEnvironmentOptions *CreateProjectEnvironmentOptions) (result *Environment, response *core.DetailedResponse, err error)
(project *ProjectV1) CreateProjectEnvironmentWithContext(ctx context.Context, createProjectEnvironmentOptions *CreateProjectEnvironmentOptions) (result *Environment, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to creating environments.

  • project.environment.create

Auditing

Calling this method generates the following auditing event.

  • project.environment.create

Request

Instantiate the CreateProjectEnvironmentOptions struct and set the fields to provide parameter values for the CreateProjectEnvironment method.

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

The request body for a valid environment document.

Examples:

A sample environment update request.

{
  "definition": {
    "name": "development",
    "description": "The environment development.",
    "authorizations": {
      "method": "trusted_profile",
      "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
    },
    "inputs": {
      "resource_group": "stage",
      "region": "us-south"
    },
    "compliance_profile": {
      "id": "some-profile-id",
      "instance_id": "some-instance-id",
      "instance_location": "us-south",
      "profile_name": "some-profile-name",
      "attachment_id": "some-attachment-id"
    }
  }
}

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The environment definition.

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The environment definition.

WithContext method only

The CreateProjectEnvironment options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "definition": { "name": "development", "description": "The environment development.", "authorizations": { "method": "trusted_profile", "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12" }, "inputs": { "resource_group": "stage", "region": "us-south" }, "compliance_profile": { "id": "some-profile-id", "instance_id": "some-instance-id", "instance_location": "us-south", "profile_name": "some-profile-name", "attachment_id": "some-attachment-id" } } }'   "{base_url}/v1/projects/{project_id}/environments"
  • projectConfigAuthModel := &projectv1.ProjectConfigAuth{
      TrustedProfileID: core.StringPtr("Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"),
      Method: core.StringPtr("trusted_profile"),
    }
    
    projectComplianceProfileModel := &projectv1.ProjectComplianceProfile{
      ID: core.StringPtr("some-profile-id"),
      InstanceID: core.StringPtr("some-instance-id"),
      InstanceLocation: core.StringPtr("us-south"),
      AttachmentID: core.StringPtr("some-attachment-id"),
      ProfileName: core.StringPtr("some-profile-name"),
    }
    
    environmentDefinitionRequiredPropertiesModel := &projectv1.EnvironmentDefinitionRequiredProperties{
      Description: core.StringPtr("The environment development."),
      Name: core.StringPtr("development"),
      Authorizations: projectConfigAuthModel,
      ComplianceProfile: projectComplianceProfileModel,
    }
    
    createProjectEnvironmentOptions := projectService.NewCreateProjectEnvironmentOptions(
      projectIdLink,
      environmentDefinitionRequiredPropertiesModel,
    )
    
    environment, response, err := projectService.CreateProjectEnvironment(createProjectEnvironmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(environment, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ProjectConfigAuth
    const projectConfigAuthModel = {
      trusted_profile_id: 'Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12',
      method: 'trusted_profile',
    };
    
    // ProjectComplianceProfile
    const projectComplianceProfileModel = {
      id: 'some-profile-id',
      instance_id: 'some-instance-id',
      instance_location: 'us-south',
      attachment_id: 'some-attachment-id',
      profile_name: 'some-profile-name',
    };
    
    // EnvironmentDefinitionRequiredProperties
    const environmentDefinitionRequiredPropertiesModel = {
      description: 'The environment development.',
      name: 'development',
      authorizations: projectConfigAuthModel,
      inputs: { resource_group: 'stage', region: 'us-south' },
      compliance_profile: projectComplianceProfileModel,
    };
    
    const params = {
      projectId: projectIdLink,
      definition: environmentDefinitionRequiredPropertiesModel,
    };
    
    let res;
    try {
      res = await projectService.createProjectEnvironment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • project_config_auth_model = {
      'trusted_profile_id': 'Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12',
      'method': 'trusted_profile',
    }
    
    project_compliance_profile_model = {
      'id': 'some-profile-id',
      'instance_id': 'some-instance-id',
      'instance_location': 'us-south',
      'attachment_id': 'some-attachment-id',
      'profile_name': 'some-profile-name',
    }
    
    environment_definition_required_properties_model = {
      'description': 'The environment development.',
      'name': 'development',
      'authorizations': project_config_auth_model,
      'inputs': {'resource_group': 'stage', 'region': 'us-south'},
      'compliance_profile': project_compliance_profile_model,
    }
    
    response = project_service.create_project_environment(
      project_id=project_id_link,
      definition=environment_definition_required_properties_model,
    )
    environment = response.get_result()
    
    print(json.dumps(environment, indent=2))

Response

The definition of a project environment.

The definition of a project environment.

The definition of a project environment.

The definition of a project environment.

Status Code

  • The new resource was created.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

Example responses
  • The sample environment response.

    {
      "id": "env123",
      "definition": {
        "name": "development",
        "description": "The environment development.",
        "authorizations": {
          "method": "trusted_profile",
          "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
        },
        "inputs": {
          "resource_group": "stage",
          "region": "us-south"
        },
        "compliance_profile": {
          "id": "some-profile-id",
          "instance_id": "some-instance-id",
          "instance_location": "us-south",
          "profile_name": "some-profile-name",
          "attachment_id": "some-attachment-id"
        }
      },
      "project": {
        "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
        "definition": {
          "name": "iaas-infra-prestage-env"
        },
        "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
      },
      "created_at": "2023-06-29T03:28:14.709Z",
      "modified_at": "2023-06-29T03:28:14.709Z",
      "href": "https://projects.api.test.cloud.ibm.com/v1/projects/6fd53106-7ce6-429e-8c57-f22e832d0c4b/environments/2102afed-94c7-46fe-90f2-7fff290637b4"
    }
  • The sample environment response.

    {
      "id": "env123",
      "definition": {
        "name": "development",
        "description": "The environment development.",
        "authorizations": {
          "method": "trusted_profile",
          "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
        },
        "inputs": {
          "resource_group": "stage",
          "region": "us-south"
        },
        "compliance_profile": {
          "id": "some-profile-id",
          "instance_id": "some-instance-id",
          "instance_location": "us-south",
          "profile_name": "some-profile-name",
          "attachment_id": "some-attachment-id"
        }
      },
      "project": {
        "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
        "definition": {
          "name": "iaas-infra-prestage-env"
        },
        "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
      },
      "created_at": "2023-06-29T03:28:14.709Z",
      "modified_at": "2023-06-29T03:28:14.709Z",
      "href": "https://projects.api.test.cloud.ibm.com/v1/projects/6fd53106-7ce6-429e-8c57-f22e832d0c4b/environments/2102afed-94c7-46fe-90f2-7fff290637b4"
    }

List environments

List all available environments. For more information, see Creating an environment.

List all available environments. For more information, see Creating an environment.

List all available environments. For more information, see Creating an environment.

List all available environments. For more information, see Creating an environment.

GET /v1/projects/{project_id}/environments
list_project_environments(
        self,
        project_id: str,
        *,
        token: Optional[str] = None,
        limit: Optional[int] = None,
        **kwargs,
    ) -> DetailedResponse
listProjectEnvironments(params)
(project *ProjectV1) ListProjectEnvironments(listProjectEnvironmentsOptions *ListProjectEnvironmentsOptions) (result *EnvironmentCollection, response *core.DetailedResponse, err error)
(project *ProjectV1) ListProjectEnvironmentsWithContext(ctx context.Context, listProjectEnvironmentsOptions *ListProjectEnvironmentsOptions) (result *EnvironmentCollection, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to listing environments.

  • project.environment.retrieve-all

Auditing

Calling this method generates the following auditing event.

  • project.environment.list

Request

Instantiate the ListProjectEnvironmentsOptions struct and set the fields to provide parameter values for the ListProjectEnvironments method.

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

Query Parameters

  • The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression ^$|^(?!\s)(?!.*\s$)[^\x00-\x1F]*$

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression /^$|^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]*$/

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

    Possible values: 0 ≤ length ≤ 1536, Value must match regular expression /^$|^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]*$/

    Default:

  • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

WithContext method only

The ListProjectEnvironments options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/environments"
  • listProjectEnvironmentsOptions := &projectv1.ListProjectEnvironmentsOptions{
      ProjectID: &projectIdLink,
      Limit: core.Int64Ptr(int64(10)),
    }
    
    pager, err := projectService.NewProjectEnvironmentsPager(listProjectEnvironmentsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []projectv1.Environment
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • const params = {
      projectId: projectIdLink,
      limit: 10,
    };
    
    const allResults = [];
    try {
      const pager = new ProjectV1.ProjectEnvironmentsPager(projectService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = ProjectEnvironmentsPager(
      client=project_service,
      project_id=project_id_link,
      limit=10,
    )
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))

Response

The list environment response.

The list environment response.

The list environment response.

The list environment response.

Status Code

  • The request was successful.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

Example responses
  • The sample environment response for a list.

    {
      "limit": 1,
      "first": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments?limit=1"
      },
      "next": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments?limit=1&token=da969bff-vf9q-3t1t-b677-d6rt5c0de54e"
      },
      "environments": [
        {
          "id": "env123",
          "definition": {
            "name": "development",
            "description": "The environment development.",
            "authorizations": {
              "method": "trusted_profile",
              "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
            },
            "inputs": {
              "resource_group": "stage",
              "region": "us-south"
            },
            "compliance_profile": {
              "id": "some-profile-id",
              "instance_id": "some-instance-id",
              "instance_location": "us-south",
              "profile_name": "some-profile-name",
              "attachment_id": "some-attachment-id"
            }
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-06-29T03:28:14.709Z",
          "modified_at": "2023-06-29T03:28:14.709Z",
          "href": "https://projects.api.test.cloud.ibm.com/v1/projects/6fd53106-7ce6-429e-8c57-f22e832d0c4b/environments/2102afed-94c7-46fe-90f2-7fff290637b4"
        }
      ]
    }
  • The sample environment response for a list.

    {
      "limit": 1,
      "first": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments?limit=1"
      },
      "next": {
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/environments?limit=1&token=da969bff-vf9q-3t1t-b677-d6rt5c0de54e"
      },
      "environments": [
        {
          "id": "env123",
          "definition": {
            "name": "development",
            "description": "The environment development.",
            "authorizations": {
              "method": "trusted_profile",
              "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
            },
            "inputs": {
              "resource_group": "stage",
              "region": "us-south"
            },
            "compliance_profile": {
              "id": "some-profile-id",
              "instance_id": "some-instance-id",
              "instance_location": "us-south",
              "profile_name": "some-profile-name",
              "attachment_id": "some-attachment-id"
            }
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "created_at": "2023-06-29T03:28:14.709Z",
          "modified_at": "2023-06-29T03:28:14.709Z",
          "href": "https://projects.api.test.cloud.ibm.com/v1/projects/6fd53106-7ce6-429e-8c57-f22e832d0c4b/environments/2102afed-94c7-46fe-90f2-7fff290637b4"
        }
      ]
    }

Get an environment

Get an environment. Learn more.

Get an environment. Learn more.

Get an environment. Learn more.

Get an environment. Learn more.

GET /v1/projects/{project_id}/environments/{id}
get_project_environment(
        self,
        project_id: str,
        id: str,
        **kwargs,
    ) -> DetailedResponse
getProjectEnvironment(params)
(project *ProjectV1) GetProjectEnvironment(getProjectEnvironmentOptions *GetProjectEnvironmentOptions) (result *Environment, response *core.DetailedResponse, err error)
(project *ProjectV1) GetProjectEnvironmentWithContext(ctx context.Context, getProjectEnvironmentOptions *GetProjectEnvironmentOptions) (result *Environment, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to getting environments.

  • project.environment.retrieve

Auditing

Calling this method generates the following auditing event.

  • project.environment.read

Request

Instantiate the GetProjectEnvironmentOptions struct and set the fields to provide parameter values for the GetProjectEnvironment method.

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

  • The environment ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression ^(?!\s)(?!.*\s$).+$

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The environment ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^(?!\\s)(?!.*\\s$).+$/

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The environment ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^(?!\\s)(?!.*\\s$).+$/

WithContext method only

The GetProjectEnvironment options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/environments/{id}"
  • getProjectEnvironmentOptions := projectService.NewGetProjectEnvironmentOptions(
      projectIdLink,
      projectIdLink,
    )
    
    environment, response, err := projectService.GetProjectEnvironment(getProjectEnvironmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(environment, "", "  ")
    fmt.Println(string(b))
  • const params = {
      projectId: projectIdLink,
      id: projectIdLink,
    };
    
    let res;
    try {
      res = await projectService.getProjectEnvironment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = project_service.get_project_environment(
      project_id=project_id_link,
      id=project_id_link,
    )
    environment = response.get_result()
    
    print(json.dumps(environment, indent=2))

Response

The definition of a project environment.

The definition of a project environment.

The definition of a project environment.

The definition of a project environment.

Status Code

  • You successfully retrieved an environment.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

Example responses
  • The sample environment response.

    {
      "id": "env123",
      "definition": {
        "name": "development",
        "description": "The environment development.",
        "authorizations": {
          "method": "trusted_profile",
          "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
        },
        "inputs": {
          "resource_group": "stage",
          "region": "us-south"
        },
        "compliance_profile": {
          "id": "some-profile-id",
          "instance_id": "some-instance-id",
          "instance_location": "us-south",
          "profile_name": "some-profile-name",
          "attachment_id": "some-attachment-id"
        }
      },
      "project": {
        "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
        "definition": {
          "name": "iaas-infra-prestage-env"
        },
        "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
      },
      "created_at": "2023-06-29T03:28:14.709Z",
      "modified_at": "2023-06-29T03:28:14.709Z",
      "href": "https://projects.api.test.cloud.ibm.com/v1/projects/6fd53106-7ce6-429e-8c57-f22e832d0c4b/environments/2102afed-94c7-46fe-90f2-7fff290637b4"
    }
  • The sample environment response.

    {
      "id": "env123",
      "definition": {
        "name": "development",
        "description": "The environment development.",
        "authorizations": {
          "method": "trusted_profile",
          "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
        },
        "inputs": {
          "resource_group": "stage",
          "region": "us-south"
        },
        "compliance_profile": {
          "id": "some-profile-id",
          "instance_id": "some-instance-id",
          "instance_location": "us-south",
          "profile_name": "some-profile-name",
          "attachment_id": "some-attachment-id"
        }
      },
      "project": {
        "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
        "definition": {
          "name": "iaas-infra-prestage-env"
        },
        "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
      },
      "created_at": "2023-06-29T03:28:14.709Z",
      "modified_at": "2023-06-29T03:28:14.709Z",
      "href": "https://projects.api.test.cloud.ibm.com/v1/projects/6fd53106-7ce6-429e-8c57-f22e832d0c4b/environments/2102afed-94c7-46fe-90f2-7fff290637b4"
    }

Update an environment

Update an environment by specifying its ID. Learn more.

Update an environment by specifying its ID. Learn more.

Update an environment by specifying its ID. Learn more.

Update an environment by specifying its ID. Learn more.

PATCH /v1/projects/{project_id}/environments/{id}
update_project_environment(
        self,
        project_id: str,
        id: str,
        definition: 'EnvironmentDefinitionPropertiesPatch',
        **kwargs,
    ) -> DetailedResponse
updateProjectEnvironment(params)
(project *ProjectV1) UpdateProjectEnvironment(updateProjectEnvironmentOptions *UpdateProjectEnvironmentOptions) (result *Environment, response *core.DetailedResponse, err error)
(project *ProjectV1) UpdateProjectEnvironmentWithContext(ctx context.Context, updateProjectEnvironmentOptions *UpdateProjectEnvironmentOptions) (result *Environment, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to updating an environments.

  • project.environment.update

Auditing

Calling this method generates the following auditing event.

  • project.environment.update

Request

Instantiate the UpdateProjectEnvironmentOptions struct and set the fields to provide parameter values for the UpdateProjectEnvironment method.

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

  • The environment ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression ^(?!\s)(?!.*\s$).+$

The request body for the updated environment document.

Examples:

A sample environment update request.

{
  "definition": {
    "name": "development",
    "description": "The environment development.",
    "authorizations": {
      "method": "trusted_profile",
      "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
    },
    "inputs": {
      "resource_group": "stage",
      "region": "us-south"
    },
    "compliance_profile": {
      "id": "some-profile-id",
      "instance_id": "some-instance-id",
      "instance_location": "us-south",
      "profile_name": "some-profile-name",
      "attachment_id": "some-attachment-id"
    }
  }
}

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The environment ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^(?!\\s)(?!.*\\s$).+$/

  • The environment definition that is used for updates.

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The environment ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^(?!\\s)(?!.*\\s$).+$/

  • The environment definition that is used for updates.

WithContext method only

The UpdateProjectEnvironment options.

  • curl -X PATCH --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "definition": { "name": "development", "description": "The environment development.", "authorizations": { "method": "trusted_profile", "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12" }, "inputs": { "resource_group": "stage", "region": "us-south" }, "compliance_profile": { "id": "some-profile-id", "instance_id": "some-instance-id", "instance_location": "us-south", "profile_name": "some-profile-name", "attachment_id": "some-attachment-id" } } }'   "{base_url}/v1/projects/{project_id}/environments/{id}"
  • projectConfigAuthModel := &projectv1.ProjectConfigAuth{
      TrustedProfileID: core.StringPtr("Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"),
      Method: core.StringPtr("trusted_profile"),
    }
    
    projectComplianceProfileModel := &projectv1.ProjectComplianceProfile{
      ID: core.StringPtr("some-profile-id"),
      InstanceID: core.StringPtr("some-instance-id"),
      InstanceLocation: core.StringPtr("us-south"),
      AttachmentID: core.StringPtr("some-attachment-id"),
      ProfileName: core.StringPtr("some-profile-name"),
    }
    
    environmentDefinitionPropertiesPatchModel := &projectv1.EnvironmentDefinitionPropertiesPatch{
      Description: core.StringPtr("The environment development."),
      Name: core.StringPtr("development"),
      Authorizations: projectConfigAuthModel,
      ComplianceProfile: projectComplianceProfileModel,
    }
    
    updateProjectEnvironmentOptions := projectService.NewUpdateProjectEnvironmentOptions(
      projectIdLink,
      projectIdLink,
      environmentDefinitionPropertiesPatchModel,
    )
    
    environment, response, err := projectService.UpdateProjectEnvironment(updateProjectEnvironmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(environment, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ProjectConfigAuth
    const projectConfigAuthModel = {
      trusted_profile_id: 'Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12',
      method: 'trusted_profile',
    };
    
    // ProjectComplianceProfile
    const projectComplianceProfileModel = {
      id: 'some-profile-id',
      instance_id: 'some-instance-id',
      instance_location: 'us-south',
      attachment_id: 'some-attachment-id',
      profile_name: 'some-profile-name',
    };
    
    // EnvironmentDefinitionPropertiesPatch
    const environmentDefinitionPropertiesPatchModel = {
      description: 'The environment development.',
      name: 'development',
      authorizations: projectConfigAuthModel,
      inputs: { resource_group: 'stage', region: 'us-south' },
      compliance_profile: projectComplianceProfileModel,
    };
    
    const params = {
      projectId: projectIdLink,
      id: projectIdLink,
      definition: environmentDefinitionPropertiesPatchModel,
    };
    
    let res;
    try {
      res = await projectService.updateProjectEnvironment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • project_config_auth_model = {
      'trusted_profile_id': 'Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12',
      'method': 'trusted_profile',
    }
    
    project_compliance_profile_model = {
      'id': 'some-profile-id',
      'instance_id': 'some-instance-id',
      'instance_location': 'us-south',
      'attachment_id': 'some-attachment-id',
      'profile_name': 'some-profile-name',
    }
    
    environment_definition_properties_patch_model = {
      'description': 'The environment development.',
      'name': 'development',
      'authorizations': project_config_auth_model,
      'inputs': {'resource_group': 'stage', 'region': 'us-south'},
      'compliance_profile': project_compliance_profile_model,
    }
    
    response = project_service.update_project_environment(
      project_id=project_id_link,
      id=project_id_link,
      definition=environment_definition_properties_patch_model,
    )
    environment = response.get_result()
    
    print(json.dumps(environment, indent=2))

Response

The definition of a project environment.

The definition of a project environment.

The definition of a project environment.

The definition of a project environment.

Status Code

  • You successfully updated an environment.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

Example responses
  • The sample environment response.

    {
      "id": "env123",
      "definition": {
        "name": "development",
        "description": "The environment development.",
        "authorizations": {
          "method": "trusted_profile",
          "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
        },
        "inputs": {
          "resource_group": "stage",
          "region": "us-south"
        },
        "compliance_profile": {
          "id": "some-profile-id",
          "instance_id": "some-instance-id",
          "instance_location": "us-south",
          "profile_name": "some-profile-name",
          "attachment_id": "some-attachment-id"
        }
      },
      "project": {
        "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
        "definition": {
          "name": "iaas-infra-prestage-env"
        },
        "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
      },
      "created_at": "2023-06-29T03:28:14.709Z",
      "modified_at": "2023-06-29T03:28:14.709Z",
      "href": "https://projects.api.test.cloud.ibm.com/v1/projects/6fd53106-7ce6-429e-8c57-f22e832d0c4b/environments/2102afed-94c7-46fe-90f2-7fff290637b4"
    }
  • The sample environment response.

    {
      "id": "env123",
      "definition": {
        "name": "development",
        "description": "The environment development.",
        "authorizations": {
          "method": "trusted_profile",
          "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
        },
        "inputs": {
          "resource_group": "stage",
          "region": "us-south"
        },
        "compliance_profile": {
          "id": "some-profile-id",
          "instance_id": "some-instance-id",
          "instance_location": "us-south",
          "profile_name": "some-profile-name",
          "attachment_id": "some-attachment-id"
        }
      },
      "project": {
        "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
        "definition": {
          "name": "iaas-infra-prestage-env"
        },
        "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
        "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
      },
      "created_at": "2023-06-29T03:28:14.709Z",
      "modified_at": "2023-06-29T03:28:14.709Z",
      "href": "https://projects.api.test.cloud.ibm.com/v1/projects/6fd53106-7ce6-429e-8c57-f22e832d0c4b/environments/2102afed-94c7-46fe-90f2-7fff290637b4"
    }

Delete an environment

Delete an environment in a project by specifying its ID.

Delete an environment in a project by specifying its ID.

Delete an environment in a project by specifying its ID.

Delete an environment in a project by specifying its ID.

DELETE /v1/projects/{project_id}/environments/{id}
delete_project_environment(
        self,
        project_id: str,
        id: str,
        **kwargs,
    ) -> DetailedResponse
deleteProjectEnvironment(params)
(project *ProjectV1) DeleteProjectEnvironment(deleteProjectEnvironmentOptions *DeleteProjectEnvironmentOptions) (result *EnvironmentDeleteResponse, response *core.DetailedResponse, err error)
(project *ProjectV1) DeleteProjectEnvironmentWithContext(ctx context.Context, deleteProjectEnvironmentOptions *DeleteProjectEnvironmentOptions) (result *EnvironmentDeleteResponse, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies only to the delete environments operation.

  • project.environment.delete

Auditing

Calling this method generates the following auditing event.

  • project.environment.delete

Request

Instantiate the DeleteProjectEnvironmentOptions struct and set the fields to provide parameter values for the DeleteProjectEnvironment method.

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

  • The environment ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression ^(?!\s)(?!.*\s$).+$

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The environment ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^(?!\\s)(?!.*\\s$).+$/

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The environment ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^(?!\\s)(?!.*\\s$).+$/

WithContext method only

The DeleteProjectEnvironment options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/environments/{id}"
  • deleteProjectEnvironmentOptions := projectService.NewDeleteProjectEnvironmentOptions(
      projectIdLink,
      projectIdLink,
    )
    
    environmentDeleteResponse, response, err := projectService.DeleteProjectEnvironment(deleteProjectEnvironmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(environmentDeleteResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      projectId: projectIdLink,
      id: projectIdLink,
    };
    
    let res;
    try {
      res = await projectService.deleteProjectEnvironment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = project_service.delete_project_environment(
      project_id=project_id_link,
      id=project_id_link,
    )
    environment_delete_response = response.get_result()
    
    print(json.dumps(environment_delete_response, indent=2))

Response

The response to a request to delete an environment.

The response to a request to delete an environment.

The response to a request to delete an environment.

The response to a request to delete an environment.

Status Code

  • You successfully deleted an environment.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

  • The credentials are invalid or authentication is required to succeed.

  • The supplied authentication is not authorized to view this resource.

Example responses
  • The sample environment delete response.

    {
      "id": "env123"
    }
  • The sample environment delete response.

    {
      "id": "env123"
    }

Add or remove resources

Add or remove existing resources from a configuration by adding or removing service tags. Service tags are static and already part of the model. The request does not require a payload.

POST /v1/projects/{project_id}/configs/{id}/apply_tags

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies service tags to your resources so that they can be managed in your project.

  • project.config.manual-tag

Auditing

Calling this method generates the following auditing event.

  • project.config.manual-tag

Request

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

  • The unique configuration ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

Response

The response to a successful request to tag.

Status Code

  • The operation was successful.

  • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

Example responses
  • {}

Add a new configuration

Add a new configuration to a project.

Add a new configuration to a project.

Add a new configuration to a project.

Add a new configuration to a project.

POST /v1/projects/{project_id}/configs
create_config(
        self,
        project_id: str,
        definition: 'ProjectConfigDefinitionPrototype',
        *,
        schematics: Optional['SchematicsWorkspace'] = None,
        **kwargs,
    ) -> DetailedResponse
createConfig(params)
(project *ProjectV1) CreateConfig(createConfigOptions *CreateConfigOptions) (result *ProjectConfig, response *core.DetailedResponse, err error)
(project *ProjectV1) CreateConfigWithContext(ctx context.Context, createConfigOptions *CreateConfigOptions) (result *ProjectConfig, response *core.DetailedResponse, err error)

Authentication

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

This action applies to only the update project operation.

  • project.config.create

Auditing

Calling this method generates the following auditing event.

  • project.config.create

Request

Instantiate the CreateConfigOptions struct and set the fields to provide parameter values for the CreateConfig method.

Path Parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

The request body for the new project definition document.

Examples:

An example request for a project configuration with a catalog locator ID.

{
  "definition": {
    "name": "env-stage",
    "description": "The stage environment configuration.",
    "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
    "inputs": {
      "account_id": "account_id",
      "resource_group": "stage",
      "access_tags": [
        "env:stage"
      ],
      "logdna_name": "LogDNA_stage_service",
      "sysdig_name": "SysDig_stage_service"
    }
  }
}

A resource configuration example request.

{
  "definition": {
    "name": "shared-resources-dev",
    "description": "The stage environment configuration.",
    "labels": [
      "dev"
    ],
    "resource_crns": [
      "crn:v1:staging:public:continuous-delivery:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:e988fcf7-2bd7-46de-a72d-339ebe859a9e::",
      "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
    ],
    "authorizations": {
      "method": "trusted_profile",
      "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
    }
  }
}

A project configuration example request for importing from an existing workspace.

{
  "definition": {
    "name": "env-stage",
    "description": "The stage environment configuration.",
    "inputs": {
      "account_id": "account_id",
      "resource_group": "stage",
      "access_tags": [
        "env:stage"
      ],
      "logdna_name": "LogDNA_stage_service",
      "sysdig_name": "SysDig_stage_service"
    }
  },
  "schematics": {
    "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
  }
}

The example request to create a stack configuration.

{
  "definition": {
    "name": "stack-bottom-up-example",
    "description": "A deployable architecture stack that includes two member deployable architectures.",
    "members": [
      {
        "name": "foundation-deployable-architecture",
        "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
      },
      {
        "name": "middleware-architecture",
        "config_id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
      }
    ]
  }
}

parameters

  • The unique project ID.

    Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

  • The description of a project configuration.

    • A Schematics workspace to use for deploying this deployable architecture.

      If you are importing data from an existing Schematics workspace that is not backed by cart, then you must provide a locator_id. If you are using a Schematics workspace that is backed by cart, a locator_id is not required because the Schematics workspace has one. There are 3 scenarios:

      1. If only a locator_id is specified, a new Schematics workspace is instantiated with that locator_id.
      2. If only a schematics workspace_crn is specified, a 400 is returned if a locator_id is not found in the existing schematics workspace.
      3. If both a Schematics workspace_crn and a locator_id are specified, a 400code is returned if the specified locator_id does not agree with the locator_id in the existing Schematics workspace. For more information, see Creating workspaces and importing your Terraform template.

    parameters

    • The unique project ID.

      Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

    • The description of a project configuration.

      • A Schematics workspace to use for deploying this deployable architecture.

        If you are importing data from an existing Schematics workspace that is not backed by cart, then you must provide a locator_id. If you are using a Schematics workspace that is backed by cart, a locator_id is not required because the Schematics workspace has one. There are 3 scenarios:

        1. If only a locator_id is specified, a new Schematics workspace is instantiated with that locator_id.
        2. If only a schematics workspace_crn is specified, a 400 is returned if a locator_id is not found in the existing schematics workspace.
        3. If both a Schematics workspace_crn and a locator_id are specified, a 400code is returned if the specified locator_id does not agree with the locator_id in the existing Schematics workspace. For more information, see Creating workspaces and importing your Terraform template.

      WithContext method only

      The CreateConfig options.

      • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "definition": { "name": "env-stage", "description": "The stage environment configuration.", "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global", "inputs": { "account_id": "account_id", "resource_group": "stage", "access_tags": [ "env:stage" ], "logdna_name": "LogDNA_stage_service", "sysdig_name": "SysDig_stage_service" } } }'   "{base_url}/v1/projects/{project_id}/configs"
      • projectConfigDefinitionPrototypeModel := &projectv1.ProjectConfigDefinitionPrototypeDAConfigDefinitionPropertiesPrototype{
          LocatorID: core.StringPtr("1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"),
          Description: core.StringPtr("The stage environment configuration."),
          Name: core.StringPtr("env-stage"),
        }
        
        createConfigOptions := projectService.NewCreateConfigOptions(
          projectIdLink,
          projectConfigDefinitionPrototypeModel,
        )
        
        projectConfig, response, err := projectService.CreateConfig(createConfigOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(projectConfig, "", "  ")
        fmt.Println(string(b))
      • // Request models needed by this operation.
        
        // ProjectConfigDefinitionPrototypeDAConfigDefinitionPropertiesPrototype
        const projectConfigDefinitionPrototypeModel = {
          locator_id: '1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global',
          description: 'The stage environment configuration.',
          name: 'env-stage',
          inputs: { account_id: 'account_id', resource_group: 'stage', access_tags: ['env:stage'], logdna_name: 'LogDNA_stage_service', sysdig_name: 'SysDig_stage_service' },
        };
        
        const params = {
          projectId: projectIdLink,
          definition: projectConfigDefinitionPrototypeModel,
        };
        
        let res;
        try {
          res = await projectService.createConfig(params);
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • project_config_definition_prototype_model = {
          'locator_id': '1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global',
          'description': 'The stage environment configuration.',
          'name': 'env-stage',
          'inputs': {'account_id': 'account_id', 'resource_group': 'stage', 'access_tags': ['env:stage'], 'logdna_name': 'LogDNA_stage_service', 'sysdig_name': 'SysDig_stage_service'},
        }
        
        response = project_service.create_config(
          project_id=project_id_link,
          definition=project_config_definition_prototype_model,
        )
        project_config = response.get_result()
        
        print(json.dumps(project_config, indent=2))

      Response

      The standard schema of a project configuration.

      The standard schema of a project configuration.

      The standard schema of a project configuration.

      The standard schema of a project configuration.

      Status Code

      • The new resource was created.

      • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

      • The credentials are invalid or authentication is required to succeed.

      • The supplied authentication is not authorized to view this resource.

      Example responses
      • The example response to a request for a deployable architecture configuration draft.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration.",
            "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
            "inputs": {
              "account_id": "ref:/configs/account-stage/inputs/account_id",
              "resource_group": "stage",
              "access_tags": [
                "env:stage"
              ],
              "logdna_name": "The name of the LogDNA stage service instance.",
              "sysdig_name": "The name of the SysDig stage service instance."
            }
          },
          "is_draft": true,
          "version": 2,
          "outputs": [
            {
              "name": "resource_group_id"
            },
            {
              "name": "logdna_id"
            },
            {
              "name": "sysdig_id"
            }
          ],
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "schematics": {
            "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
          },
          "state": "validated",
          "update_available": true,
          "needs_attention_state": [],
          "created_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
          "deployment_mode": "project_deployed"
        }
      • The example response to a request for a deployable architecture configuration draft.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration.",
            "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
            "inputs": {
              "account_id": "ref:/configs/account-stage/inputs/account_id",
              "resource_group": "stage",
              "access_tags": [
                "env:stage"
              ],
              "logdna_name": "The name of the LogDNA stage service instance.",
              "sysdig_name": "The name of the SysDig stage service instance."
            }
          },
          "is_draft": true,
          "version": 2,
          "outputs": [
            {
              "name": "resource_group_id"
            },
            {
              "name": "logdna_id"
            },
            {
              "name": "sysdig_id"
            }
          ],
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "schematics": {
            "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
          },
          "state": "validated",
          "update_available": true,
          "needs_attention_state": [],
          "created_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
          "deployment_mode": "project_deployed"
        }
      • The example response to a request for a resource configuration draft.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "shared-resources-dev",
            "description": "The shared resources for dev environments.",
            "labels": [
              "dev"
            ],
            "type": "manual",
            "resource_crns": [
              "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
            ]
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "is_draft": false,
          "version": 2,
          "state": "applied",
          "needs_attention_state": [],
          "outputs": [],
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "deployment_mode": "user_deployed"
        }
      • The example response to a request for a resource configuration draft.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "shared-resources-dev",
            "description": "The shared resources for dev environments.",
            "labels": [
              "dev"
            ],
            "type": "manual",
            "resource_crns": [
              "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
            ]
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "is_draft": false,
          "version": 2,
          "state": "applied",
          "needs_attention_state": [],
          "outputs": [],
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "deployment_mode": "user_deployed"
        }
      • Sample response to consume a stack.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "stack-config-example",
            "description": "A deployable architecture stack that substitutes the first member in a stack for another existing configuration.",
            "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
            "inputs": {
              "region": "us-south",
              "resource_group_name": "stack-rg"
            },
            "members": [
              {
                "name": "foundation-deployable-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
              },
              {
                "name": "middleware-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beZ"
              }
            ]
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 1,
          "is_draft": true,
          "state": "draft",
          "needs_attention_state": [],
          "outputs": [
            {
              "name": "workload_cluster_server_url"
            }
          ],
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
        }
      • Sample response to consume a stack.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "stack-config-example",
            "description": "A deployable architecture stack that substitutes the first member in a stack for another existing configuration.",
            "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
            "inputs": {
              "region": "us-south",
              "resource_group_name": "stack-rg"
            },
            "members": [
              {
                "name": "foundation-deployable-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
              },
              {
                "name": "middleware-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beZ"
              }
            ]
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 1,
          "is_draft": true,
          "state": "draft",
          "needs_attention_state": [],
          "outputs": [
            {
              "name": "workload_cluster_server_url"
            }
          ],
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
        }
      • Sample response to create a stack.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "stack-bottom-up-example",
            "description": "A deployable architecture stack that includes two member deployable architectures.",
            "members": [
              {
                "name": "foundation-deployable-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
              },
              {
                "name": "middleware-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
              }
            ]
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 1,
          "is_draft": true,
          "state": "draft",
          "needs_attention_state": [],
          "outputs": [],
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
        }
      • Sample response to create a stack.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "stack-bottom-up-example",
            "description": "A deployable architecture stack that includes two member deployable architectures.",
            "members": [
              {
                "name": "foundation-deployable-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
              },
              {
                "name": "middleware-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
              }
            ]
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 1,
          "is_draft": true,
          "state": "draft",
          "needs_attention_state": [],
          "outputs": [],
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
        }

      List all project configurations

      Retrieve the collection of configurations.

      Retrieve the collection of configurations.

      Retrieve the collection of configurations.

      Retrieve the collection of configurations.

      GET /v1/projects/{project_id}/configs
      list_configs(
              self,
              project_id: str,
              *,
              token: Optional[str] = None,
              limit: Optional[int] = None,
              **kwargs,
          ) -> DetailedResponse
      listConfigs(params)
      (project *ProjectV1) ListConfigs(listConfigsOptions *ListConfigsOptions) (result *ProjectConfigCollection, response *core.DetailedResponse, err error)
      (project *ProjectV1) ListConfigsWithContext(ctx context.Context, listConfigsOptions *ListConfigsOptions) (result *ProjectConfigCollection, response *core.DetailedResponse, err error)

      Authentication

      This method uses the following security schemes for authentication.

      Authorization

      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

      This action applies only to the get project operation.

      • project.config.retrieve-all

      Auditing

      Calling this method generates the following auditing event.

      • project.config.list

      Request

      Instantiate the ListConfigsOptions struct and set the fields to provide parameter values for the ListConfigs method.

      Path Parameters

      • The unique project ID.

        Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

      Query Parameters

      • The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

        Possible values: 0 ≤ length ≤ 1536, Value must match regular expression ^$|^(?!\s)(?!.*\s$)[^\x00-\x1F]*$

        Default:

      • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

        Possible values: 1 ≤ value ≤ 100

        Default: 10

      parameters

      • The unique project ID.

        Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

      • The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

        Possible values: 0 ≤ length ≤ 1536, Value must match regular expression /^$|^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]*$/

        Default:

      • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

        Possible values: 1 ≤ value ≤ 100

        Default: 10

      parameters

      • The unique project ID.

        Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

      • The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

        Possible values: 0 ≤ length ≤ 1536, Value must match regular expression /^$|^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]*$/

        Default:

      • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

        Possible values: 1 ≤ value ≤ 100

        Default: 10

      WithContext method only

      The ListConfigs options.

      • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs"
      • listConfigsOptions := &projectv1.ListConfigsOptions{
          ProjectID: &projectIdLink,
          Limit: core.Int64Ptr(int64(10)),
        }
        
        pager, err := projectService.NewConfigsPager(listConfigsOptions)
        if err != nil {
          panic(err)
        }
        
        var allResults []projectv1.ProjectConfigSummary
        for pager.HasNext() {
          nextPage, err := pager.GetNext()
          if err != nil {
            panic(err)
          }
          allResults = append(allResults, nextPage...)
        }
        b, _ := json.MarshalIndent(allResults, "", "  ")
        fmt.Println(string(b))
      • const params = {
          projectId: projectIdLink,
          limit: 10,
        };
        
        const allResults = [];
        try {
          const pager = new ProjectV1.ConfigsPager(projectService, params);
          while (pager.hasNext()) {
            const nextPage = await pager.getNext();
            expect(nextPage).not.toBeNull();
            allResults.push(...nextPage);
          }
          console.log(JSON.stringify(allResults, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • all_results = []
        pager = ConfigsPager(
          client=project_service,
          project_id=project_id_link,
          limit=10,
        )
        while pager.has_next():
          next_page = pager.get_next()
          assert next_page is not None
          all_results.extend(next_page)
        
        print(json.dumps(all_results, indent=2))

      Response

      The project configuration list.

      The project configuration list.

      The project configuration list.

      The project configuration list.

      Status Code

      • The request was successful.

      • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

      • The credentials are invalid or authentication is required to succeed.

      • The supplied authentication is not authorized to view this resource.

      Example responses
      • The example response for a request to get project configurations.

        {
          "limit": 2,
          "first": {
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs?limit=2"
          },
          "next": {
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs?limit=2&token=da969bff-vf9q-3t1t-b677-d6rt5c0de54e"
          },
          "configs": [
            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration."
              },
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "version": 1,
              "state": "validated",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
            },
            {
              "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
              "definition": {
                "name": "region-eu-de-stage",
                "description": "The stage `eu-de` configuration."
              },
              "approved_version": {
                "definition": {
                  "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
                },
                "version": 1,
                "state": "approved",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd/versions/1"
              },
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "version": 2,
              "state": "draft",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd"
            }
          ]
        }
      • The example response for a request to get project configurations.

        {
          "limit": 2,
          "first": {
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs?limit=2"
          },
          "next": {
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs?limit=2&token=da969bff-vf9q-3t1t-b677-d6rt5c0de54e"
          },
          "configs": [
            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration."
              },
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "version": 1,
              "state": "validated",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
            },
            {
              "id": "9c7afed6-17fb-4c56-a13d-440a78f936bd",
              "definition": {
                "name": "region-eu-de-stage",
                "description": "The stage `eu-de` configuration."
              },
              "approved_version": {
                "definition": {
                  "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
                },
                "version": 1,
                "state": "approved",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd/versions/1"
              },
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "version": 2,
              "state": "draft",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd"
            }
          ]
        }

      Get a project configuration

      Retrieve the specified project configuration in a specific project. For more information about project configurations, see Monitoring the status of a configuration and its resources.

      Retrieve the specified project configuration in a specific project. For more information about project configurations, see Monitoring the status of a configuration and its resources.

      Retrieve the specified project configuration in a specific project. For more information about project configurations, see Monitoring the status of a configuration and its resources.

      Retrieve the specified project configuration in a specific project. For more information about project configurations, see Monitoring the status of a configuration and its resources.

      GET /v1/projects/{project_id}/configs/{id}
      get_config(
              self,
              project_id: str,
              id: str,
              **kwargs,
          ) -> DetailedResponse
      getConfig(params)
      (project *ProjectV1) GetConfig(getConfigOptions *GetConfigOptions) (result *ProjectConfig, response *core.DetailedResponse, err error)
      (project *ProjectV1) GetConfigWithContext(ctx context.Context, getConfigOptions *GetConfigOptions) (result *ProjectConfig, response *core.DetailedResponse, err error)

      Authentication

      This method uses the following security schemes for authentication.

      Authorization

      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

      This action applies only to getting a project configuration.

      • project.config.retrieve

      Auditing

      Calling this method generates the following auditing event.

      • project.config.read

      Request

      Instantiate the GetConfigOptions struct and set the fields to provide parameter values for the GetConfig method.

      Path Parameters

      • The unique project ID.

        Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

      • The unique configuration ID.

        Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

      parameters

      • The unique project ID.

        Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

      • The unique configuration ID.

        Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

      parameters

      • The unique project ID.

        Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

      • The unique configuration ID.

        Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

      WithContext method only

      The GetConfig options.

      • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}"
      • getConfigOptions := projectService.NewGetConfigOptions(
          projectIdLink,
          configIdLink,
        )
        
        projectConfig, response, err := projectService.GetConfig(getConfigOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(projectConfig, "", "  ")
        fmt.Println(string(b))
      • const params = {
          projectId: projectIdLink,
          id: configIdLink,
        };
        
        let res;
        try {
          res = await projectService.getConfig(params);
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • response = project_service.get_config(
          project_id=project_id_link,
          id=config_id_link,
        )
        project_config = response.get_result()
        
        print(json.dumps(project_config, indent=2))

      Response

      The standard schema of a project configuration.

      The standard schema of a project configuration.

      The standard schema of a project configuration.

      The standard schema of a project configuration.

      Status Code

      • The request was successful.

      • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

      • The credentials are invalid or authentication is required to succeed.

      • The supplied authentication is not authorized to view this resource.

      Example responses
      • The example response for a deployable architecture configuration.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration.",
            "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
            "inputs": {
              "account_id": "ref:/configs/account-stage/inputs/account_id",
              "resource_group": "stage",
              "access_tags": [
                "env:stage"
              ],
              "logdna_name": "The name of the LogDNA stage service instance.",
              "sysdig_name": "The name of the SysDig stage service instance."
            }
          },
          "needs_attention_state": [],
          "approved_version": {
            "definition": {
              "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
            },
            "version": 1,
            "state": "approved",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd/versions/1"
          },
          "deployed_version": {
            "definition": {
              "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
            },
            "version": 1,
            "state": "deployed",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd/versions/1"
          },
          "last_validated": {
            "cost_estimate": {},
            "cra_logs": {},
            "job": {
              "id": "ba98208b61efa490153b72adfd672251",
              "summary": {
                "version": "1.0.5",
                "plan_summary": {},
                "apply_summary": {},
                "destroy_summary": {},
                "message_summary": {},
                "plan_messages": {},
                "apply_messages": {},
                "destroy_messages": {}
              }
            },
            "href": "https://projects.api.cloud.ibm.com/v1/projects/606bdec6-3b18-4c5e-9cf5-64ff228ab4f6/configs/ac0f34f7-1efc-408c-8a7f-eaa2c9d2bb64/versions/1/last_validated",
            "result": "passed"
          },
          "last_deployed": {
            "job": {
              "id": "c646f6bd5921e5a56656818cc4a22bea",
              "summary": {
                "version": "1.0.5",
                "plan_summary": {},
                "apply_summary": {},
                "destroy_summary": {},
                "message_summary": {},
                "plan_messages": {},
                "apply_messages": {},
                "destroy_messages": {}
              }
            },
            "href": "https://projects.api.cloud.ibm.com/v1/projects/606bdec6-3b18-4c5e-9cf5-64ff228ab4f6/configs/ac0f34f7-1efc-408c-8a7f-eaa2c9d2bb64/versions/1/last_deployed",
            "result": "passed"
          },
          "last_undeployed": {
            "job": {
              "id": "55ced596251e5fcfe86814d189da035e",
              "summary": {
                "version": "1.0.5",
                "plan_summary": {},
                "apply_summary": {},
                "destroy_summary": {},
                "message_summary": {},
                "plan_messages": {},
                "apply_messages": {},
                "destroy_messages": {}
              }
            },
            "href": "https://projects.api.cloud.ibm.com/v1/projects/606bdec6-3b18-4c5e-9cf5-64ff228ab4f6/configs/ac0f34f7-1efc-408c-8a7f-eaa2c9d2bb64/versions/1/last_undeployed",
            "result": "failed"
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 2,
          "is_draft": true,
          "outputs": [
            {
              "name": "resource_group_id"
            },
            {
              "name": "logdna_id"
            },
            {
              "name": "sysdig_id"
            }
          ],
          "schematics": {
            "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139",
            "validate_pre_script": {
              "type": "ansible",
              "path": "scripts/validate-pre-ansible-playbook.yaml",
              "short_description": "pre-validate"
            },
            "validate_post_script": {
              "type": "ansible",
              "path": "scripts/validate-post-ansible-playbook.yaml",
              "short_description": "post validate"
            }
          },
          "state": "draft",
          "update_available": true,
          "created_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
          "deployment_mode": "project_deployed"
        }
      • The example response for a deployable architecture configuration.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "env-stage",
            "description": "The stage environment configuration.",
            "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
            "inputs": {
              "account_id": "ref:/configs/account-stage/inputs/account_id",
              "resource_group": "stage",
              "access_tags": [
                "env:stage"
              ],
              "logdna_name": "The name of the LogDNA stage service instance.",
              "sysdig_name": "The name of the SysDig stage service instance."
            }
          },
          "needs_attention_state": [],
          "approved_version": {
            "definition": {
              "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
            },
            "version": 1,
            "state": "approved",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd/versions/1"
          },
          "deployed_version": {
            "definition": {
              "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
            },
            "version": 1,
            "state": "deployed",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd/versions/1"
          },
          "last_validated": {
            "cost_estimate": {},
            "cra_logs": {},
            "job": {
              "id": "ba98208b61efa490153b72adfd672251",
              "summary": {
                "version": "1.0.5",
                "plan_summary": {},
                "apply_summary": {},
                "destroy_summary": {},
                "message_summary": {},
                "plan_messages": {},
                "apply_messages": {},
                "destroy_messages": {}
              }
            },
            "href": "https://projects.api.cloud.ibm.com/v1/projects/606bdec6-3b18-4c5e-9cf5-64ff228ab4f6/configs/ac0f34f7-1efc-408c-8a7f-eaa2c9d2bb64/versions/1/last_validated",
            "result": "passed"
          },
          "last_deployed": {
            "job": {
              "id": "c646f6bd5921e5a56656818cc4a22bea",
              "summary": {
                "version": "1.0.5",
                "plan_summary": {},
                "apply_summary": {},
                "destroy_summary": {},
                "message_summary": {},
                "plan_messages": {},
                "apply_messages": {},
                "destroy_messages": {}
              }
            },
            "href": "https://projects.api.cloud.ibm.com/v1/projects/606bdec6-3b18-4c5e-9cf5-64ff228ab4f6/configs/ac0f34f7-1efc-408c-8a7f-eaa2c9d2bb64/versions/1/last_deployed",
            "result": "passed"
          },
          "last_undeployed": {
            "job": {
              "id": "55ced596251e5fcfe86814d189da035e",
              "summary": {
                "version": "1.0.5",
                "plan_summary": {},
                "apply_summary": {},
                "destroy_summary": {},
                "message_summary": {},
                "plan_messages": {},
                "apply_messages": {},
                "destroy_messages": {}
              }
            },
            "href": "https://projects.api.cloud.ibm.com/v1/projects/606bdec6-3b18-4c5e-9cf5-64ff228ab4f6/configs/ac0f34f7-1efc-408c-8a7f-eaa2c9d2bb64/versions/1/last_undeployed",
            "result": "failed"
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 2,
          "is_draft": true,
          "outputs": [
            {
              "name": "resource_group_id"
            },
            {
              "name": "logdna_id"
            },
            {
              "name": "sysdig_id"
            }
          ],
          "schematics": {
            "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139",
            "validate_pre_script": {
              "type": "ansible",
              "path": "scripts/validate-pre-ansible-playbook.yaml",
              "short_description": "pre-validate"
            },
            "validate_post_script": {
              "type": "ansible",
              "path": "scripts/validate-post-ansible-playbook.yaml",
              "short_description": "post validate"
            }
          },
          "state": "draft",
          "update_available": true,
          "created_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
          "deployment_mode": "project_deployed"
        }
      • The example response to a request for a resource configuration.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "shared-resources-dev",
            "description": "The shared resources that are used in dev environments.",
            "labels": [
              "dev"
            ],
            "type": "manual",
            "resource_crns": [
              "crn:v1:staging:public:continuous-delivery:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:e988fcf7-2bd7-46de-a72d-339ebe859a9e::",
              "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
            ],
            "authorizations": {
              "method": "trusted_profile",
              "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
            }
          },
          "active_draft": {
            "version": 2,
            "state": "draft",
            "href": "/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd/versions/2"
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 1,
          "is_draft": true,
          "needs_attention_state": [],
          "outputs": [],
          "state": "apply_failed",
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "deployment_mode": "user_deployed"
        }
      • The example response to a request for a resource configuration.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "shared-resources-dev",
            "description": "The shared resources that are used in dev environments.",
            "labels": [
              "dev"
            ],
            "type": "manual",
            "resource_crns": [
              "crn:v1:staging:public:continuous-delivery:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:e988fcf7-2bd7-46de-a72d-339ebe859a9e::",
              "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
            ],
            "authorizations": {
              "method": "trusted_profile",
              "trusted_profile_id": "Profile-9ac10c5c-195c-41ef-b465-68a6b6dg5f12"
            }
          },
          "active_draft": {
            "version": 2,
            "state": "draft",
            "href": "/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/9c7afed6-17fb-4c56-a13d-440a78f936bd/versions/2"
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 1,
          "is_draft": true,
          "needs_attention_state": [],
          "outputs": [],
          "state": "apply_failed",
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
          "deployment_mode": "user_deployed"
        }
      • Sample response to consume a stack.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "stack-config-example",
            "description": "A deployable architecture stack that substitutes the first member in a stack for another existing configuration.",
            "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
            "inputs": {
              "region": "us-south",
              "resource_group_name": "stack-rg"
            },
            "members": [
              {
                "name": "foundation-deployable-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
              },
              {
                "name": "middleware-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beZ"
              }
            ]
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 1,
          "is_draft": true,
          "state": "draft",
          "needs_attention_state": [],
          "outputs": [
            {
              "name": "workload_cluster_server_url"
            }
          ],
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
        }
      • Sample response to consume a stack.

        {
          "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
          "definition": {
            "name": "stack-config-example",
            "description": "A deployable architecture stack that substitutes the first member in a stack for another existing configuration.",
            "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
            "inputs": {
              "region": "us-south",
              "resource_group_name": "stack-rg"
            },
            "members": [
              {
                "name": "foundation-deployable-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
              },
              {
                "name": "middleware-architecture",
                "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beZ"
              }
            ]
          },
          "project": {
            "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
            "definition": {
              "name": "iaas-infra-prestage-env"
            },
            "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
            "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
          },
          "version": 1,
          "is_draft": true,
          "state": "draft",
          "needs_attention_state": [],
          "outputs": [
            {
              "name": "workload_cluster_server_url"
            }
          ],
          "created_at": "2023-02-22T19:51:23.253Z",
          "updated_at": "2023-02-22T19:51:23.253Z",
          "modified_at": "2023-02-22T19:51:23.253Z",
          "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
        }

      Update a configuration

      Update a configuration in a project by specifying the ID. Learn more.

      Update a configuration in a project by specifying the ID. Learn more.

      Update a configuration in a project by specifying the ID. Learn more.

      Update a configuration in a project by specifying the ID. Learn more.

      PATCH /v1/projects/{project_id}/configs/{id}
      update_config(
              self,
              project_id: str,
              id: str,
              definition: 'ProjectConfigDefinitionPatch',
              **kwargs,
          ) -> DetailedResponse
      updateConfig(params)
      (project *ProjectV1) UpdateConfig(updateConfigOptions *UpdateConfigOptions) (result *ProjectConfig, response *core.DetailedResponse, err error)
      (project *ProjectV1) UpdateConfigWithContext(ctx context.Context, updateConfigOptions *UpdateConfigOptions) (result *ProjectConfig, response *core.DetailedResponse, err error)

      Authentication

      Authorization

      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

      This action applies only to updating a project configuration.

      • project.config.update

      Auditing

      Calling this method generates the following auditing event.

      • project.config.update

      Request

      Instantiate the UpdateConfigOptions struct and set the fields to provide parameter values for the UpdateConfig method.

      Path Parameters

      • The unique project ID.

        Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

      • The unique configuration ID.

        Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

      The request body for the change delta of the project configuration to update.

      Examples:

      An example of a request to update the configuration inputs.

      {
        "definition": {
          "name": "env-stage",
          "inputs": {
            "account_id": "account_id",
            "resource_group": "stage",
            "access_tags": [
              "env:stage"
            ],
            "logdna_name": "LogDNA_stage_service",
            "sysdig_name": "SysDig_stage_service"
          }
        }
      }

      An example of a request to update the configuration inputs.

      {
        "definition": {
          "resource_crns": [
            "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
          ]
        }
      }

      An example of a request to update the configuration inputs.

      {
        "definition": {
          "name": "env-stage",
          "members": [
            {
              "name": "foundation-deployable-architecture",
              "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
            },
            {
              "name": "middleware-architecture",
              "config_id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
            }
          ],
          "inputs": {
            "account_id": "account_id",
            "resource_group": "stage"
          }
        }
      }

      parameters

      • The unique project ID.

        Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

      • The unique configuration ID.

        Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

      • The name and description of a project configuration.

        parameters

        • The unique project ID.

          Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

        • The unique configuration ID.

          Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

        • The name and description of a project configuration.

          WithContext method only

          The UpdateConfig options.

          • curl -X PATCH --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "definition": { "name": "env-stage", "inputs": { "account_id": "account_id", "resource_group": "stage", "access_tags": [ "env:stage" ], "logdna_name": "LogDNA_stage_service", "sysdig_name": "SysDig_stage_service" } } }'   "{base_url}/v1/projects/{project_id}/configs/{id}"
          • projectConfigDefinitionPatchModel := &projectv1.ProjectConfigDefinitionPatchDAConfigDefinitionPropertiesPatch{
              Name: core.StringPtr("env-stage"),
            }
            
            updateConfigOptions := projectService.NewUpdateConfigOptions(
              projectIdLink,
              configIdLink,
              projectConfigDefinitionPatchModel,
            )
            
            projectConfig, response, err := projectService.UpdateConfig(updateConfigOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(projectConfig, "", "  ")
            fmt.Println(string(b))
          • // Request models needed by this operation.
            
            // ProjectConfigDefinitionPatchDAConfigDefinitionPropertiesPatch
            const projectConfigDefinitionPatchModel = {
              name: 'env-stage',
              inputs: { account_id: 'account_id', resource_group: 'stage', access_tags: ['env:stage'], logdna_name: 'LogDNA_stage_service', sysdig_name: 'SysDig_stage_service' },
            };
            
            const params = {
              projectId: projectIdLink,
              id: configIdLink,
              definition: projectConfigDefinitionPatchModel,
            };
            
            let res;
            try {
              res = await projectService.updateConfig(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • project_config_definition_patch_model = {
              'name': 'env-stage',
              'inputs': {'account_id': 'account_id', 'resource_group': 'stage', 'access_tags': ['env:stage'], 'logdna_name': 'LogDNA_stage_service', 'sysdig_name': 'SysDig_stage_service'},
            }
            
            response = project_service.update_config(
              project_id=project_id_link,
              id=config_id_link,
              definition=project_config_definition_patch_model,
            )
            project_config = response.get_result()
            
            print(json.dumps(project_config, indent=2))

          Response

          The standard schema of a project configuration.

          The standard schema of a project configuration.

          The standard schema of a project configuration.

          The standard schema of a project configuration.

          Status Code

          • The request was successful.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          Example responses
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }
          • The example response to a request for a resource configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "shared-resources-dev",
                "description": "The shared resources for dev environments.",
                "labels": [
                  "dev"
                ],
                "type": "manual",
                "resource_crns": [
                  "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
                ]
              },
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "is_draft": false,
              "version": 2,
              "state": "applied",
              "needs_attention_state": [],
              "outputs": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "updated_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
              "deployment_mode": "user_deployed"
            }
          • The example response to a request for a resource configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "shared-resources-dev",
                "description": "The shared resources for dev environments.",
                "labels": [
                  "dev"
                ],
                "type": "manual",
                "resource_crns": [
                  "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
                ]
              },
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "is_draft": false,
              "version": 2,
              "state": "applied",
              "needs_attention_state": [],
              "outputs": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "updated_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
              "deployment_mode": "user_deployed"
            }
          • Sample response to create a stack.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "stack-bottom-up-example",
                "description": "A deployable architecture stack that includes two member deployable architectures.",
                "members": [
                  {
                    "name": "foundation-deployable-architecture",
                    "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
                  },
                  {
                    "name": "middleware-architecture",
                    "config_id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
                  }
                ]
              },
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "version": 1,
              "is_draft": true,
              "state": "draft",
              "needs_attention_state": [],
              "outputs": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "updated_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
            }
          • Sample response to create a stack.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "stack-bottom-up-example",
                "description": "A deployable architecture stack that includes two member deployable architectures.",
                "members": [
                  {
                    "name": "foundation-deployable-architecture",
                    "config_id": "293c3c36-a094-4115-a12b-de0a9ca39beX"
                  },
                  {
                    "name": "middleware-architecture",
                    "config_id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
                  }
                ]
              },
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "version": 1,
              "is_draft": true,
              "state": "draft",
              "needs_attention_state": [],
              "outputs": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "updated_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5"
            }

          Delete a configuration

          Delete a configuration in a project by specifying its ID.

          Delete a configuration in a project by specifying its ID.

          Delete a configuration in a project by specifying its ID.

          Delete a configuration in a project by specifying its ID.

          DELETE /v1/projects/{project_id}/configs/{id}
          delete_config(
                  self,
                  project_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          deleteConfig(params)
          (project *ProjectV1) DeleteConfig(deleteConfigOptions *DeleteConfigOptions) (result *ProjectConfigDelete, response *core.DetailedResponse, err error)
          (project *ProjectV1) DeleteConfigWithContext(ctx context.Context, deleteConfigOptions *DeleteConfigOptions) (result *ProjectConfigDelete, response *core.DetailedResponse, err error)

          Authentication

          This method uses the following security schemes for authentication.

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to deleting a configuration.

          • project.config.delete

          Auditing

          Calling this method generates the following auditing event.

          • project.config.delete

          Request

          Instantiate the DeleteConfigOptions struct and set the fields to provide parameter values for the DeleteConfig method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          WithContext method only

          The DeleteConfig options.

          • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}"
          • deleteConfigOptions := projectService.NewDeleteConfigOptions(
              projectIdLink,
              configIdLink,
            )
            
            projectConfigDelete, response, err := projectService.DeleteConfig(deleteConfigOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(projectConfigDelete, "", "  ")
            fmt.Println(string(b))
          • const params = {
              projectId: projectIdLink,
              id: configIdLink,
            };
            
            let res;
            try {
              res = await projectService.deleteConfig(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • response = project_service.delete_config(
              project_id=project_id_link,
              id=config_id_link,
            )
            project_config_delete = response.get_result()
            
            print(json.dumps(project_config_delete, indent=2))

          Response

          The ID of the deleted configuration.

          The ID of the deleted configuration.

          The ID of the deleted configuration.

          The ID of the deleted configuration.

          Status Code

          • The request was successful.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          Example responses
          • The example response to a request to delete a configuration.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
            }
          • The example response to a request to delete a configuration.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
            }

          Update a configuration to dev mode

          Update a project configuration to development mode.

          POST /v1/projects/{project_id}/configs/{id}/dev

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to updating a project configuration.

          • project.config.update

          Auditing

          Calling this method generates the following auditing event.

          • project.config.update

          Request

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          Response

          Status Code

          • The request was successful but the response is empty.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters that are in your request.

          • The credentials are invalid or authentication is required to succeed.

          No Sample Response

          This method does not specify any sample responses.

          Get a diff summary of a project configuration

          Retrieve a diff summary of the specified project configuration between its current draft and the active version of a specific project.

          GET /v1/projects/{project_id}/configs/{id}/diff

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to getting a project configuration.

          • project.config.retrieve-diff

          Request

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          Response

          The diff summary of the project configuration.

          Status Code

          • The request was successful.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters that are in your request.

          • The credentials are invalid or authentication is required to succeed.

          Example responses
          • The example response to a request for a deployable architecture configuration diff summary.

            {
              "added": {
                "inputs": [
                  {
                    "name": "account_id",
                    "type": "string",
                    "new_value": "5addba84e3f845be9acc27edee75a145"
                  }
                ]
              },
              "changed": {
                "inputs": [
                  {
                    "name": "ibm_cloud_api_key",
                    "type": "string",
                    "new_value": "6c573253f969440ebd113fa3bf688809",
                    "old_value": "9f100bfc7ef245119581a4aa4b4dc53a"
                  },
                  {
                    "name": "region",
                    "type": "string",
                    "new_value": "us-south",
                    "old_value": "us-east"
                  }
                ]
              },
              "removed": {
                "inputs": [
                  {
                    "name": "env",
                    "type": "string",
                    "old_value": "stage"
                  }
                ]
              }
            }
          • The example response to a request for a resource configuration diff summary.

            {
              "added": {
                "resource_crns": [
                  "crn:v1:staging:public:continuous-delivery:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:e988fcf7-2bd7-46de-a72d-339ebe859a9e::"
                ]
              },
              "removed": {
                "resource_crns": [
                  "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
                ]
              },
              "changed": {
                "resource_crns": null
              }
            }

          Force approve a project configuration

          Force approve configuration edits to the main configuration with an approving comment.

          Force approve configuration edits to the main configuration with an approving comment.

          Force approve configuration edits to the main configuration with an approving comment.

          Force approve configuration edits to the main configuration with an approving comment.

          POST /v1/projects/{project_id}/configs/{id}/force_approve
          force_approve(
                  self,
                  project_id: str,
                  id: str,
                  comment: str,
                  **kwargs,
              ) -> DetailedResponse
          forceApprove(params)
          (project *ProjectV1) ForceApprove(forceApproveOptions *ForceApproveOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)
          (project *ProjectV1) ForceApproveWithContext(ctx context.Context, forceApproveOptions *ForceApproveOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to the project configuration force approve action.

          • project.config.force-approve

          Auditing

          Calling this method generates the following auditing event.

          • project.config.force-approve

          Request

          Instantiate the ForceApproveOptions struct and set the fields to provide parameter values for the ForceApprove method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          The comment to support the force approve action.

          Examples:
          {
            "comment": "Approving the changes"
          }

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • Notes on the project draft action. If this action is a force approve on the draft configuration, you must include a nonempty comment.

            Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]+$/

            Examples:

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • Notes on the project draft action. If this action is a force approve on the draft configuration, you must include a nonempty comment.

            Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]+$/

            Examples:

          WithContext method only

          The ForceApprove options.

          • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "comment": "Approving the changes" }'   "{base_url}/v1/projects/{project_id}/configs/{id}/force_approve"
          • forceApproveOptions := projectService.NewForceApproveOptions(
              projectIdLink,
              configIdLink,
              "Approving the changes",
            )
            
            projectConfigVersion, response, err := projectService.ForceApprove(forceApproveOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(projectConfigVersion, "", "  ")
            fmt.Println(string(b))
          • const params = {
              projectId: projectIdLink,
              id: configIdLink,
              comment: 'Approving the changes',
            };
            
            let res;
            try {
              res = await projectService.forceApprove(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • response = project_service.force_approve(
              project_id=project_id_link,
              id=config_id_link,
              comment='Approving the changes',
            )
            project_config_version = response.get_result()
            
            print(json.dumps(project_config_version, indent=2))

          Response

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          Status Code

          • You successfully force approved a project configuration.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters that are in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          Example responses
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }

          Approve and merge a configuration draft

          Approve and merge configuration edits to the main configuration.

          Approve and merge configuration edits to the main configuration.

          Approve and merge configuration edits to the main configuration.

          Approve and merge configuration edits to the main configuration.

          POST /v1/projects/{project_id}/configs/{id}/approve
          approve(
                  self,
                  project_id: str,
                  id: str,
                  *,
                  comment: Optional[str] = None,
                  **kwargs,
              ) -> DetailedResponse
          approve(params)
          (project *ProjectV1) Approve(approveOptions *ApproveOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)
          (project *ProjectV1) ApproveWithContext(ctx context.Context, approveOptions *ApproveOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies to only the approve project configuration action.

          • project.config.approve

          Auditing

          Calling this method generates the following auditing event.

          • project.config.approve

          Request

          Instantiate the ApproveOptions struct and set the fields to provide parameter values for the Approve method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          The comment to support the approve action.

          Examples:
          {
            "comment": "Approving the changes"
          }

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • Notes on the project draft action. If this action is a force approve on the draft configuration, you must include a nonempty comment.

            Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]+$/

            Examples:

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • Notes on the project draft action. If this action is a force approve on the draft configuration, you must include a nonempty comment.

            Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^(?!\\s)(?!.*\\s$)[^\\x00-\\x1F]+$/

            Examples:

          WithContext method only

          The Approve options.

          • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "comment": "Approving the changes" }'   "{base_url}/v1/projects/{project_id}/configs/{id}/approve"
          • approveOptions := projectService.NewApproveOptions(
              projectIdLink,
              configIdLink,
            )
            approveOptions.SetComment("Approving the changes")
            
            projectConfigVersion, response, err := projectService.Approve(approveOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(projectConfigVersion, "", "  ")
            fmt.Println(string(b))
          • const params = {
              projectId: projectIdLink,
              id: configIdLink,
              comment: 'Approving the changes',
            };
            
            let res;
            try {
              res = await projectService.approve(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • response = project_service.approve(
              project_id=project_id_link,
              id=config_id_link,
              comment='Approving the changes',
            )
            project_config_version = response.get_result()
            
            print(json.dumps(project_config_version, indent=2))

          Response

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          Status Code

          • You successfully approved and merged a configuration draft.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          Example responses
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }

          Run a validation check

          Run a validation check on a specific configuration in the project. The check includes creating or updating the associated Schematics workspace with a plan job, running the CRA scans, and cost estimation.

          Run a validation check on a specific configuration in the project. The check includes creating or updating the associated Schematics workspace with a plan job, running the CRA scans, and cost estimation.

          Run a validation check on a specific configuration in the project. The check includes creating or updating the associated Schematics workspace with a plan job, running the CRA scans, and cost estimation.

          Run a validation check on a specific configuration in the project. The check includes creating or updating the associated Schematics workspace with a plan job, running the CRA scans, and cost estimation.

          POST /v1/projects/{project_id}/configs/{id}/validate
          validate_config(
                  self,
                  project_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          validateConfig(params)
          (project *ProjectV1) ValidateConfig(validateConfigOptions *ValidateConfigOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)
          (project *ProjectV1) ValidateConfigWithContext(ctx context.Context, validateConfigOptions *ValidateConfigOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to the project configuration validation check.

          • project.config.validate

          Auditing

          Calling this method generates the following auditing event.

          • project.config.validate

          Request

          Instantiate the ValidateConfigOptions struct and set the fields to provide parameter values for the ValidateConfig method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          WithContext method only

          The ValidateConfig options.

          • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}/validate"
          • validateConfigOptions := projectService.NewValidateConfigOptions(
              projectIdLink,
              configIdLink,
            )
            
            projectConfigVersion, response, err := projectService.ValidateConfig(validateConfigOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(projectConfigVersion, "", "  ")
            fmt.Println(string(b))
          • const params = {
              projectId: projectIdLink,
              id: configIdLink,
            };
            
            let res;
            try {
              res = await projectService.validateConfig(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • response = project_service.validate_config(
              project_id=project_id_link,
              id=config_id_link,
            )
            project_config_version = response.get_result()
            
            print(json.dumps(project_config_version, indent=2))

          Response

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          Status Code

          • The server successfully accepted the request to process the resource.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          • The request cannot be processed because of a conflict between the request and the current client-controlled state in the system.

          Example responses
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }

          Deploy a configuration

          Deploy a project's configuration. This operation is asynchronous and can be tracked by using the get project configuration API with full metadata.

          Deploy a project's configuration. This operation is asynchronous and can be tracked by using the get project configuration API with full metadata.

          Deploy a project's configuration. This operation is asynchronous and can be tracked by using the get project configuration API with full metadata.

          Deploy a project's configuration. This operation is asynchronous and can be tracked by using the get project configuration API with full metadata.

          POST /v1/projects/{project_id}/configs/{id}/deploy
          deploy_config(
                  self,
                  project_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          deployConfig(params)
          (project *ProjectV1) DeployConfig(deployConfigOptions *DeployConfigOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)
          (project *ProjectV1) DeployConfigWithContext(ctx context.Context, deployConfigOptions *DeployConfigOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to deploying a project configuration.

          • project.config.deploy

          Auditing

          Calling this method generates the following auditing event.

          • project.config.deploy

          Request

          Instantiate the DeployConfigOptions struct and set the fields to provide parameter values for the DeployConfig method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          WithContext method only

          The DeployConfig options.

          • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}/deploy"
          • deployConfigOptions := projectService.NewDeployConfigOptions(
              projectIdLink,
              configIdLink,
            )
            
            projectConfigVersion, response, err := projectService.DeployConfig(deployConfigOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(projectConfigVersion, "", "  ")
            fmt.Println(string(b))
          • const params = {
              projectId: projectIdLink,
              id: configIdLink,
            };
            
            let res;
            try {
              res = await projectService.deployConfig(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • response = project_service.deploy_config(
              project_id=project_id_link,
              id=config_id_link,
            )
            project_config_version = response.get_result()
            
            print(json.dumps(project_config_version, indent=2))

          Response

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          Status Code

          • The server successfully accepted the request to process the resource.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          • The request cannot be processed because of a conflict between the request and the current client-controlled state in the system.

          Example responses
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }

          Undeploy configuration resources

          Undeploy a project's configuration resources. The operation undeploys all the resources that are deployed with the specific configuration. You can track it by using the get project configuration API with full metadata.

          Undeploy a project's configuration resources. The operation undeploys all the resources that are deployed with the specific configuration. You can track it by using the get project configuration API with full metadata.

          Undeploy a project's configuration resources. The operation undeploys all the resources that are deployed with the specific configuration. You can track it by using the get project configuration API with full metadata.

          Undeploy a project's configuration resources. The operation undeploys all the resources that are deployed with the specific configuration. You can track it by using the get project configuration API with full metadata.

          POST /v1/projects/{project_id}/configs/{id}/undeploy
          undeploy_config(
                  self,
                  project_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          undeployConfig(params)
          (project *ProjectV1) UndeployConfig(undeployConfigOptions *UndeployConfigOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)
          (project *ProjectV1) UndeployConfigWithContext(ctx context.Context, undeployConfigOptions *UndeployConfigOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to undeploying project configuration resources.

          • project.config.undeploy

          Auditing

          Calling this method generates the following auditing event.

          • project.config.undeploy

          Request

          Instantiate the UndeployConfigOptions struct and set the fields to provide parameter values for the UndeployConfig method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          WithContext method only

          The UndeployConfig options.

          • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}/undeploy"
          • undeployConfigOptions := projectService.NewUndeployConfigOptions(
              projectIdLink,
              configIdLink,
            )
            
            projectConfigVersion, response, err := projectService.UndeployConfig(undeployConfigOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(projectConfigVersion, "", "  ")
            fmt.Println(string(b))
          • const params = {
              projectId: projectIdLink,
              id: configIdLink,
            };
            
            let res;
            try {
              res = await projectService.undeployConfig(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • response = project_service.undeploy_config(
              project_id=project_id_link,
              id=config_id_link,
            )
            project_config_version = response.get_result()
            
            print(json.dumps(project_config_version, indent=2))

          Response

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          A specific version of a project configuration.

          Status Code

          • The server successfully accepted the request to process the resource.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          • The request cannot be processed because of a conflict between the request and the current client-controlled state in the system.

          Example responses
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }
          • The example response to a request for a deployable architecture configuration draft.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
              "definition": {
                "name": "env-stage",
                "description": "The stage environment configuration.",
                "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                "inputs": {
                  "account_id": "ref:/configs/account-stage/inputs/account_id",
                  "resource_group": "stage",
                  "access_tags": [
                    "env:stage"
                  ],
                  "logdna_name": "The name of the LogDNA stage service instance.",
                  "sysdig_name": "The name of the SysDig stage service instance."
                }
              },
              "is_draft": true,
              "version": 2,
              "outputs": [
                {
                  "name": "resource_group_id"
                },
                {
                  "name": "logdna_id"
                },
                {
                  "name": "sysdig_id"
                }
              ],
              "project": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "iaas-infra-prestage-env"
                },
                "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "schematics": {
                "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
              },
              "state": "validated",
              "update_available": true,
              "needs_attention_state": [],
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
              "deployment_mode": "project_deployed"
            }

          Sync a project configuration

          Sync a project configuration by analyzing the associated pipeline runs and Schematics workspace logs to get the configuration back to a working state.

          Sync a project configuration by analyzing the associated pipeline runs and Schematics workspace logs to get the configuration back to a working state.

          Sync a project configuration by analyzing the associated pipeline runs and Schematics workspace logs to get the configuration back to a working state.

          Sync a project configuration by analyzing the associated pipeline runs and Schematics workspace logs to get the configuration back to a working state.

          POST /v1/projects/{project_id}/configs/{id}/sync
          sync_config(
                  self,
                  project_id: str,
                  id: str,
                  *,
                  schematics: Optional['SchematicsWorkspace'] = None,
                  **kwargs,
              ) -> DetailedResponse
          syncConfig(params)
          (project *ProjectV1) SyncConfig(syncConfigOptions *SyncConfigOptions) (response *core.DetailedResponse, err error)
          (project *ProjectV1) SyncConfigWithContext(ctx context.Context, syncConfigOptions *SyncConfigOptions) (response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to sync'ing project configuration.

          • project.config.sync

          Auditing

          Calling this method generates the following auditing event.

          • project.config.update

          Request

          Instantiate the SyncConfigOptions struct and set the fields to provide parameter values for the SyncConfig method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          An optional Schematics workspace to be used by this configuration.

          Examples:
          {
            "schematics": {
              "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
            }
          }

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • A Schematics workspace to use for deploying this deployable architecture.

            If you are importing data from an existing Schematics workspace that is not backed by cart, then you must provide a locator_id. If you are using a Schematics workspace that is backed by cart, a locator_id is not required because the Schematics workspace has one. There are 3 scenarios:

            1. If only a locator_id is specified, a new Schematics workspace is instantiated with that locator_id.
            2. If only a schematics workspace_crn is specified, a 400 is returned if a locator_id is not found in the existing schematics workspace.
            3. If both a Schematics workspace_crn and a locator_id are specified, a 400code is returned if the specified locator_id does not agree with the locator_id in the existing Schematics workspace. For more information, see Creating workspaces and importing your Terraform template.

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • A Schematics workspace to use for deploying this deployable architecture.

            If you are importing data from an existing Schematics workspace that is not backed by cart, then you must provide a locator_id. If you are using a Schematics workspace that is backed by cart, a locator_id is not required because the Schematics workspace has one. There are 3 scenarios:

            1. If only a locator_id is specified, a new Schematics workspace is instantiated with that locator_id.
            2. If only a schematics workspace_crn is specified, a 400 is returned if a locator_id is not found in the existing schematics workspace.
            3. If both a Schematics workspace_crn and a locator_id are specified, a 400code is returned if the specified locator_id does not agree with the locator_id in the existing Schematics workspace. For more information, see Creating workspaces and importing your Terraform template.

          WithContext method only

          The SyncConfig options.

          • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Content-Type: application/json"   --data '{ "schematics": { "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139" } }'   "{base_url}/v1/projects/{project_id}/configs/{id}/sync"
          • schematicsWorkspaceModel := &projectv1.SchematicsWorkspace{
              WorkspaceCrn: core.StringPtr("crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"),
            }
            
            syncConfigOptions := projectService.NewSyncConfigOptions(
              projectIdLink,
              configIdLink,
            )
            syncConfigOptions.SetSchematics(schematicsWorkspaceModel)
            
            response, err := projectService.SyncConfig(syncConfigOptions)
            if err != nil {
              panic(err)
            }
            if response.StatusCode != 204 {
              fmt.Printf("\nUnexpected response status code received from SyncConfig(): %d\n", response.StatusCode)
            }
          • // Request models needed by this operation.
            
            // SchematicsWorkspace
            const schematicsWorkspaceModel = {
              workspace_crn: 'crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139',
            };
            
            const params = {
              projectId: projectIdLink,
              id: configIdLink,
              schematics: schematicsWorkspaceModel,
            };
            
            try {
              await projectService.syncConfig(params);
            } catch (err) {
              console.warn(err);
            }
          • schematics_workspace_model = {
              'workspace_crn': 'crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139',
            }
            
            response = project_service.sync_config(
              project_id=project_id_link,
              id=config_id_link,
              schematics=schematics_workspace_model,
            )

          Response

          Status Code

          • The request was successful but the response is empty.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          • The request cannot be processed because of a conflict between the request and the current client-controlled state in the system.

          No Sample Response

          This method does not specify any sample responses.

          List all deployed resources

          List resources that are deployed by a configuration.

          List resources that are deployed by a configuration.

          List resources that are deployed by a configuration.

          List resources that are deployed by a configuration.

          GET /v1/projects/{project_id}/configs/{id}/resources
          list_config_resources(
                  self,
                  project_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          listConfigResources(params)
          (project *ProjectV1) ListConfigResources(listConfigResourcesOptions *ListConfigResourcesOptions) (result *ProjectConfigResourceCollection, response *core.DetailedResponse, err error)
          (project *ProjectV1) ListConfigResourcesWithContext(ctx context.Context, listConfigResourcesOptions *ListConfigResourcesOptions) (result *ProjectConfigResourceCollection, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to the project get configuration resources.

          • project.config.retrieve-resources

          Auditing

          Calling this method generates the following auditing event.

          • project.config.read

          Request

          Instantiate the ListConfigResourcesOptions struct and set the fields to provide parameter values for the ListConfigResources method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          WithContext method only

          The ListConfigResources options.

          • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}/resources"
          • listConfigResourcesOptions := projectService.NewListConfigResourcesOptions(
              projectIdLink,
              configIdLink,
            )
            
            projectConfigResourceCollection, response, err := projectService.ListConfigResources(listConfigResourcesOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(projectConfigResourceCollection, "", "  ")
            fmt.Println(string(b))
          • const params = {
              projectId: projectIdLink,
              id: configIdLink,
            };
            
            let res;
            try {
              res = await projectService.listConfigResources(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • response = project_service.list_config_resources(
              project_id=project_id_link,
              id=config_id_link,
            )
            project_config_resource_collection = response.get_result()
            
            print(json.dumps(project_config_resource_collection, indent=2))

          Response

          The project configuration resource list.

          The project configuration resource list.

          The project configuration resource list.

          The project configuration resource list.

          Status Code

          • You successfully retrieved the deployed resources.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          Example responses
          • The example response to a request to get project configuration resources.

            {
              "resources": [
                {
                  "resource_crn": "crn:v1:staging:public:toolchain:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::",
                  "resource_name": "toolchain_instance",
                  "resource_type": "ibm_cd_toolchain",
                  "resource_tainted": false,
                  "resource_group_name": ""
                },
                {
                  "resource_crn": "crn:v1:staging:public:cloud-object-storage:global:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::",
                  "resource_name": "cos_bucket_instance",
                  "resource_type": "ibm_cos_bucket",
                  "resource_tainted": false,
                  "resource_group_name": ""
                }
              ],
              "resources_count": 2
            }
          • The example response to a request to get project configuration resources.

            {
              "resources": [
                {
                  "resource_crn": "crn:v1:staging:public:toolchain:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::",
                  "resource_name": "toolchain_instance",
                  "resource_type": "ibm_cd_toolchain",
                  "resource_tainted": false,
                  "resource_group_name": ""
                },
                {
                  "resource_crn": "crn:v1:staging:public:cloud-object-storage:global:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::",
                  "resource_name": "cos_bucket_instance",
                  "resource_type": "ibm_cos_bucket",
                  "resource_tainted": false,
                  "resource_group_name": ""
                }
              ],
              "resources_count": 2
            }

          Create a stack definition

          Experimental

          Defines inputs at the stack level that users need to configure along with input values at the member level. These values are included in the catalog entry when the deployable architecture stack is exported to a private catalog and are required for the deployable architecture stack to deploy. You can add a reference to a value, or add the value explicitly at the member level.

          Defines inputs at the stack level that users need to configure along with input values at the member level. These values are included in the catalog entry when the deployable architecture stack is exported to a private catalog and are required for the deployable architecture stack to deploy. You can add a reference to a value, or add the value explicitly at the member level.

          Defines inputs at the stack level that users need to configure along with input values at the member level. These values are included in the catalog entry when the deployable architecture stack is exported to a private catalog and are required for the deployable architecture stack to deploy. You can add a reference to a value, or add the value explicitly at the member level.

          Defines inputs at the stack level that users need to configure along with input values at the member level. These values are included in the catalog entry when the deployable architecture stack is exported to a private catalog and are required for the deployable architecture stack to deploy. You can add a reference to a value, or add the value explicitly at the member level.

          POST /v1/projects/{project_id}/configs/{id}/stack_definition
          create_stack_definition(
                  self,
                  project_id: str,
                  id: str,
                  stack_definition: 'StackDefinitionBlockPrototype',
                  **kwargs,
              ) -> DetailedResponse
          createStackDefinition(params)
          (project *ProjectV1) CreateStackDefinition(createStackDefinitionOptions *CreateStackDefinitionOptions) (result *StackDefinition, response *core.DetailedResponse, err error)
          (project *ProjectV1) CreateStackDefinitionWithContext(ctx context.Context, createStackDefinitionOptions *CreateStackDefinitionOptions) (result *StackDefinition, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to creating a stack definition.

          • project.config.create-stack-definition

          Auditing

          Calling this method generates the following auditing event.

          • project.config.create

          Request

          Instantiate the CreateStackDefinitionOptions struct and set the fields to provide parameter values for the CreateStackDefinition method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          The new stack definition document.

          Examples:

          Sample request to create a stack definition.

          {
            "stack_definition": {
              "inputs": [
                {
                  "name": "region",
                  "type": "string",
                  "required": true,
                  "default": "us-south",
                  "hidden": false
                },
                {
                  "name": "resource_group",
                  "type": "string",
                  "default": "Default"
                }
              ],
              "outputs": [
                {
                  "name": "vpc_cluster_id",
                  "value": "cluster_id"
                }
              ]
            }
          }

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The definition block for a stack definition.

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The definition block for a stack definition.

          WithContext method only

          The CreateStackDefinition options.

          • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "stack_definition": { "inputs": [ { "name": "region", "type": "string", "required": true, "default": "us-south", "hidden": false }, { "name": "resource_group", "type": "string", "default": "Default" } ], "outputs": [ { "name": "vpc_cluster_id", "value": "cluster_id" } ], "members": [ { "name": "foundation-deployable-architecture", "inputs": [ { "name": "region" }, { "name": "cluster_name" } ] }, { "name": "middleware-architecture", "inputs": [ { "name": "kube_version" } ] } ] } }'   "{base_url}/v1/projects/{project_id}/configs/{id}/stack_definition"
          • // Request models needed by this operation.
            
            // StackDefinitionInputVariable
            const stackDefinitionInputVariableModel = {
              name: 'region',
              type: 'string',
              default: 'us-south',
              required: true,
              hidden: false,
            };
            
            // StackDefinitionOutputVariable
            const stackDefinitionOutputVariableModel = {
              name: 'vpc_cluster_id',
              value: 'cluster_id',
            };
            
            // StackDefinitionBlockPrototype
            const stackDefinitionBlockPrototypeModel = {
              inputs: [stackDefinitionInputVariableModel],
              outputs: [stackDefinitionOutputVariableModel],
            };
            
            const params = {
              projectId: projectIdLink,
              id: configIdLink,
              stackDefinition: stackDefinitionBlockPrototypeModel,
            };
            
            let res;
            try {
              res = await projectService.createStackDefinition(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • stack_definition_input_variable_model = {
              'name': 'region',
              'type': 'string',
              'default': 'us-south',
              'required': True,
              'hidden': False,
            }
            
            stack_definition_output_variable_model = {
              'name': 'vpc_cluster_id',
              'value': 'cluster_id',
            }
            
            stack_definition_block_prototype_model = {
              'inputs': [stack_definition_input_variable_model],
              'outputs': [stack_definition_output_variable_model],
            }
            
            response = project_service.create_stack_definition(
              project_id=project_id_link,
              id=config_id_link,
              stack_definition=stack_definition_block_prototype_model,
            )
            stack_definition = response.get_result()
            
            print(json.dumps(stack_definition, indent=2))

          Response

          The stack definition.

          The stack definition.

          The stack definition.

          The stack definition.

          Status Code

          • The new resource was created.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          Example responses
          • Sample response from a create stack template operation.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca6678a",
              "stack_definition": {
                "inputs": [
                  {
                    "name": "region",
                    "type": "string",
                    "required": true,
                    "default": "us-south",
                    "hidden": false
                  },
                  {
                    "name": "resource_group",
                    "type": "string",
                    "default": "Default"
                  }
                ],
                "outputs": [
                  {
                    "name": "vpc_cluster_id",
                    "value": "cluster_id"
                  }
                ],
                "members": [
                  {
                    "name": "foundation-deployable-architecture",
                    "version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                    "inputs": [
                      {
                        "name": "region",
                        "value": "us-south"
                      },
                      {
                        "name": "cluster_name",
                        "value": "foundation-cluster"
                      }
                    ]
                  },
                  {
                    "name": "middleware-architecture",
                    "version_locator": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c.4d86732e-04b9-4dab-bfdc-5b514d86ecd8",
                    "inputs": [
                      {
                        "name": "kube_version",
                        "value": 1.29
                      }
                    ]
                  }
                ]
              },
              "state": "draft",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "configuration": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "stack-bottom-up-example"
                },
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/template"
            }
          • Sample response from a create stack template operation.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca6678a",
              "stack_definition": {
                "inputs": [
                  {
                    "name": "region",
                    "type": "string",
                    "required": true,
                    "default": "us-south",
                    "hidden": false
                  },
                  {
                    "name": "resource_group",
                    "type": "string",
                    "default": "Default"
                  }
                ],
                "outputs": [
                  {
                    "name": "vpc_cluster_id",
                    "value": "cluster_id"
                  }
                ],
                "members": [
                  {
                    "name": "foundation-deployable-architecture",
                    "version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                    "inputs": [
                      {
                        "name": "region",
                        "value": "us-south"
                      },
                      {
                        "name": "cluster_name",
                        "value": "foundation-cluster"
                      }
                    ]
                  },
                  {
                    "name": "middleware-architecture",
                    "version_locator": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c.4d86732e-04b9-4dab-bfdc-5b514d86ecd8",
                    "inputs": [
                      {
                        "name": "kube_version",
                        "value": 1.29
                      }
                    ]
                  }
                ]
              },
              "state": "draft",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "configuration": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "stack-bottom-up-example"
                },
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/template"
            }

          Get a stack definition

          Experimental

          Retrieve the stack definition that is associated to the configuration.

          Retrieve the stack definition that is associated to the configuration.

          Retrieve the stack definition that is associated to the configuration.

          Retrieve the stack definition that is associated to the configuration.

          GET /v1/projects/{project_id}/configs/{id}/stack_definition
          get_stack_definition(
                  self,
                  project_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          getStackDefinition(params)
          (project *ProjectV1) GetStackDefinition(getStackDefinitionOptions *GetStackDefinitionOptions) (result *StackDefinition, response *core.DetailedResponse, err error)
          (project *ProjectV1) GetStackDefinitionWithContext(ctx context.Context, getStackDefinitionOptions *GetStackDefinitionOptions) (result *StackDefinition, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to retrieving a stack definition.

          • project.config.retrieve-stack-definition

          Auditing

          Calling this method generates the following auditing event.

          • project.config.read

          Request

          Instantiate the GetStackDefinitionOptions struct and set the fields to provide parameter values for the GetStackDefinition method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          WithContext method only

          The GetStackDefinition options.

          • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}/stack_definition"
          • const params = {
              projectId: projectIdLink,
              id: configIdLink,
            };
            
            let res;
            try {
              res = await projectService.getStackDefinition(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • response = project_service.get_stack_definition(
              project_id=project_id_link,
              id=config_id_link,
            )
            stack_definition = response.get_result()
            
            print(json.dumps(stack_definition, indent=2))

          Response

          The stack definition.

          The stack definition.

          The stack definition.

          The stack definition.

          Status Code

          • The new resource was created.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          Example responses
          • Sample response from a create stack template operation.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca6678a",
              "stack_definition": {
                "inputs": [
                  {
                    "name": "region",
                    "type": "string",
                    "required": true,
                    "default": "us-south",
                    "hidden": false
                  },
                  {
                    "name": "resource_group",
                    "type": "string",
                    "default": "Default"
                  }
                ],
                "outputs": [
                  {
                    "name": "vpc_cluster_id",
                    "value": "cluster_id"
                  }
                ],
                "members": [
                  {
                    "name": "foundation-deployable-architecture",
                    "version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                    "inputs": [
                      {
                        "name": "region",
                        "value": "us-south"
                      },
                      {
                        "name": "cluster_name",
                        "value": "foundation-cluster"
                      }
                    ]
                  },
                  {
                    "name": "middleware-architecture",
                    "version_locator": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c.4d86732e-04b9-4dab-bfdc-5b514d86ecd8",
                    "inputs": [
                      {
                        "name": "kube_version",
                        "value": 1.29
                      }
                    ]
                  }
                ]
              },
              "state": "draft",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "configuration": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "stack-bottom-up-example"
                },
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/template"
            }
          • Sample response from a create stack template operation.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca6678a",
              "stack_definition": {
                "inputs": [
                  {
                    "name": "region",
                    "type": "string",
                    "required": true,
                    "default": "us-south",
                    "hidden": false
                  },
                  {
                    "name": "resource_group",
                    "type": "string",
                    "default": "Default"
                  }
                ],
                "outputs": [
                  {
                    "name": "vpc_cluster_id",
                    "value": "cluster_id"
                  }
                ],
                "members": [
                  {
                    "name": "foundation-deployable-architecture",
                    "version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                    "inputs": [
                      {
                        "name": "region",
                        "value": "us-south"
                      },
                      {
                        "name": "cluster_name",
                        "value": "foundation-cluster"
                      }
                    ]
                  },
                  {
                    "name": "middleware-architecture",
                    "version_locator": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c.4d86732e-04b9-4dab-bfdc-5b514d86ecd8",
                    "inputs": [
                      {
                        "name": "kube_version",
                        "value": 1.29
                      }
                    ]
                  }
                ]
              },
              "state": "draft",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "configuration": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "stack-bottom-up-example"
                },
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/template"
            }

          Update a stack definition

          Experimental

          Update the stack definition that is associated with the configuration.

          Update the stack definition that is associated with the configuration.

          Update the stack definition that is associated with the configuration.

          Update the stack definition that is associated with the configuration.

          PATCH /v1/projects/{project_id}/configs/{id}/stack_definition
          update_stack_definition(
                  self,
                  project_id: str,
                  id: str,
                  stack_definition: 'StackDefinitionBlockPrototype',
                  **kwargs,
              ) -> DetailedResponse
          updateStackDefinition(params)
          (project *ProjectV1) UpdateStackDefinition(updateStackDefinitionOptions *UpdateStackDefinitionOptions) (result *StackDefinition, response *core.DetailedResponse, err error)
          (project *ProjectV1) UpdateStackDefinitionWithContext(ctx context.Context, updateStackDefinitionOptions *UpdateStackDefinitionOptions) (result *StackDefinition, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies only to updating a stack definition.

          • project.config.update-stack-definition

          Auditing

          Calling this method generates the following auditing event.

          • project.config.update

          Request

          Instantiate the UpdateStackDefinitionOptions struct and set the fields to provide parameter values for the UpdateStackDefinition method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          The change delta of the stack definition to update.

          Examples:

          Sample request to patch a stack template.

          {
            "stack_definition": {
              "inputs": [
                {
                  "name": "region",
                  "type": "string",
                  "required": true,
                  "default": "eu-gb",
                  "hidden": false
                }
              ]
            }
          }

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The definition block for a stack definition.

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The definition block for a stack definition.

          WithContext method only

          The UpdateStackDefinition options.

          • curl -X PATCH --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "stack_definition": { "inputs": [ { "name": "region", "type": "string", "required": true, "default": "eu-gb", "hidden": false } ], "members": [ { "name": "foundation-deployable-architecture", "inputs": [ { "name": "cluster_name" } ] } ] } }'   "{base_url}/v1/projects/{project_id}/configs/{id}/stack_definition"
          • // Request models needed by this operation.
            
            // StackDefinitionInputVariable
            const stackDefinitionInputVariableModel = {
              name: 'region',
              type: 'string',
              default: 'eu-gb',
              required: true,
              hidden: false,
            };
            
            // StackDefinitionBlockPrototype
            const stackDefinitionBlockPrototypeModel = {
              inputs: [stackDefinitionInputVariableModel],
            };
            
            const params = {
              projectId: projectIdLink,
              id: configIdLink,
              stackDefinition: stackDefinitionBlockPrototypeModel,
            };
            
            let res;
            try {
              res = await projectService.updateStackDefinition(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • stack_definition_input_variable_model = {
              'name': 'region',
              'type': 'string',
              'default': 'eu-gb',
              'required': True,
              'hidden': False,
            }
            
            stack_definition_block_prototype_model = {
              'inputs': [stack_definition_input_variable_model],
            }
            
            response = project_service.update_stack_definition(
              project_id=project_id_link,
              id=config_id_link,
              stack_definition=stack_definition_block_prototype_model,
            )
            stack_definition = response.get_result()
            
            print(json.dumps(stack_definition, indent=2))

          Response

          The stack definition.

          The stack definition.

          The stack definition.

          The stack definition.

          Status Code

          • The request was successful.

          • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

          • The credentials are invalid or authentication is required to succeed.

          • The supplied authentication is not authorized to view this resource.

          Example responses
          • Sample response from a patch stack template operation.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca6678a",
              "stack_definition": {
                "inputs": [
                  {
                    "name": "region",
                    "type": "string",
                    "required": true,
                    "default": "eu-gb",
                    "hidden": false
                  }
                ],
                "outputs": [
                  {
                    "name": "vpc_cluster_id",
                    "value": "cluster_id"
                  }
                ],
                "members": [
                  {
                    "name": "foundation-deployable-architecture",
                    "version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                    "inputs": [
                      {
                        "name": "cluster_name",
                        "value": "foundation-cluster"
                      }
                    ]
                  }
                ]
              },
              "state": "draft",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "configuration": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "stack-bottom-up-example"
                },
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/template"
            }
          • Sample response from a patch stack template operation.

            {
              "id": "293c3c36-a094-4115-a12b-de0a9ca6678a",
              "stack_definition": {
                "inputs": [
                  {
                    "name": "region",
                    "type": "string",
                    "required": true,
                    "default": "eu-gb",
                    "hidden": false
                  }
                ],
                "outputs": [
                  {
                    "name": "vpc_cluster_id",
                    "value": "cluster_id"
                  }
                ],
                "members": [
                  {
                    "name": "foundation-deployable-architecture",
                    "version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                    "inputs": [
                      {
                        "name": "cluster_name",
                        "value": "foundation-cluster"
                      }
                    ]
                  }
                ]
              },
              "state": "draft",
              "created_at": "2023-02-22T19:51:23.253Z",
              "modified_at": "2023-02-22T19:51:23.253Z",
              "configuration": {
                "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                "definition": {
                  "name": "stack-bottom-up-example"
                },
                "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
              },
              "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/template"
            }

          Export a deployable architecture stack to the private catalog

          Experimental

          Exports the deployable architecture stack to a private catalog. All member deployable architectures within the stack must be validated and deployed before the stack is exported. The stack definition must also exist before the stack is exported. You can export the stack as a new product, or as a new version of an existing product.

          Exports the deployable architecture stack to a private catalog. All member deployable architectures within the stack must be validated and deployed before the stack is exported. The stack definition must also exist before the stack is exported. You can export the stack as a new product, or as a new version of an existing product.

          Exports the deployable architecture stack to a private catalog. All member deployable architectures within the stack must be validated and deployed before the stack is exported. The stack definition must also exist before the stack is exported. You can export the stack as a new product, or as a new version of an existing product.

          Exports the deployable architecture stack to a private catalog. All member deployable architectures within the stack must be validated and deployed before the stack is exported. The stack definition must also exist before the stack is exported. You can export the stack as a new product, or as a new version of an existing product.

          POST /v1/projects/{project_id}/configs/{id}/stack_definition/export
          export_stack_definition(
                  self,
                  project_id: str,
                  id: str,
                  settings: 'StackDefinitionExportRequest',
                  **kwargs,
              ) -> DetailedResponse
          exportStackDefinition(params)
          (project *ProjectV1) ExportStackDefinition(exportStackDefinitionOptions *ExportStackDefinitionOptions) (result *StackDefinitionExportResponse, response *core.DetailedResponse, err error)
          (project *ProjectV1) ExportStackDefinitionWithContext(ctx context.Context, exportStackDefinitionOptions *ExportStackDefinitionOptions) (result *StackDefinitionExportResponse, response *core.DetailedResponse, err error)

          Authentication

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          This action applies to exporting a configuration stack definition to the private catalog.

          • project.config.export-stack-definition

          Auditing

          Calling this method generates the following auditing event.

          • project.config.export-stack-definition

          Request

          Instantiate the ExportStackDefinitionOptions struct and set the fields to provide parameter values for the ExportStackDefinition method.

          Path Parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

          The payload for the private catalog export request.

          Example:

          Sample request to export a stack definition to a new product

          {
            "catalog_id": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c",
            "label": "Stack Deployable Architecture"
          }

          parameters

          • The unique project ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The unique configuration ID.

            Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

          • The payload for the stack definition export request to create a product.

            parameters

            • The unique project ID.

              Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

            • The unique configuration ID.

              Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

            • The payload for the stack definition export request to create a product.

              WithContext method only

              The ExportStackDefinition options.

              • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "catalog_id": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c", "label": "Stack Deployable Architecture" }'   "{base_url}/v1/projects/{project_id}/configs/{id}/stack_definition/export"
              • // Request models needed by this operation.
                
                // StackDefinitionExportRequestStackDefinitionExportCatalogRequest
                const stackDefinitionExportRequestModel = {
                  catalog_id: '01e1a9ad-534b-4ab9-996a-b8f2a8653d5c',
                  label: 'Stack Deployable Architecture',
                };
                
                const params = {
                  projectId: projectIdLink,
                  id: configIdLink,
                  settings: stackDefinitionExportRequestModel,
                };
                
                let res;
                try {
                  res = await projectService.exportStackDefinition(params);
                  console.log(JSON.stringify(res.result, null, 2));
                } catch (err) {
                  console.warn(err);
                }
              • stack_definition_export_request_model = {
                  'catalog_id': '01e1a9ad-534b-4ab9-996a-b8f2a8653d5c',
                  'label': 'Stack Deployable Architecture',
                }
                
                response = project_service.export_stack_definition(
                  project_id=project_id_link,
                  id=config_id_link,
                  settings=stack_definition_export_request_model,
                )
                stack_definition_export_response = response.get_result()
                
                print(json.dumps(stack_definition_export_response, indent=2))

              Response

              The response to a successful template publish.

              The payload for the stack definition export response.

              The payload for the stack definition export response.

              The payload for the stack definition export response.

              Status Code

              • The request was successful.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The supplied authentication is not authorized to view this resource.

              Example responses
              • Sample response from exporting a stack definition to the private catalog

                {
                  "catalog_id": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c",
                  "product_id": "b60b5876-d074-478a-ac73-f979898c527b",
                  "version_locator": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c.f9f73bdb-5c7d-4ea6-82ef-9debc6340df8",
                  "kind": "terraform",
                  "format": "stack"
                }
              • Sample response from exporting a stack definition to the private catalog

                {
                  "catalog_id": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c",
                  "product_id": "b60b5876-d074-478a-ac73-f979898c527b",
                  "version_locator": "01e1a9ad-534b-4ab9-996a-b8f2a8653d5c.f9f73bdb-5c7d-4ea6-82ef-9debc6340df8",
                  "kind": "terraform",
                  "format": "stack"
                }

              Get a list of project configuration versions

              Retrieve a list of previous and current versions of a project configuration in a specific project.

              Retrieve a list of previous and current versions of a project configuration in a specific project.

              Retrieve a list of previous and current versions of a project configuration in a specific project.

              Retrieve a list of previous and current versions of a project configuration in a specific project.

              GET /v1/projects/{project_id}/configs/{id}/versions
              list_config_versions(
                      self,
                      project_id: str,
                      id: str,
                      **kwargs,
                  ) -> DetailedResponse
              listConfigVersions(params)
              (project *ProjectV1) ListConfigVersions(listConfigVersionsOptions *ListConfigVersionsOptions) (result *ProjectConfigVersionSummaryCollection, response *core.DetailedResponse, err error)
              (project *ProjectV1) ListConfigVersionsWithContext(ctx context.Context, listConfigVersionsOptions *ListConfigVersionsOptions) (result *ProjectConfigVersionSummaryCollection, response *core.DetailedResponse, err error)

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to the get project configuration drafts action.

              • project.config.retrieve-all-version

              Auditing

              Calling this method generates the following auditing event.

              • project.config.list

              Request

              Instantiate the ListConfigVersionsOptions struct and set the fields to provide parameter values for the ListConfigVersions method.

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              WithContext method only

              The ListConfigVersions options.

              • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}/versions"
              • listConfigVersionsOptions := projectService.NewListConfigVersionsOptions(
                  projectIdLink,
                  configIdLink,
                )
                
                projectConfigVersionSummaryCollection, response, err := projectService.ListConfigVersions(listConfigVersionsOptions)
                if err != nil {
                  panic(err)
                }
                b, _ := json.MarshalIndent(projectConfigVersionSummaryCollection, "", "  ")
                fmt.Println(string(b))
              • const params = {
                  projectId: projectIdLink,
                  id: configIdLink,
                };
                
                let res;
                try {
                  res = await projectService.listConfigVersions(params);
                  console.log(JSON.stringify(res.result, null, 2));
                } catch (err) {
                  console.warn(err);
                }
              • response = project_service.list_config_versions(
                  project_id=project_id_link,
                  id=config_id_link,
                )
                project_config_version_summary_collection = response.get_result()
                
                print(json.dumps(project_config_version_summary_collection, indent=2))

              Response

              The project configuration version list.

              The project configuration version list.

              The project configuration version list.

              The project configuration version list.

              Status Code

              • You successfully retrieved the configuration versions.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The supplied authentication is not authorized to view this resource.

              Example responses
              • The example response to a request to list project configuration drafts.

                {
                  "versions": [
                    {
                      "definition": {
                        "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
                      },
                      "version": 1,
                      "state": "approved",
                      "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/293c3c36-a094-4115-a12b-de0a9ca39be5/versions/1"
                    },
                    {
                      "definition": {
                        "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
                      },
                      "version": 2,
                      "state": "validated",
                      "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/293c3c36-a094-4115-a12b-de0a9ca39be5/versions/2"
                    }
                  ]
                }
              • The example response to a request to list project configuration drafts.

                {
                  "versions": [
                    {
                      "definition": {
                        "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
                      },
                      "version": 1,
                      "state": "approved",
                      "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/293c3c36-a094-4115-a12b-de0a9ca39be5/versions/1"
                    },
                    {
                      "definition": {
                        "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global"
                      },
                      "version": 2,
                      "state": "validated",
                      "href": "https://projects.api.cloud.ibm.com/v1/projects/db268db0-160b-4911-8f93-89659000a927/configs/293c3c36-a094-4115-a12b-de0a9ca39be5/versions/2"
                    }
                  ]
                }

              Get a specific project configuration version

              Retrieve a specific version of a configuration in a project.

              Retrieve a specific version of a configuration in a project.

              Retrieve a specific version of a configuration in a project.

              Retrieve a specific version of a configuration in a project.

              GET /v1/projects/{project_id}/configs/{id}/versions/{version}
              get_config_version(
                      self,
                      project_id: str,
                      id: str,
                      version: int,
                      **kwargs,
                  ) -> DetailedResponse
              getConfigVersion(params)
              (project *ProjectV1) GetConfigVersion(getConfigVersionOptions *GetConfigVersionOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)
              (project *ProjectV1) GetConfigVersionWithContext(ctx context.Context, getConfigVersionOptions *GetConfigVersionOptions) (result *ProjectConfigVersion, response *core.DetailedResponse, err error)

              Authentication

              This method uses the following security schemes for authentication.

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to getting a project configuration version.

              • project.config.retrieve-version

              Auditing

              Calling this method generates the following auditing event.

              • project.config.read

              Request

              Instantiate the GetConfigVersionOptions struct and set the fields to provide parameter values for the GetConfigVersion method.

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The configuration version.

              parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The configuration version.

              parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The configuration version.

              WithContext method only

              The GetConfigVersion options.

              • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}/versions/{version}"
              • getConfigVersionOptions := projectService.NewGetConfigVersionOptions(
                  projectIdLink,
                  configIdLink,
                  int64(38),
                )
                
                projectConfigVersion, response, err := projectService.GetConfigVersion(getConfigVersionOptions)
                if err != nil {
                  panic(err)
                }
                b, _ := json.MarshalIndent(projectConfigVersion, "", "  ")
                fmt.Println(string(b))
              • const params = {
                  projectId: projectIdLink,
                  id: configIdLink,
                  version: 38,
                };
                
                let res;
                try {
                  res = await projectService.getConfigVersion(params);
                  console.log(JSON.stringify(res.result, null, 2));
                } catch (err) {
                  console.warn(err);
                }
              • response = project_service.get_config_version(
                  project_id=project_id_link,
                  id=config_id_link,
                  version=38,
                )
                project_config_version = response.get_result()
                
                print(json.dumps(project_config_version, indent=2))

              Response

              A specific version of a project configuration.

              A specific version of a project configuration.

              A specific version of a project configuration.

              A specific version of a project configuration.

              Status Code

              • You successfully retrieved the version.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The supplied authentication is not authorized to view this resource.

              Example responses
              • The example response to a request for a deployable architecture configuration draft.

                {
                  "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
                  "definition": {
                    "name": "env-stage",
                    "description": "The stage environment configuration.",
                    "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                    "inputs": {
                      "account_id": "ref:/configs/account-stage/inputs/account_id",
                      "resource_group": "stage",
                      "access_tags": [
                        "env:stage"
                      ],
                      "logdna_name": "The name of the LogDNA stage service instance.",
                      "sysdig_name": "The name of the SysDig stage service instance."
                    }
                  },
                  "is_draft": true,
                  "version": 2,
                  "outputs": [
                    {
                      "name": "resource_group_id"
                    },
                    {
                      "name": "logdna_id"
                    },
                    {
                      "name": "sysdig_id"
                    }
                  ],
                  "project": {
                    "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                    "definition": {
                      "name": "iaas-infra-prestage-env"
                    },
                    "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                    "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
                  },
                  "schematics": {
                    "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
                  },
                  "state": "validated",
                  "update_available": true,
                  "needs_attention_state": [],
                  "created_at": "2023-02-22T19:51:23.253Z",
                  "modified_at": "2023-02-22T19:51:23.253Z",
                  "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
                  "deployment_mode": "project_deployed"
                }
              • The example response to a request for a deployable architecture configuration draft.

                {
                  "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
                  "definition": {
                    "name": "env-stage",
                    "description": "The stage environment configuration.",
                    "locator_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.018edf04-e772-4ca2-9785-03e8e03bef72-global",
                    "inputs": {
                      "account_id": "ref:/configs/account-stage/inputs/account_id",
                      "resource_group": "stage",
                      "access_tags": [
                        "env:stage"
                      ],
                      "logdna_name": "The name of the LogDNA stage service instance.",
                      "sysdig_name": "The name of the SysDig stage service instance."
                    }
                  },
                  "is_draft": true,
                  "version": 2,
                  "outputs": [
                    {
                      "name": "resource_group_id"
                    },
                    {
                      "name": "logdna_id"
                    },
                    {
                      "name": "sysdig_id"
                    }
                  ],
                  "project": {
                    "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                    "definition": {
                      "name": "iaas-infra-prestage-env"
                    },
                    "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                    "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
                  },
                  "schematics": {
                    "workspace_crn": "crn:v1:staging:public:schematics:us-south:a/38acaf4469814090a4e675dc0c317a0d:95ad49de-ab96-4e7d-a08c-45c38aa448e6:workspace:us-south.workspace.service.e0106139"
                  },
                  "state": "validated",
                  "update_available": true,
                  "needs_attention_state": [],
                  "created_at": "2023-02-22T19:51:23.253Z",
                  "modified_at": "2023-02-22T19:51:23.253Z",
                  "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/b0c44146-1ef6-40c2-82ba-74d51149770a",
                  "deployment_mode": "project_deployed"
                }
              • The example response to a request for a resource configuration draft.

                {
                  "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
                  "definition": {
                    "name": "shared-resources-dev",
                    "description": "The shared resources for dev environments.",
                    "labels": [
                      "dev"
                    ],
                    "type": "manual",
                    "resource_crns": [
                      "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
                    ]
                  },
                  "project": {
                    "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                    "definition": {
                      "name": "iaas-infra-prestage-env"
                    },
                    "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                    "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
                  },
                  "is_draft": false,
                  "version": 2,
                  "state": "applied",
                  "needs_attention_state": [],
                  "outputs": [],
                  "created_at": "2023-02-22T19:51:23.253Z",
                  "updated_at": "2023-02-22T19:51:23.253Z",
                  "modified_at": "2023-02-22T19:51:23.253Z",
                  "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
                  "deployment_mode": "user_deployed"
                }
              • The example response to a request for a resource configuration draft.

                {
                  "id": "293c3c36-a094-4115-a12b-de0a9ca39be5",
                  "definition": {
                    "name": "shared-resources-dev",
                    "description": "The shared resources for dev environments.",
                    "labels": [
                      "dev"
                    ],
                    "type": "manual",
                    "resource_crns": [
                      "crn:v1:staging:public:toolchain:us-south:a/d11256044e024d5bbea1a7d7ee4575c3:618c70c7-0ead-40fb-86ce-e3f7b10c9f99::"
                    ]
                  },
                  "project": {
                    "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                    "definition": {
                      "name": "iaas-infra-prestage-env"
                    },
                    "crn": "crn:v1:staging:public:project:us-south:a/06580c923e40314421d3b6cb40c01c68:cfbf9050-ab8e-ac97-b01b-ab5af830be8a::",
                    "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a"
                  },
                  "is_draft": false,
                  "version": 2,
                  "state": "applied",
                  "needs_attention_state": [],
                  "outputs": [],
                  "created_at": "2023-02-22T19:51:23.253Z",
                  "updated_at": "2023-02-22T19:51:23.253Z",
                  "modified_at": "2023-02-22T19:51:23.253Z",
                  "href": "https://projects.api.cloud.ibm.com/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a/configs/293c3c36-a094-4115-a12b-de0a9ca39be5",
                  "deployment_mode": "user_deployed"
                }

              Delete a project configuration version

              Delete a configuration version by specifying the project ID.

              Delete a configuration version by specifying the project ID.

              Delete a configuration version by specifying the project ID.

              Delete a configuration version by specifying the project ID.

              DELETE /v1/projects/{project_id}/configs/{id}/versions/{version}
              delete_config_version(
                      self,
                      project_id: str,
                      id: str,
                      version: int,
                      **kwargs,
                  ) -> DetailedResponse
              deleteConfigVersion(params)
              (project *ProjectV1) DeleteConfigVersion(deleteConfigVersionOptions *DeleteConfigVersionOptions) (result *ProjectConfigDelete, response *core.DetailedResponse, err error)
              (project *ProjectV1) DeleteConfigVersionWithContext(ctx context.Context, deleteConfigVersionOptions *DeleteConfigVersionOptions) (result *ProjectConfigDelete, response *core.DetailedResponse, err error)

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to the configuration delete.

              • project.config.delete-version

              Auditing

              Calling this method generates the following auditing event.

              • project.config.delete

              Request

              Instantiate the DeleteConfigVersionOptions struct and set the fields to provide parameter values for the DeleteConfigVersion method.

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The configuration version.

              parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The configuration version.

              parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression /^[\\.\\-0-9a-zA-Z]+$/

              • The configuration version.

              WithContext method only

              The DeleteConfigVersion options.

              • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/v1/projects/{project_id}/configs/{id}/versions/{version}"
              • deleteConfigVersionOptions := projectService.NewDeleteConfigVersionOptions(
                  projectIdLink,
                  configIdLink,
                  int64(38),
                )
                
                projectConfigDelete, response, err := projectService.DeleteConfigVersion(deleteConfigVersionOptions)
                if err != nil {
                  panic(err)
                }
                b, _ := json.MarshalIndent(projectConfigDelete, "", "  ")
                fmt.Println(string(b))
              • const params = {
                  projectId: projectIdLink,
                  id: configIdLink,
                  version: 38,
                };
                
                let res;
                try {
                  res = await projectService.deleteConfigVersion(params);
                  console.log(JSON.stringify(res.result, null, 2));
                } catch (err) {
                  console.warn(err);
                }
              • response = project_service.delete_config_version(
                  project_id=project_id_link,
                  id=config_id_link,
                  version=38,
                )
                project_config_delete = response.get_result()
                
                print(json.dumps(project_config_delete, indent=2))

              Response

              The ID of the deleted configuration.

              The ID of the deleted configuration.

              The ID of the deleted configuration.

              The ID of the deleted configuration.

              Status Code

              • You successfully deleted the configuration version.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The supplied authentication is not authorized to view this resource.

              Example responses
              • The example response to a request to delete a configuration.

                {
                  "id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
                }
              • The example response to a request to delete a configuration.

                {
                  "id": "293c3c36-a094-4115-a12b-de0a9ca39be5"
                }

              Get the latest validation details

              Retrieve the most recent validation details, which include job summary and logs.

              GET /v1/projects/{project_id}/configs/{id}/versions/{version}/last_validated

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to getting last validation details.

              • project.config.retrieve-version-last-validated

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The configuration version.

              Response

              The log from the last action job that is performed on the project configuration.

              Status Code

              • You successfully retrieved the details.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • The sample response for retrieving the job log of a project action.

                {
                  "cost_estimate": {},
                  "cra_logs": {},
                  "job": {
                    "id": "345b03e7440fce352ffc652050c34dbf",
                    "log": "2023/06/08 04:38:29  --- Ready to execute the command ---",
                    "summary": {
                      "version": "1.0.5",
                      "plan_summary": {},
                      "apply_summary": {},
                      "destroy_summary": {},
                      "message_summary": {},
                      "plan_messages": {},
                      "apply_messages": {},
                      "destroy_messages": {}
                    }
                  },
                  "result": "passed"
                }

              Get the latest deployment details

              Retrieve the latest deployment details, which include job summary and logs.

              GET /v1/projects/{project_id}/configs/{id}/versions/{version}/last_deployed

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to getting the last deploy action details.

              • project.config.retrieve-version-last-deployed

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The configuration version.

              Response

              The log from the last action job that is performed on the project configuration.

              Status Code

              • You successfully retrieved the deployment details.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • The sample response for retrieving the job log of a project action.

                {
                  "job": {
                    "id": "345b03e7440fce352ffc652050c34dbf",
                    "log": "2023/06/08 04:38:29  --- Ready to execute the command ---",
                    "summary": {
                      "version": "1.0.5",
                      "plan_summary": {},
                      "apply_summary": {},
                      "destroy_summary": {},
                      "message_summary": {},
                      "plan_messages": {},
                      "apply_messages": {},
                      "destroy_messages": {}
                    }
                  },
                  "result": "passed"
                }

              Get the latest undeployment action details

              Retrieve the latest undeployment action details, including job summary and logs.

              GET /v1/projects/{project_id}/configs/{id}/versions/{version}/last_undeployed

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to getting the last undeploy action details.

              • project.config.retrieve-version-last-undeployed

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The configuration version.

              Response

              The log from the last action job that is performed on the project configuration.

              Status Code

              • You successfully retrieved the undeployment action details.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • The sample response for retrieving the job log of a project action.

                {
                  "job": {
                    "id": "345b03e7440fce352ffc652050c34dbf",
                    "log": "2023/06/08 04:38:29  --- Ready to execute the command ---",
                    "summary": {
                      "version": "1.0.5",
                      "plan_summary": {},
                      "apply_summary": {},
                      "destroy_summary": {},
                      "message_summary": {},
                      "plan_messages": {},
                      "apply_messages": {},
                      "destroy_messages": {}
                    }
                  },
                  "result": "passed"
                }

              Get the latest monitoring action details

              Retrieve the latest monitoring action details, including job summary and logs.

              GET /v1/projects/{project_id}/configs/{id}/versions/{version}/last_monitoring

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to getting the last monitoring action details.

              • project.config.retrieve-version-last-validated

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The configuration version.

              Response

              The log from the last monitoring action job that is performed on the project configuration.

              Status Code

              • You successfully retrieved the monitoring action details.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • The sample response for retrieving the job log of a monitoring action.

                {
                  "drift_detection": {
                    "job": {
                      "id": "345b03e7440fce352ffc652050c34dbf",
                      "log": "2023/06/08 04:38:29  --- Ready to execute the command ---",
                      "summary": {
                        "version": "1.0.5",
                        "plan_summary": {},
                        "apply_summary": {},
                        "destroy_summary": {},
                        "message_summary": {},
                        "plan_messages": {},
                        "apply_messages": {},
                        "destroy_messages": {}
                      }
                    }
                  },
                  "result": "passed"
                }

              View the latest Schematics job

              Retrieve the latest Schematics job that corresponds to a plan, deploy, or undeploy configuration resource action.

              GET /v1/projects/{project_id}/configs/{id}/job/{action}

              Authentication

              This method uses the following security schemes for authentication.

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to the project get configuration action.

              • project.config.retrieve-job

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The triggered action.

                Allowable values: [plan,install,uninstall,validate,deploy,undeploy]

              Query Parameters

              • The timestamp of when the action was triggered.

              Response

              The response of a request to fetch an action job.

              Status Code

              • You successfully retrieved the job.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request was not completed by the server. It could be due to an internal error or in some cases, invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • The sample response for retrieving the job of a project action.

                {
                  "id": "345b03e7440fce352ffc652050c34dbf"
                }

              Get the latest cost estimate from Schematics

              Retrieve the most recent cost estimate from the Schematics cart order that is associated to a project configuration.

              GET /v1/projects/{project_id}/configs/{id}/cost_estimate

              Authentication

              This method uses the following security schemes for authentication.

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to the project get configuration cost estimate.

              • project.config.retrieve-cost

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Response

              The cost estimate for the specified configuration.

              Status Code

              • You successfully retrieved the cost estimate.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or an unexpected error.

              Example responses
              • {
                  "version": "0.2",
                  "currency": "USD",
                  "projects": [
                    {
                      "name": "tfplan.json",
                      "metadata": {
                        "path": "tfplan.json",
                        "infracostCommand": "breakdown",
                        "type": "terraform_plan_json",
                        "branch": "",
                        "commit": "",
                        "commitAuthorName": "",
                        "commitAuthorEmail": "",
                        "commitTimestamp": "1901-01-01T00:00:00.000Z",
                        "commitMessage": ""
                      },
                      "pastBreakdown": {
                        "resources": [],
                        "totalHourlyCost": "0",
                        "totalMonthlyCost": "0"
                      },
                      "breakdown": {
                        "resources": [],
                        "totalHourlyCost": "0",
                        "totalMonthlyCost": "0"
                      },
                      "diff": {
                        "resources": [],
                        "totalHourlyCost": "0",
                        "totalMonthlyCost": "0"
                      },
                      "summary": {
                        "totalDetectedResources": 16,
                        "totalSupportedResources": 0,
                        "totalUnsupportedResources": 15,
                        "totalUsageBasedResources": 0,
                        "totalNoPriceResources": 1,
                        "unsupportedResourceCounts": {
                          "ibm_cd_tekton_pipeline": 1,
                          "ibm_cd_tekton_pipeline_definition": 1,
                          "ibm_cd_tekton_pipeline_property": 6,
                          "ibm_cd_tekton_pipeline_trigger": 1,
                          "ibm_cd_toolchain": 1,
                          "ibm_cd_toolchain_tool_githubintegrated": 1,
                          "ibm_cd_toolchain_tool_hostedgit": 1,
                          "ibm_cd_toolchain_tool_pipeline": 1,
                          "ibm_cos_bucket": 1,
                          "ibm_resource_instance": 1
                        },
                        "noPriceResourceCounts": {
                          "ibm_iam_access_group_policy": 1
                        }
                      }
                    }
                  ],
                  "totalHourlyCost": "0",
                  "totalMonthlyCost": "0",
                  "pastTotalHourlyCost": "0",
                  "pastTotalMonthlyCost": "0",
                  "diffTotalHourlyCost": "0",
                  "diffTotalMonthlyCost": "0",
                  "timeGenerated": "2022-08-12T15:43:53.277Z",
                  "summary": {
                    "totalDetectedResources": 16,
                    "totalSupportedResources": 0,
                    "totalUnsupportedResources": 15,
                    "totalUsageBasedResources": 0,
                    "totalNoPriceResources": 1,
                    "unsupportedResourceCounts": {
                      "ibm_cd_tekton_pipeline": 1,
                      "ibm_cd_tekton_pipeline_definition": 1,
                      "ibm_cd_tekton_pipeline_property": 6,
                      "ibm_cd_tekton_pipeline_trigger": 1,
                      "ibm_cd_toolchain": 1,
                      "ibm_cd_toolchain_tool_githubintegrated": 1,
                      "ibm_cd_toolchain_tool_hostedgit": 1,
                      "ibm_cd_toolchain_tool_pipeline": 1,
                      "ibm_cos_bucket": 1,
                      "ibm_resource_instance": 1
                    },
                    "noPriceResourceCounts": {
                      "ibm_iam_access_group_policy": 1
                    }
                  }
                }

              Retrieve Schematics Workspace State File

              Retrieves the Schematics workspace state file.

              GET /v1/projects/{project_id}/configs/{id}/retrieve_schematics_statefile

              Authentication

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Response

              The Schematics Terraform State File.

              Status Code

              • You successfully retrieve the workspace state file.

              • The credentials are invalid or authentication is required to succeed.

              • The requested resource could not be found.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or an unexpected error.

              Example responses
              • An example response of a Schematics Terraform State File

                {
                  "version": 4,
                  "terraform_version": "1.2.6",
                  "serial": 2,
                  "lineage": "e57cace8-5713-2039-d438-33ba6b8ac4e4",
                  "outputs": {
                    "boolean_output": {
                      "value": true,
                      "type": "bool"
                    }
                  },
                  "resources": []
                }

              Execute Schematics Workspace State Commands

              Executes the Schematics workspace state commands.

              POST /v1/projects/{project_id}/configs/{id}/execute_schematics_commands

              Authentication

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              A batch of one or more references.

              Examples:

              An example request payload for executing Schematics Commands.

              {
                "commands": [
                  {
                    "command": "taint",
                    "command_params": "null_resource.sleep",
                    "command_name": "Test1",
                    "command_desc": "Making taint",
                    "command_onerror": "continue"
                  }
                ]
              }

              Response

              The Schematics Terraform Result.

              Status Code

              • You successfully updated the workspace metadata.

              • The request body is either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The requested resource could not be found.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or an unexpected error.

              Example responses
              • An example request payload for executing Schematics Commands.

                {
                  "activityid": "5958288bbfce4fde8491cdb20568f3e9"
                }

              Create a project CRN token

              Refresh a project CRN token by creating a new one.

              POST /v1/projects/{id}/token

              Authentication

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Response

              The project CRN token

              Status Code

              • You successfully created a project CRN token.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              Example responses
              • A project or project configuration CRN token

                {
                  "access_token": "ACCESS_TOKEN",
                  "expiration": 1616750582
                }

              Create a project configuration CRN token

              Refresh a project configuration CRN token by creating a new one.

              POST /v1/projects/{project_id}/configs/{id}/token

              Authentication

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Response

              The project configuration CRN token

              Status Code

              • You successfully created a project configuration CRN token.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              Example responses
              • A project or project configuration CRN token

                {
                  "access_token": "ACCESS_TOKEN",
                  "expiration": 1616750582
                }

              Add notifications

              Create a notification event to be stored in the project definition.

              POST /v1/projects/{id}/event

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to creating a project.

              • project.notifications.create

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              A valid notification event that follows the Event Notifications schema.

              Examples:

              A post notifications request example.

              {
                "notifications": [
                  {
                    "event": "project.create.failed",
                    "target": "234234324-3444-4556-224232432",
                    "source": "id.of.project.service.instance",
                    "triggered_by": "user-iam-id",
                    "action_url": "actionable/url",
                    "data": {
                      "field1": 1
                    }
                  }
                ]
              }

              Response

              The response of a notification post.

              Status Code

              • You successfully posted a notification.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              Example responses
              • A post notifications response example.

                {
                  "_id": "9n121be-3b7d-4bad-9bdd-2b0d7b3dcb6d",
                  "event": "project.create.failed",
                  "target": "234234324-3444-4556-224232432",
                  "source": "id.of.project.service.instance",
                  "triggered_by": "user-iam-id",
                  "data": {
                    "field1": 1
                  },
                  "status": "SUCCESS"
                }

              List all notifications events

              Retrieve all the notification events by specifying the project ID.

              GET /v1/projects/{id}/event

              Authentication

              This method uses the following security schemes for authentication.

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to reading notifications.

              • project.notifications.retrieve

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Response

              The response from a request to fetch notifications.

              Status Code

              • You successfully retrieved the notification events.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • A response example a get notifications request.

                {
                  "notifications": [
                    {
                      "id": "9n121be-3b7d-4bad-9bdd-2b0d7b3dcb6d",
                      "event": "project.create.failed",
                      "target": "234234324-3444-4556-224232432",
                      "source": "id.of.project.service.instance",
                      "triggered_by": "user-iam-id"
                    },
                    {
                      "id": "234234324-3444-4556-224232432",
                      "event": "check.pipeline.failed",
                      "target": "pull.request.id",
                      "source": "pipeline.id",
                      "target_label": "config_name2"
                    }
                  ]
                }

              Send a webhook for catalog events

              Send a webhook for pulsar catalog events.

              POST /v1/pulsar/catalog_events

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This is a webhook for pulsar catalog events.

              • project.webhook.pulsar-catalog

              Request

              A pulsar catalog event.

              Examples:

              A pulsar event request example.

              [
                {
                  "event_type": "account.create",
                  "timestamp": "2017-10-10T01:22:38.665Z",
                  "publisher": "bluemix.account.management",
                  "account_id": "7e1dbfafb670594f3e95a2fa9b1aa9a8",
                  "version": "1.0",
                  "event_id": "5f208fef-6b64-413c-aa07-dfed0b46abc1236",
                  "event_properties": {
                    "user_id": "IBMid-xaab1235nn",
                    "account.plan": "TRIAL",
                    "account.state": "INACTIVE"
                  }
                }
              ]

              Response

              Status Code

              • The pulsar event webhook that you sent was accepted.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              No Sample Response

              This method does not specify any sample responses.

              Send a webhook for Event Notifications events

              Send a webhook for events in an Event Notifications instance.

              POST /v1/pulsar/event_notification_events

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This is a webhook for pulsar Event Notification lifecycle events.

              • project.webhook.pulsar-event-notifications

              Request

              The request body of webhook for a pulsar event.

              Examples:

              A pulsar event request example.

              [
                {
                  "event_type": "account.create",
                  "timestamp": "2017-10-10T01:22:38.665Z",
                  "publisher": "bluemix.account.management",
                  "account_id": "7e1dbfafb670594f3e95a2fa9b1aa9a8",
                  "version": "1.0",
                  "event_id": "5f208fef-6b64-413c-aa07-dfed0b46abc1236",
                  "event_properties": {
                    "user_id": "IBMid-xaab1235nn",
                    "account.plan": "TRIAL",
                    "account.state": "INACTIVE"
                  }
                }
              ]

              Response

              Status Code

              • Your pulsar event webhook was accepted.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              No Sample Response

              This method does not specify any sample responses.

              Get service health information

              Retrieve the health information of the service.

              GET /v1/health

              Request

              Query Parameters

              • Set this parameter if you want to get the dependencies status in the output response.

                Default: true

              Response

              The response data from a health check request.

              Status Code

              • You successfully retrieved the health information.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              Example responses
              • {
                  "name": "projects",
                  "version": "0.0.1",
                  "dependencies": {
                    "database": 0,
                    "hypersync": 1
                  }
                }

              Create a service instance

              Create a service instance. When the service broker receives a provision request from the IBM Cloud platform, the broker must take whatever action is necessary to create a new resource. When a user creates a service instance from the IBM Cloud console or the IBM Cloud CLI, the IBM Cloud platform validates that the user has permission to create the service instance by using IBM Cloud IAM. After this validation occurs, your service broker's provision endpoint (PUT /v2/resource_instances/:instance_id) starts. When provisioning occurs, the IBM Cloud platform provides the following values:

              • The IBM Cloud context is included in the context variable. - The X-Broker-API-Originating-Identity has the IBM IAM ID of the user that initiated the request. - The parameters section includes the requested location and additional parameters that are required by your service.
              PUT /v2/service_instances/{instance_id}

              Authentication

              Request

              Custom Headers

              • The broker API version.

                Possible values: 1 ≤ length ≤ 100, Value must match regular expression ^(\d+\.)?(\d+\.)?(\*|\d+)$

                Example: 1.0

              • The broker API originating identity.

                Possible values: 0 ≤ length ≤ 300, Value must match regular expression ^$|^(?!\s).*\S$

                Example: ibmcloud eyJpYW1fbWQiOiJJQk2pZC03MEdOUjcxN2lFIn0=

              Path Parameters

              • The instance ID of a service instance that is provided by the IBM Cloud platform.

                Possible values: 4 ≤ length ≤ 512, Value must match regular expression (?!\s)(?!.*\s$)^(crn)[^'"`<>{}\s\x00-\x1F]*

                Example: crn:v1:staging:public:project:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::

              Query Parameters

              • A value of true indicates that both the IBM Cloud platform and the requesting client support asynchronous deprovisioning. If this parameter is not included in the request, and the broker can deprovision only a service instance of the requested plan asynchronously, the broker must reject the request with a 422 Unprocessable Entity response code.

                Default: true

              The request body, which contains the query filters and the search token that is initially set. null or undefined.

              Response

              The result of the provision call.

              Status Code

              • You successfully created a service instance.

              • The new resource was created.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The request cannot be processed because of a conflict between the request and the current client-controlled state in the system.

              Example responses
              • An example response to a provision call.

                {
                  "dashboard_url": "/v1/projects/cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                  "operation": "replace_service_instance"
                }
              • An example error from provisioning or deprovisioning.

                {
                  "errors": [
                    {
                      "code": "provision_call_error",
                      "message": "Error from provision call"
                    }
                  ],
                  "trace": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                  "status_code": 201
                }

              Delete a project service instance

              Delete or deprovision a project service instance by specifying the instance ID. When a service broker receives a delete request from the IBM Cloud platform, the broker must delete any resources that it created during the provision. Usually this action means that all resources are immediately reclaimed for future provisions.

              DELETE /v2/service_instances/{instance_id}

              Authentication

              Request

              Custom Headers

              • The broker API version.

                Possible values: 1 ≤ length ≤ 100, Value must match regular expression ^(\d+\.)?(\d+\.)?(\*|\d+)$

                Example: 1.0

              • The broker API originating identity.

                Possible values: 0 ≤ length ≤ 300, Value must match regular expression ^$|^(?!\s).*\S$

                Example: ibmcloud eyJpYW1fbWQiOiJJQk2pZC03MEdOUjcxN2lFIn0=

              Path Parameters

              • The ID of a previously provisioned service instance.

                Possible values: 4 ≤ length ≤ 512, Value must match regular expression (?!\s)(?!.*\s$)^(crn)[^'"`<>{}\s\x00-\x1F]*

                Example: crn:v1:staging:public:project:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::

              Query Parameters

              • The ID of the plan for which the service instance was requested. The plan ID is stored in the catalog.json of your broker. This value should be a GUID. It must be a nonempty string.

                Possible values: 0 ≤ length ≤ 300, Value must match regular expression ^$|^(?!\s).*\S$

                Example: cb54391b-3316-4943-a5a6-a541678c1924

              • The ID of the service that is stored in the catalog.json of your broker. This value must be a GUID and a nonempty string.

                Possible values: 0 ≤ length ≤ 300, Value must match regular expression ^$|^(?!\s).*\S$

                Example: cb54391b-3316-4943-a5a6-a541678c1924

              • A value of true indicates that both the IBM Cloud platform and the requesting client support asynchronous deprovisioning. If this parameter is not included in the request, and the broker can deprovision only a service instance of the requested plan asynchronously, the broker must reject the request with a 422 Unprocessable Entity response code. Learn more.

                Default: false

              Response

              The result of deprovisioning a service instance.

              Status Code

              • You successfully deleted a project service instance.

              • Your request was accepted.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request. This response code is returned if the broker supports only asynchronous provisioning for the requested plan and the request did not include ?accepts_incomplete=true.

              • The requested resource is no longer available.

              Example responses
              • An example response to a request to deprovision a service instance.

                {}
              • An example error from provisioning or deprovisioning.

                {
                  "errors": [
                    {
                      "code": "provision_call_error",
                      "message": "Error from provision call"
                    }
                  ],
                  "trace": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                  "status_code": 201
                }

              Update plans and service parameters

              Update the plans and service parameters in a provisioned service instance.

              PATCH /v2/service_instances/{instance_id}

              Authentication

              Request

              Custom Headers

              • The broker API version.

                Possible values: 1 ≤ length ≤ 100, Value must match regular expression ^(\d+\.)?(\d+\.)?(\*|\d+)$

                Example: 1.0

              • The originating identity of the broker API.

                Possible values: 0 ≤ length ≤ 300, Value must match regular expression ^$|^(?!\s).*\S$

                Example: ibmcloud eyJpYW1fbWQiOiJJQk2pZC03MEdOUjcxN2lFIn0=

              Path Parameters

              • The ID of a service instance that was previously provisioned.

                Possible values: 4 ≤ length ≤ 512, Value must match regular expression (?!\s)(?!.*\s$)^(crn)[^'"`<>{}\s\x00-\x1F]*

                Example: crn:v1:staging:public:project:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::

              Query Parameters

              • A value of true indicates that both the IBM Cloud platform and the requesting client support asynchronous deprovisioning. If this parameter is not included in the request, and the broker can deprovision only a service instance of the requested plan asynchronously, the broker must reject the request with a 422 Unprocessable Entity response code.

                Default: false

              The request body that contains the query filters and the search token that is initially set. This field is null or undefined.

              Examples:
              {
                "context": {
                  "account_id": "499b176abb3e1c9727df87ae48b27c7b",
                  "crn": "crn:v1:bluemix:public:testjavaresourceservicebrokername:us-south:a/499b176abb3e1c9727df87ae48b27c7b:7f0d2b93-fd4a-4ce9-8675-978d20b1e0b7::",
                  "platform": "ibmcloud",
                  "resource_group_crn": "crn:v1:bluemix:public:resource-controller::a/499b176abb3e1c9727df87ae48b27c7b::resource-group:2a5f74056b254efbaab5e9e28a7111414",
                  "target_crn": "crn:v1:bluemix:public:resource-catalog::a/e97a8c01ac694e308ef3ad7795c7cdb3::deployment:e62e2c19-0c3b-41e3-b8b3-c71762ecd489%3Aus-south38399"
                },
                "parameters": {
                  "parameter1": 1,
                  "parameter2": "value"
                },
                "plan_id": "e1031579-4b42-4169-b7cf-f7793c616fdc",
                "previous_values": {
                  "plan_id": "e62e2c19-0c3b-41e3-b8b3-c71762ecd489",
                  "service_id": "cb55391b-3416-4943-a6a6-a541778c1924"
                },
                "service_id": "cb55391b-3416-4943-a6a6-a541778c1924"
              }

              Response

              The result of updating a service instance.

              Status Code

              • You successfully updated the parameters.

              • The new resource was created.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              Example responses
              • An example response to a request to update a service instance.

                {}
              • An example error from provisioning or deprovisioning.

                {
                  "errors": [
                    {
                      "code": "provision_call_error",
                      "message": "Error from provision call"
                    }
                  ],
                  "trace": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                  "status_code": 201
                }

              Get the last operation for an instance

              Retrieve the previous operations for a service instance by specifying the instance ID for asynchronous provision calls.

              GET /v2/service_instances/{instance_id}/last_operation

              Authentication

              Request

              Custom Headers

              • The broker API version.

                Possible values: 1 ≤ length ≤ 100, Value must match regular expression ^(\d+\.)?(\d+\.)?(\*|\d+)$

                Example: 1.0

              Path Parameters

              • The unique instance ID that the IBM Cloud platform generates during provisioning.

                Possible values: 4 ≤ length ≤ 512, Value must match regular expression (?!\s)(?!.*\s$)^(crn)[^'"`<>{}\s\x00-\x1F]*

                Example: crn:v1:staging:public:project:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::

              Query Parameters

              • A broker-provided identifier for the operation.

                Possible values: 0 ≤ length ≤ 50, Value must match regular expression ^$|^(?!\s).*\S$

                Example: ABCD

              • The ID of the plan from the catalog.json in your broker.

                Possible values: 0 ≤ length ≤ 300, Value must match regular expression ^$|^(?!\s).*\S$

                Example: cb54391b-3316-4943-a5a6-a541678c1924

              • The ID of the service from the catalog.json in your service broker.

                Possible values: 0 ≤ length ≤ 300, Value must match regular expression ^$|^(?!\s).*\S$

                Example: cb54391b-3316-4943-a5a6-a541678c1924

              Response

              The result of get_last_operation call.

              Status Code

              • You successfully retrieved the previous operations for an instance.

              • The requested resource is no longer available.

              Example responses
              • An example response to a request to get the last operation.

                {
                  "state": "succeeded",
                  "description": "The last operation was retrieved successfully."
                }

              Update the state of a service instance

              Update an instance by disabling or enabling the state of a provisioned service instance.

              PUT /bluemix_v1/service_instances/{instance_id}

              Authentication

              Request

              Custom Headers

              • The broker API version.

                Possible values: 1 ≤ length ≤ 100, Value must match regular expression ^(\d+\.)?(\d+\.)?(\*|\d+)$

                Example: 1.0

              Path Parameters

              • The instance ID of a service instance that is provided by the IBM Cloud platform.

                Possible values: 4 ≤ length ≤ 512, Value must match regular expression (?!\s)(?!.*\s$)^(crn)[^'"`<>{}\s\x00-\x1F]*

                Example: crn:v1:staging:public:project:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::

              It contains the query filters and the search token that is initially set to null or undefined.

              Examples:
              {
                "enabled": true
              }

              Response

              The result of the status call of a service instance.

              Status Code

              • Your request was successful.

              • The state of the provisioned service instance was successfully updated.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              Example responses
              • An example of a response to a request for the resource state.

                {
                  "active": "false",
                  "enabled": "true",
                  "last_active": "1673273819000"
                }
              • An example error from provisioning or deprovisioning.

                {
                  "errors": [
                    {
                      "code": "provision_call_error",
                      "message": "Error from provision call"
                    }
                  ],
                  "trace": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                  "status_code": 201
                }

              Get the current state information

              Retrieve the current state for the specified service instance.

              GET /bluemix_v1/service_instances/{instance_id}

              Authentication

              Request

              Custom Headers

              • The broker API version.

                Possible values: 1 ≤ length ≤ 100, Value must match regular expression ^(\d+\.)?(\d+\.)?(\*|\d+)$

                Example: 1.0

              Path Parameters

              • The ID of a service instance that was previously provisioned.

                Possible values: 4 ≤ length ≤ 512, Value must match regular expression (?!\s)(?!.*\s$)^(crn)[^'"`<>{}\s\x00-\x1F]*

                Example: crn:v1:staging:public:project:us-south:a/4e1c48fcf8ac33c0a2441e4139f189ae:bf40ad13-b107-446a-8286-c6d576183bb1::

              Response

              The result of the status call of a service instance.

              Status Code

              • The request was successful.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The requested resource could not be found.

              Example responses
              • An example of a response to a request for the resource state.

                {
                  "active": "false",
                  "enabled": "true",
                  "last_active": "1673273819000"
                }

              Get the catalog metadata

              Fetch the catalog metadata that is stored within the broker.

              GET /v2/catalog

              Authentication

              Request

              Custom Headers

              • The broker API version.

                Possible values: 1 ≤ length ≤ 100, Value must match regular expression ^(\d+\.)?(\d+\.)?(\*|\d+)$

                Example: 1.0

              Response

              The response from a request to fetch the catalog metadata that is stored within the broker.

              Status Code

              • Your request was successful.

              Example responses
              • An example response to a request for catalog metadata.

                {
                  "services": [
                    {
                      "metadata": {
                        "type": "public",
                        "longDescription": "The project service is the platform service that manages Infrastructure as Code projects.",
                        "serviceKeysSupported": false,
                        "displayName": "Project",
                        "featuredImageUrl": "https://broker.project.test.cloud.ibm.com/logo.svg",
                        "documentationUrl": "https://www.ibm.com/docs/",
                        "providerDisplayName": "IBM",
                        "termsUrl": "https://www-03.ibm.com/software/sla/sladb.nsf/pdf/5948-09/$file/i126-5948-09_08-2020_en_US.pdf",
                        "parameters": [],
                        "imageUrl": "https://broker.project.test.cloud.ibm.com/logo.svg",
                        "smallImageUrl": "https://broker.project.test.cloud.ibm.com/logo.svg",
                        "mediumImageUrl": "https://broker.project.test.cloud.ibm.com/logo.svg",
                        "supportUrl": "https://www.ibm.com/support",
                        "supportEmail": "support@ibm.com",
                        "instructionsUrl": "https://test.cloud.ibm.com/docs/get-coding/projects.html"
                      },
                      "bindable": false,
                      "rc_compatible": true,
                      "iam_compatible": true,
                      "plan_updateable": false,
                      "unique_api_key": false,
                      "tags": [
                        "rc_compatible",
                        "ibm_created"
                      ],
                      "name": "project",
                      "id": "5e3a7a60-ecb1-11ec-ba3d-5596cf8703a4",
                      "description": "The project service.",
                      "provisionable": false,
                      "plans": [
                        {
                          "name": "Free",
                          "free": true,
                          "description": "Free",
                          "id": "aff3edfa-9baf-484a-a95e-4c9312b2b9b8",
                          "metadata": {
                            "regional": false,
                            "allowInternalUsers": true,
                            "displayName": "Free",
                            "bullets": [
                              "Free plan"
                            ]
                          },
                          "pricingCatalogRev": "1-3df7625e4713a614ac0ab563026e8c6a",
                          "pricingCatalogId": "f1f69175dce95ca9d958bb9b31828081",
                          "effective_from": "2022-09-01T00:00:00.000Z",
                          "effective_until": "9999-12-31T00:00:00.000Z"
                        }
                      ]
                    }
                  ]
                }

              Connect to an Event Notifications instance

              Connect a project instance to an Event Notifications instance.

              POST /v1/projects/{id}/event_notifications

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to Event Notifications onboarding.

              • project.event-notifications.create

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              The metadata on the integration of the projects with Event Notifications.

              Examples:

              A post integrations event notification request example.

              {
                "description": "A sample project source.",
                "enabled": true,
                "event_notifications_source_name": "project 1 source name for event notifications",
                "instance_crn": "CRN of event notifications instance"
              }

              Response

              The response of a request to connect a project to an Event Notifications instance.

              Status Code

              • You successfully connected to an Event Notifications instance.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              Example responses
              • A response example of a post integrations event notification request.

                {
                  "description": "A sample project source.",
                  "enabled": true,
                  "id": "CRN of the project instance",
                  "name": "Project name",
                  "created_at": "2017-10-10T01:22:38.665Z"
                }

              Get Event Notifications source details

              Retrieve the source details of the project from the connected Event Notifications instance by specifying the project ID.

              GET /v1/projects/{id}/event_notifications

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to the Event Notifications integration reading.

              • project.event-notifications.retrieve

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Response

              The response of a request to get the source details of the Event Notifications integration.

              Status Code

              • You successfully retrieved the source details.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • A response example of a request to get Event Notifications integrations.

                {
                  "description": "A sample project source.",
                  "enabled": true,
                  "id": "CRN of the project instance.",
                  "name": "Project name",
                  "updated_at": "2017-10-10T01:22:38.665Z",
                  "topic_count": 1,
                  "topic_names": [
                    "topic 1"
                  ]
                }

              Delete an event notifications connection

              Delete the Event Notifications integration if that is where the project was onboarded to.

              DELETE /v1/projects/{id}/event_notifications

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to Event Notifications onboarding.

              • project.event-notifications.delete

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Response

              Status Code

              • The request was successful but the response is empty.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              No Sample Response

              This method does not specify any sample responses.

              Send a notification to Event Notifications

              Send a notification to the Event Notifications instance by specifying the project ID.

              POST /v1/projects/{id}/event_notifications/test

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to Event Notifications onboarding.

              • project.event-notifications.create-test

              Request

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              The request body to post a notification to the Event Notifications API.

              Examples:

              A post event notification request example.

              {
                "ibmendefaultlong": "long test notification message",
                "ibmendefaultshort": "Test notification"
              }

              Response

              The response for a request to post a test notification to the Event Notifications instance.

              Status Code

              • You successfully posted the test notification to the Event Notifications instance.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              Example responses
              • A post event notification response example.

                {
                  "datacontenttype": "application/json",
                  "ibmendefaultlong": "long test notification message",
                  "ibmendefaultshort": "Test notification",
                  "ibmensourceid": "crn of project",
                  "id": "5f208fef-6b64-413c-aa07-dfed0b46abc1236",
                  "notification_id": "234234324-3444-4556-224232432",
                  "source": "crn of project",
                  "specversion": "1.0",
                  "type": "com.ibm.cloud.project.project.test_notification"
                }

              List Security and Compliance Center instances for a project

              Retrieve a list of Security and Compliance instances for a specific project by specifying the project ID. Learn more.

              GET /v1/projects/{project_id}/compliance_instances

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to getting Security and Compliance instances for a project.

              • project.compliance.retrieve

              Request

              Custom Headers

              • The IBM trusted profile ID

                Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

              • The IBM Cloud API key. It can be either raw or pulled from the catalog via a CRN or JSON blob.

                Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique environment ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Response

              The response to a request to fetch instances from Security and Compliance Center.

              Status Code

              • You successfully retrieved the list of instances.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • The example of a Security and Compliance Center instance result.

                {
                  "compliance_instances": [
                    {
                      "name": "compliance",
                      "region": "us-south",
                      "service_instance": "7c80d661-6629-47b0-a203-0469856f72aa",
                      "crn": "crn:v1:staging:public:compliance:global:a/cfbf9050ab8eac97b01bab5af830be8a:7c80d661-6629-47b0-a203-0469856f72aa::"
                    }
                  ]
                }

              List Security and Compliance Center profiles

              Retrieve a list of Security and Compliance profiles in an instance for a specific project. Learn more.

              GET /v1/projects/{project_id}/compliance_instances/{compliance_instance_id}/profiles

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to getting Security and Compliance Center profiles for a project.

              • project.compliance.retrieve-profiles

              Request

              Custom Headers

              • The IBM trusted profile ID

                Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

              • The IBM Cloud API key. It can be either raw or pulled from the catalog via a CRN or JSON blob.

                Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique environment ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The ID of the Security and Compliance Center instance.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Query Parameters

              • The location of the Security and Compliance instance.

                Possible values: 2 ≤ length ≤ 12, Value must match regular expression ^[a-z0-9-_]{2,}$

                Example: us-south

              • The last entry that is returned on the page. The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

                Possible values: 0 ≤ length ≤ 1536, Value must match regular expression ^$|^(?!\s)(?!.*\s$)[^\x00-\x1F]*$

                Default:

              • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

                Possible values: 1 ≤ value ≤ 100

                Default: 10

              Response

              The response to a request to fetch profiles from Security and Compliance Center.

              Status Code

              • You successfully retrieved the list of profiles.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • The response example to a request for a Security and Compliance Center profile.

                {
                  "limit": 10,
                  "first": {
                    "start": "start-here-for-this-page"
                  },
                  "next": {
                    "start": "start-here-for-next-page"
                  },
                  "profiles": [
                    {
                      "id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                      "profile_name": "IBM Cloud Security Best Practices",
                      "profile_description": "The IBM Cloud Security Best Practices profile.",
                      "profile_type": "predefined",
                      "profile_version": "1.0.0"
                    }
                  ]
                }

              List all Security and Compliance Center attachments

              Retrieve a list of Security and Compliance Center profile attachments in an instance for a specific project. Learn more.

              GET /v1/projects/{project_id}/compliance_instances/{compliance_instance_id}/profiles/{profile_id}/attachments

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to getting Security and Compliance Center attachments for a project.

              • project.compliance.retrieve-attachments

              Request

              Custom Headers

              • The IBM trusted profile ID

                Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

              • The IBM Cloud API key. It can be either raw or pulled from the catalog via a CRN or JSON blob.

                Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique environment ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The ID of the Security and Compliance Center instance.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The ID of the Security and Compliance Center profile.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Query Parameters

              • The location of the Security and Compliance instance.

                Possible values: 2 ≤ length ≤ 12, Value must match regular expression ^[a-z0-9-_]{2,}$

                Example: us-south

              • The last entry that is returned on the page. The server uses this parameter to determine the first entry that is returned on the next page. If this parameter is not specified, the logical first page is returned.

                Possible values: 0 ≤ length ≤ 1536, Value must match regular expression ^$|^(?!\s)(?!.*\s$)[^\x00-\x1F]*$

                Default:

              • The maximum number of resources to return. The number of resources that are returned is the same, except for the last page.

                Possible values: 1 ≤ value ≤ 100

                Default: 10

              Response

              The response to a request to fetch attachments for a specific profile from Security and Compliance Center.

              Status Code

              • The request was successful.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • The example of a Security and Compliance Center attachment result.

                {
                  "limit": 10,
                  "first": {
                    "start": "start-here-for-this-page"
                  },
                  "next": {
                    "start": "start-here-for-next-page"
                  },
                  "profile_id": "cfbf9050-ab8e-ac97-b01b-ab5af830be8a",
                  "attachments": [
                    {
                      "id": "8ed89422c35043b2ac773cc40da97aa6",
                      "included_scope": {
                        "scope_id": "9ce219d8a13b4b46bd150929a40ad90d",
                        "scope_type": "account"
                      },
                      "attachment_parameters": [
                        {
                          "parameter_name": "hpcs_crypto_units",
                          "parameter_type": "string_list",
                          "parameter_value": "['2', '3']",
                          "assessment_type": "automated",
                          "assessment_id": "rule-064d9004-8728-4988-b19a-1805710466f6"
                        }
                      ],
                      "last_scan": "a96b9472-2b2d-4ac7-80d5-d93c52da08d1",
                      "last_scan_status": "in_progress",
                      "last_scan_time": "2023-04-17T14:30:14Z",
                      "next_scan_time": "2023-04-17T20:30:14Z"
                    }
                  ]
                }

              List all environments

              Retrieve a list of all environments in your account across projects.

              GET /v1/environments

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies only to the get environment operation.

              • project.environment.retrieve-account

              Request

              Query Parameters

              • The flag to return only unique environment names.

                Default: false

              Response

              The list environment response for IAM.

              Status Code

              • You successfully retrieved a list of environments.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              Example responses
              • The sample environment list response for IAM.

                {
                  "environments": [
                    {
                      "value": "env123",
                      "label": "development"
                    }
                  ]
                }

              Add the configuration authorization token to the target endpoint

              Inject the authorization token that is found or generated from the project configuration to allow users to call the target endpoint in the scope of the target account of the project configuration.

              POST /v1/projects/{project_id}/configs/{id}/proxy_passthrough

              Authentication

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              This action applies to updating the project configuration.

              • project.config.update

              Request

              Custom Headers

              • The IBM trusted profile ID

                Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

              • The IBM Cloud API key. It can be either raw or pulled from the catalog via a CRN or JSON blob.

                Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^(?!\s)(?!.*\s$)[^`<>\x00-\x1F]*$

              • The unique environment ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Path Parameters

              • The unique project ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              • The unique configuration ID.

                Possible values: length ≤ 128, Value must match regular expression ^[\.\-0-9a-zA-Z]+$

              Query Parameters

              • The target endpoint that the project service is proxied through.

                Possible values: 1 ≤ length ≤ 256, Value must match regular expression ^(http(s)?:\/\/)[a-zA-Z0-9\$\-_\.+!\*'\(\),=&?\/]+$

              The payload to pass to the target endpoint.

              Examples:
              {
                "context": "foo"
              }

              Response

              Status Code

              • You successfully added the token to the target endpoint.

              • The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request.

              • The credentials are invalid or authentication is required to succeed.

              • The request could not be completed by the server. It could be due to an internal error or in some cases invalid data in the request.

              • Your request encountered a system problem or unexpected error.

              Example responses
              • {
                  "options": []
                }
              id=curlclassName=tab-item-selected