@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
152 lines • 7.34 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The AuthConfig resource use to hold channels and connection config data.
*
* To get more information about AuthConfig, see:
*
* * [API documentation](https://cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.authConfigs)
* * How-to Guides
* * [Manage authentication profiles](https://cloud.google.com/application-integration/docs/configure-authentication-profiles)
* * [Official Documentation](https://cloud.google.com/application-integration/docs/overview)
*
* ## Example Usage
*
* ### Integrations Auth Config Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const client = new gcp.applicationintegration.Client("client", {location: "us-west1"});
* const basicExample = new gcp.applicationintegration.AuthConfig("basic_example", {
* location: "us-west1",
* displayName: "test-authconfig",
* description: "Test auth config created via terraform",
* decryptedCredential: {
* credentialType: "USERNAME_AND_PASSWORD",
* usernameAndPassword: {
* username: "test-username",
* password: "test-password",
* },
* },
* }, {
* dependsOn: [client],
* });
* ```
*
* ## Import
*
* AuthConfig can be imported using any of these accepted formats:
*
* * `{{project}}/{{name}}`
*
* * `{{project}} {{name}}`
*
* * `{{name}}`
*
* When using the `pulumi import` command, AuthConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:applicationintegration/authConfig:AuthConfig default {{project}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:applicationintegration/authConfig:AuthConfig default "{{project}} {{name}}"
* ```
*
* ```sh
* $ pulumi import gcp:applicationintegration/authConfig:AuthConfig default {{name}}
* ```
*/
class AuthConfig extends pulumi.CustomResource {
/**
* Get an existing AuthConfig 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 AuthConfig(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AuthConfig. 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'] === AuthConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["certificateId"] = state ? state.certificateId : undefined;
resourceInputs["clientCertificate"] = state ? state.clientCertificate : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["creatorEmail"] = state ? state.creatorEmail : undefined;
resourceInputs["credentialType"] = state ? state.credentialType : undefined;
resourceInputs["decryptedCredential"] = state ? state.decryptedCredential : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["encryptedCredential"] = state ? state.encryptedCredential : undefined;
resourceInputs["expiryNotificationDurations"] = state ? state.expiryNotificationDurations : undefined;
resourceInputs["lastModifierEmail"] = state ? state.lastModifierEmail : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["overrideValidTime"] = state ? state.overrideValidTime : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["reason"] = state ? state.reason : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
resourceInputs["validTime"] = state ? state.validTime : undefined;
resourceInputs["visibility"] = state ? state.visibility : undefined;
}
else {
const args = argsOrState;
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["clientCertificate"] = args ? args.clientCertificate : undefined;
resourceInputs["decryptedCredential"] = args ? args.decryptedCredential : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["expiryNotificationDurations"] = args ? args.expiryNotificationDurations : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["overrideValidTime"] = args ? args.overrideValidTime : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["visibility"] = args ? args.visibility : undefined;
resourceInputs["certificateId"] = undefined /*out*/;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["creatorEmail"] = undefined /*out*/;
resourceInputs["credentialType"] = undefined /*out*/;
resourceInputs["encryptedCredential"] = undefined /*out*/;
resourceInputs["lastModifierEmail"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["reason"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
resourceInputs["validTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AuthConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.AuthConfig = AuthConfig;
/** @internal */
AuthConfig.__pulumiType = 'gcp:applicationintegration/authConfig:AuthConfig';
//# sourceMappingURL=authConfig.js.map