@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
99 lines • 4.25 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AgentcoreApiKeyCredentialProvider = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.bedrock.AgentcoreApiKeyCredentialProvider("example", {
* name: "example-api-key-provider",
* apiKey: "your-api-key-here",
* });
* ```
*
* ### Write-Only API Key (Recommended for Production)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.bedrock.AgentcoreApiKeyCredentialProvider("example", {
* name: "example-api-key-provider",
* apiKeyWo: "your-api-key-here",
* apiKeyWoVersion: 1,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Bedrock AgentCore API Key Credential Provider using the provider name. For example:
*
* ```sh
* $ pulumi import aws:bedrock/agentcoreApiKeyCredentialProvider:AgentcoreApiKeyCredentialProvider example example-api-key-provider
* ```
*/
class AgentcoreApiKeyCredentialProvider extends pulumi.CustomResource {
/**
* Get an existing AgentcoreApiKeyCredentialProvider resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new AgentcoreApiKeyCredentialProvider(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of AgentcoreApiKeyCredentialProvider. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === AgentcoreApiKeyCredentialProvider.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["apiKey"] = state?.apiKey;
resourceInputs["apiKeySecretArns"] = state?.apiKeySecretArns;
resourceInputs["apiKeyWo"] = state?.apiKeyWo;
resourceInputs["apiKeyWoVersion"] = state?.apiKeyWoVersion;
resourceInputs["credentialProviderArn"] = state?.credentialProviderArn;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
resourceInputs["apiKey"] = args?.apiKey ? pulumi.secret(args.apiKey) : undefined;
resourceInputs["apiKeyWo"] = args?.apiKeyWo ? pulumi.secret(args.apiKeyWo) : undefined;
resourceInputs["apiKeyWoVersion"] = args?.apiKeyWoVersion;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["apiKeySecretArns"] = undefined /*out*/;
resourceInputs["credentialProviderArn"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["apiKey", "apiKeyWo"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(AgentcoreApiKeyCredentialProvider.__pulumiType, name, resourceInputs, opts);
}
}
exports.AgentcoreApiKeyCredentialProvider = AgentcoreApiKeyCredentialProvider;
/** @internal */
AgentcoreApiKeyCredentialProvider.__pulumiType = 'aws:bedrock/agentcoreApiKeyCredentialProvider:AgentcoreApiKeyCredentialProvider';
//# sourceMappingURL=agentcoreApiKeyCredentialProvider.js.map