@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
96 lines • 4.34 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.RiskConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Cognito Risk Configuration resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.cognito.RiskConfiguration("example", {
* userPoolId: exampleAwsCognitoUserPool.id,
* riskExceptionConfiguration: {
* blockedIpRangeLists: ["10.10.10.10/32"],
* },
* });
* ```
*
* ## Import
*
* Import using the user pool ID and Client ID separated by a `:`:
*
* __Using `pulumi import` to import__ Cognito Risk Configurations using the user pool ID or the user pool ID and Client Id separated by a `:`. For example:
*
* Import using the user pool ID:
*
* ```sh
* $ pulumi import aws:cognito/riskConfiguration:RiskConfiguration main example
* ```
* Import using the user pool ID and Client ID separated by a `:`:
*
* ```sh
* $ pulumi import aws:cognito/riskConfiguration:RiskConfiguration main example:example
* ```
*/
class RiskConfiguration extends pulumi.CustomResource {
/**
* Get an existing RiskConfiguration 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 RiskConfiguration(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of RiskConfiguration. 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'] === RiskConfiguration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accountTakeoverRiskConfiguration"] = state ? state.accountTakeoverRiskConfiguration : undefined;
resourceInputs["clientId"] = state ? state.clientId : undefined;
resourceInputs["compromisedCredentialsRiskConfiguration"] = state ? state.compromisedCredentialsRiskConfiguration : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["riskExceptionConfiguration"] = state ? state.riskExceptionConfiguration : undefined;
resourceInputs["userPoolId"] = state ? state.userPoolId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.userPoolId === undefined) && !opts.urn) {
throw new Error("Missing required property 'userPoolId'");
}
resourceInputs["accountTakeoverRiskConfiguration"] = args ? args.accountTakeoverRiskConfiguration : undefined;
resourceInputs["clientId"] = args ? args.clientId : undefined;
resourceInputs["compromisedCredentialsRiskConfiguration"] = args ? args.compromisedCredentialsRiskConfiguration : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["riskExceptionConfiguration"] = args ? args.riskExceptionConfiguration : undefined;
resourceInputs["userPoolId"] = args ? args.userPoolId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RiskConfiguration.__pulumiType, name, resourceInputs, opts);
}
}
exports.RiskConfiguration = RiskConfiguration;
/** @internal */
RiskConfiguration.__pulumiType = 'aws:cognito/riskConfiguration:RiskConfiguration';
//# sourceMappingURL=riskConfiguration.js.map