Back to Aws Sdk Js V3

@aws-sdk/client-proton

clients/client-proton/README.md

3.1044.053.2 KB
Original Source
<!-- generated file, do not edit directly -->

@aws-sdk/client-proton

Description

AWS SDK for JavaScript Proton Client for Node.js, Browser and React Native.

<p>This is the Proton Service API Reference. It provides descriptions, syntax and usage examples for each of the <a href="https://docs.aws.amazon.com/proton/latest/APIReference/API_Operations.html">actions</a> and <a href="https://docs.aws.amazon.com/proton/latest/APIReference/API_Types.html">data types</a> for the Proton service.</p> <p>The documentation for each action shows the Query API request parameters and the XML response.</p> <p>Alternatively, you can use the Amazon Web Services CLI to access an API. For more information, see the <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html">Amazon Web Services Command Line Interface User Guide</a>.</p> <p>The Proton service is a two-pronged automation framework. Administrators create service templates to provide standardized infrastructure and deployment tooling for serverless and container based applications. Developers, in turn, select from the available service templates to automate their application or service deployments.</p> <p>Because administrators define the infrastructure and tooling that Proton deploys and manages, they need permissions to use all of the listed API operations.</p> <p>When developers select a specific infrastructure and tooling set, Proton deploys their applications. To monitor their applications that are running on Proton, developers need permissions to the service <i>create</i>, <i>list</i>, <i>update</i> and <i>delete</i> API operations and the service instance <i>list</i> and <i>update</i> API operations.</p> <p>To learn more about Proton, see the <a href="https://docs.aws.amazon.com/proton/latest/userguide/Welcome.html">Proton User Guide</a>.</p> <p> <b>Ensuring Idempotency</b> </p> <p>When you make a mutating API request, the request typically returns a result before the asynchronous workflows of the operation are complete. Operations might also time out or encounter other server issues before they're complete, even if the request already returned a result. This might make it difficult to determine whether the request succeeded. Moreover, you might need to retry the request multiple times to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the operation occurs multiple times. This means that you might create more resources than you intended.</p> <p> <i>Idempotency</i> ensures that an API request action completes no more than one time. With an idempotent request, if the original request action completes successfully, any subsequent retries complete successfully without performing any further actions. However, the result might contain updated information, such as the current creation status.</p> <p>The following lists of APIs are grouped according to methods that ensure idempotency.</p> <p> <b>Idempotent create APIs with a client token</b> </p> <p>The API actions in this list support idempotency with the use of a <i>client token</i>. The corresponding Amazon Web Services CLI commands also support idempotency using a client token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request using one of these actions, specify a client token in the request. We recommend that you <i>don't</i> reuse the same client token for other API requests. If you don’t provide a client token for these APIs, a default client token is automatically provided by SDKs.</p> <p>Given a request action that has succeeded:</p> <p>If you retry the request using the same client token and the same parameters, the retry succeeds without performing any further actions other than returning the original resource detail data in the response.</p> <p>If you retry the request using the same client token, but one or more of the parameters are different, the retry throws a <code>ValidationException</code> with an <code>IdempotentParameterMismatch</code> error.</p> <p>Client tokens expire eight hours after a request is made. If you retry the request with the expired token, a new resource is created.</p> <p>If the original resource is deleted and you retry the request, a new resource is created.</p> <p>Idempotent create APIs with a client token:</p> <ul> <li> <p>CreateEnvironmentTemplateVersion</p> </li> <li> <p>CreateServiceTemplateVersion</p> </li> <li> <p>CreateEnvironmentAccountConnection</p> </li> </ul> <p> <b>Idempotent create APIs</b> </p> <p>Given a request action that has succeeded:</p> <p>If you retry the request with an API from this group, and the original resource <i>hasn't</i> been modified, the retry succeeds without performing any further actions other than returning the original resource detail data in the response.</p> <p>If the original resource has been modified, the retry throws a <code>ConflictException</code>.</p> <p>If you retry with different input parameters, the retry throws a <code>ValidationException</code> with an <code>IdempotentParameterMismatch</code> error.</p> <p>Idempotent create APIs:</p> <ul> <li> <p>CreateEnvironmentTemplate</p> </li> <li> <p>CreateServiceTemplate</p> </li> <li> <p>CreateEnvironment</p> </li> <li> <p>CreateService</p> </li> </ul> <p> <b>Idempotent delete APIs</b> </p> <p>Given a request action that has succeeded:</p> <p>When you retry the request with an API from this group and the resource was deleted, its metadata is returned in the response.</p> <p>If you retry and the resource doesn't exist, the response is empty.</p> <p>In both cases, the retry succeeds.</p> <p>Idempotent delete APIs:</p> <ul> <li> <p>DeleteEnvironmentTemplate</p> </li> <li> <p>DeleteEnvironmentTemplateVersion</p> </li> <li> <p>DeleteServiceTemplate</p> </li> <li> <p>DeleteServiceTemplateVersion</p> </li> <li> <p>DeleteEnvironmentAccountConnection</p> </li> </ul> <p> <b>Asynchronous idempotent delete APIs</b> </p> <p>Given a request action that has succeeded:</p> <p>If you retry the request with an API from this group, if the original request delete operation status is <code>DELETE_IN_PROGRESS</code>, the retry returns the resource detail data in the response without performing any further actions.</p> <p>If the original request delete operation is complete, a retry returns an empty response.</p> <p>Asynchronous idempotent delete APIs:</p> <ul> <li> <p>DeleteEnvironment</p> </li> <li> <p>DeleteService</p> </li> </ul>

Installing

To install this package, use the CLI of your favorite package manager:

  • npm install @aws-sdk/client-proton
  • yarn add @aws-sdk/client-proton
  • pnpm add @aws-sdk/client-proton

Getting Started

Import

The AWS SDK is modulized by clients and commands. To send a request, you only need to import the ProtonClient and the commands you need, for example ListComponentsCommand:

js
// ES5 example
const { ProtonClient, ListComponentsCommand } = require("@aws-sdk/client-proton");
ts
// ES6+ example
import { ProtonClient, ListComponentsCommand } from "@aws-sdk/client-proton";

Usage

To send a request:

  • Instantiate a client with configuration (e.g. credentials, region).
  • Instantiate a command with input parameters.
  • Call the send operation on the client, providing the command object as input.
js
const client = new ProtonClient({ region: "REGION" });

const params = { /** input parameters */ };
const command = new ListComponentsCommand(params);

Async/await

We recommend using the await operator to wait for the promise returned by send operation as follows:

js
// async/await.
try {
  const data = await client.send(command);
  // process data.
} catch (error) {
  // error handling.
} finally {
  // finally.
}

Promises

You can also use Promise chaining.

js
client
  .send(command)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  })
  .finally(() => {
    // finally.
  });

Aggregated client

The aggregated client class is exported from the same package, but without the "Client" suffix.

Proton extends ProtonClient and additionally supports all operations, waiters, and paginators as methods. This style may be familiar to you from the AWS SDK for JavaScript v2.

If you are bundling the AWS SDK, we recommend using only the bare-bones client (ProtonClient). More details are in the blog post on modular packages in AWS SDK for JavaScript.

ts
import { Proton } from "@aws-sdk/client-proton";

const client = new Proton({ region: "REGION" });

// async/await.
try {
  const data = await client.listComponents(params);
  // process data.
} catch (error) {
  // error handling.
}

// Promises.
client
  .listComponents(params)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  });

// callbacks (not recommended).
client.listComponents(params, (err, data) => {
  // process err and data.
});

Troubleshooting

When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).

js
try {
  const data = await client.send(command);
  // process data.
} catch (error) {
  const { requestId, cfId, extendedRequestId } = error.$metadata;
  console.log({ requestId, cfId, extendedRequestId });
  /**
   * The keys within exceptions are also parsed.
   * You can access them by specifying exception names:
   * if (error.name === 'SomeServiceException') {
   *     const value = error.specialKeyInException;
   * }
   */
}

See also docs/ERROR_HANDLING.

Getting Help

Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.

To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.

Contributing

This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-proton package is updated. To contribute to client you can check our generate clients scripts.

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

Client Commands (Operations List)

<details> <summary> AcceptEnvironmentAccountConnection </summary>

Command API Reference / Input / Output

</details> <details> <summary> CancelComponentDeployment </summary>

Command API Reference / Input / Output

</details> <details> <summary> CancelEnvironmentDeployment </summary>

Command API Reference / Input / Output

</details> <details> <summary> CancelServiceInstanceDeployment </summary>

Command API Reference / Input / Output

</details> <details> <summary> CancelServicePipelineDeployment </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateComponent </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateEnvironment </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateEnvironmentAccountConnection </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateEnvironmentTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateEnvironmentTemplateVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateRepository </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateService </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateServiceInstance </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateServiceSyncConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateServiceTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateServiceTemplateVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateTemplateSyncConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteComponent </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteDeployment </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteEnvironment </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteEnvironmentAccountConnection </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteEnvironmentTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteEnvironmentTemplateVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteRepository </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteService </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteServiceSyncConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteServiceTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteServiceTemplateVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteTemplateSyncConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetAccountSettings </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetComponent </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetDeployment </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetEnvironment </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetEnvironmentAccountConnection </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetEnvironmentTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetEnvironmentTemplateVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetRepository </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetRepositorySyncStatus </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetResourcesSummary </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetService </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetServiceInstance </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetServiceInstanceSyncStatus </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetServiceSyncBlockerSummary </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetServiceSyncConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetServiceTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetServiceTemplateVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetTemplateSyncConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetTemplateSyncStatus </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListComponentOutputs </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListComponentProvisionedResources </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListComponents </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListDeployments </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListEnvironmentAccountConnections </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListEnvironmentOutputs </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListEnvironmentProvisionedResources </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListEnvironments </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListEnvironmentTemplates </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListEnvironmentTemplateVersions </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListRepositories </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListRepositorySyncDefinitions </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListServiceInstanceOutputs </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListServiceInstanceProvisionedResources </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListServiceInstances </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListServicePipelineOutputs </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListServicePipelineProvisionedResources </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListServices </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListServiceTemplates </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListServiceTemplateVersions </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTagsForResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> NotifyResourceDeploymentStatusChange </summary>

Command API Reference / Input / Output

</details> <details> <summary> RejectEnvironmentAccountConnection </summary>

Command API Reference / Input / Output

</details> <details> <summary> TagResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> UntagResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateAccountSettings </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateComponent </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateEnvironment </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateEnvironmentAccountConnection </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateEnvironmentTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateEnvironmentTemplateVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateService </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateServiceInstance </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateServicePipeline </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateServiceSyncBlocker </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateServiceSyncConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateServiceTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateServiceTemplateVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateTemplateSyncConfig </summary>

Command API Reference / Input / Output

</details>