UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

143 lines 5.94 kB
"use strict"; // *** 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.AgentcoreOauth2CredentialProvider = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### GitHub OAuth Provider * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const github = new aws.bedrock.AgentcoreOauth2CredentialProvider("github", { * name: "github-oauth-provider", * credentialProviderVendor: "GithubOauth2", * oauth2ProviderConfig: { * githubOauth2ProviderConfig: { * clientId: "your-github-client-id", * clientSecret: "your-github-client-secret", * }, * }, * }); * ``` * * ### Custom OAuth Provider with Discovery URL * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const auth0 = new aws.bedrock.AgentcoreOauth2CredentialProvider("auth0", { * name: "auth0-oauth-provider", * credentialProviderVendor: "CustomOauth2", * customOauth2ProviderConfig: [{ * custom: [{ * clientIdWo: "auth0-client-id", * clientSecretWo: "auth0-client-secret", * clientCredentialsWoVersion: 1, * oauthDiscovery: [{ * discoveryUrl: "https://dev-company.auth0.com/.well-known/openid-configuration", * }], * }], * }], * }); * ``` * * ### Custom OAuth Provider with Authorization Server Metadata * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const keycloak = new aws.bedrock.AgentcoreOauth2CredentialProvider("keycloak", { * name: "keycloak-oauth-provider", * credentialProviderVendor: "CustomOauth2", * oauth2ProviderConfig: { * customOauth2ProviderConfig: { * clientIdWo: "keycloak-client-id", * clientSecretWo: "keycloak-client-secret", * clientCredentialsWoVersion: 1, * oauthDiscovery: { * authorizationServerMetadata: { * issuer: "https://auth.company.com/realms/production", * authorizationEndpoint: "https://auth.company.com/realms/production/protocol/openid-connect/auth", * tokenEndpoint: "https://auth.company.com/realms/production/protocol/openid-connect/token", * responseTypes: [ * "code", * "id_token", * ], * }, * }, * }, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Bedrock AgentCore OAuth2 Credential Provider using the provider name. For example: * * ```sh * $ pulumi import aws:bedrock/agentcoreOauth2CredentialProvider:AgentcoreOauth2CredentialProvider example oauth2-provider-name * ``` */ class AgentcoreOauth2CredentialProvider extends pulumi.CustomResource { /** * Get an existing AgentcoreOauth2CredentialProvider 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 AgentcoreOauth2CredentialProvider(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AgentcoreOauth2CredentialProvider. 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'] === AgentcoreOauth2CredentialProvider.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["clientSecretArns"] = state?.clientSecretArns; resourceInputs["credentialProviderArn"] = state?.credentialProviderArn; resourceInputs["credentialProviderVendor"] = state?.credentialProviderVendor; resourceInputs["name"] = state?.name; resourceInputs["oauth2ProviderConfig"] = state?.oauth2ProviderConfig; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.credentialProviderVendor === undefined && !opts.urn) { throw new Error("Missing required property 'credentialProviderVendor'"); } resourceInputs["credentialProviderVendor"] = args?.credentialProviderVendor; resourceInputs["name"] = args?.name; resourceInputs["oauth2ProviderConfig"] = args?.oauth2ProviderConfig; resourceInputs["region"] = args?.region; resourceInputs["clientSecretArns"] = undefined /*out*/; resourceInputs["credentialProviderArn"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AgentcoreOauth2CredentialProvider.__pulumiType, name, resourceInputs, opts); } } exports.AgentcoreOauth2CredentialProvider = AgentcoreOauth2CredentialProvider; /** @internal */ AgentcoreOauth2CredentialProvider.__pulumiType = 'aws:bedrock/agentcoreOauth2CredentialProvider:AgentcoreOauth2CredentialProvider'; //# sourceMappingURL=agentcoreOauth2CredentialProvider.js.map