@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
151 lines • 7.86 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.SamlConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a [Sumologic SAML Configuration](https://help.sumologic.com/Manage/Security/SAML/01-Set-Up-SAML-for-Single-Sign-On).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const exampleSamlConfiguration = new sumologic.SamlConfiguration("exampleSamlConfiguration", {
* spInitiatedLoginPath: "",
* configurationName: "SumoLogic",
* issuer: "http://www.okta.com/abxcseyuiwelflkdjh",
* spInitiatedLoginEnabled: false,
* authnRequestUrl: "",
* x509cert1: "string",
* x509cert2: "",
* x509cert3: "",
* onDemandProvisioningEnabled: {
* firstNameAttribute: "firstName",
* lastNameAttribute: "lastName",
* onDemandProvisioningRoles: ["Administrator"],
* },
* rolesAttribute: "Administrator",
* logoutEnabled: false,
* logoutUrl: "",
* emailAttribute: "",
* debugMode: false,
* signAuthnRequest: false,
* disableRequestedAuthnContext: false,
* isRedirectBinding: false,
* });
* ```
*
* ## Attributes reference
*
* The following attributes are exported:
*
* - `id` - Unique identifier for the SAML Configuration.
* - `certificate` - Authentication Request Signing Certificate for the user.
* - `assertionConsumerUrl` - The URL on Sumo Logic where the IdP will redirect to with its authentication response.
* - `entityId` - A unique identifier that is the intended audience of the SAML assertion.
*
* ## Import
*
* SAML Configuration can be imported using the SAML configuration id, e.g.:
*
* hcl
*
* ```sh
* $ pulumi import sumologic:index/samlConfiguration:SamlConfiguration example 00000000454A5979
* ```
*
* [1]: https://help.sumologic.com/Manage/Security/SAML/01-Set-Up-SAML-for-Single-Sign-On
*/
class SamlConfiguration extends pulumi.CustomResource {
/**
* Get an existing SamlConfiguration 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 SamlConfiguration(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SamlConfiguration. 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'] === SamlConfiguration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["assertionConsumerUrl"] = state ? state.assertionConsumerUrl : undefined;
resourceInputs["authnRequestUrl"] = state ? state.authnRequestUrl : undefined;
resourceInputs["certificate"] = state ? state.certificate : undefined;
resourceInputs["configurationName"] = state ? state.configurationName : undefined;
resourceInputs["debugMode"] = state ? state.debugMode : undefined;
resourceInputs["disableRequestedAuthnContext"] = state ? state.disableRequestedAuthnContext : undefined;
resourceInputs["emailAttribute"] = state ? state.emailAttribute : undefined;
resourceInputs["entityId"] = state ? state.entityId : undefined;
resourceInputs["isRedirectBinding"] = state ? state.isRedirectBinding : undefined;
resourceInputs["issuer"] = state ? state.issuer : undefined;
resourceInputs["logoutEnabled"] = state ? state.logoutEnabled : undefined;
resourceInputs["logoutUrl"] = state ? state.logoutUrl : undefined;
resourceInputs["onDemandProvisioningEnabled"] = state ? state.onDemandProvisioningEnabled : undefined;
resourceInputs["rolesAttribute"] = state ? state.rolesAttribute : undefined;
resourceInputs["signAuthnRequest"] = state ? state.signAuthnRequest : undefined;
resourceInputs["spInitiatedLoginEnabled"] = state ? state.spInitiatedLoginEnabled : undefined;
resourceInputs["spInitiatedLoginPath"] = state ? state.spInitiatedLoginPath : undefined;
resourceInputs["x509cert1"] = state ? state.x509cert1 : undefined;
resourceInputs["x509cert2"] = state ? state.x509cert2 : undefined;
resourceInputs["x509cert3"] = state ? state.x509cert3 : undefined;
}
else {
const args = argsOrState;
if ((!args || args.configurationName === undefined) && !opts.urn) {
throw new Error("Missing required property 'configurationName'");
}
if ((!args || args.issuer === undefined) && !opts.urn) {
throw new Error("Missing required property 'issuer'");
}
if ((!args || args.x509cert1 === undefined) && !opts.urn) {
throw new Error("Missing required property 'x509cert1'");
}
resourceInputs["authnRequestUrl"] = args ? args.authnRequestUrl : undefined;
resourceInputs["configurationName"] = args ? args.configurationName : undefined;
resourceInputs["debugMode"] = args ? args.debugMode : undefined;
resourceInputs["disableRequestedAuthnContext"] = args ? args.disableRequestedAuthnContext : undefined;
resourceInputs["emailAttribute"] = args ? args.emailAttribute : undefined;
resourceInputs["isRedirectBinding"] = args ? args.isRedirectBinding : undefined;
resourceInputs["issuer"] = args ? args.issuer : undefined;
resourceInputs["logoutEnabled"] = args ? args.logoutEnabled : undefined;
resourceInputs["logoutUrl"] = args ? args.logoutUrl : undefined;
resourceInputs["onDemandProvisioningEnabled"] = args ? args.onDemandProvisioningEnabled : undefined;
resourceInputs["rolesAttribute"] = args ? args.rolesAttribute : undefined;
resourceInputs["signAuthnRequest"] = args ? args.signAuthnRequest : undefined;
resourceInputs["spInitiatedLoginEnabled"] = args ? args.spInitiatedLoginEnabled : undefined;
resourceInputs["spInitiatedLoginPath"] = args ? args.spInitiatedLoginPath : undefined;
resourceInputs["x509cert1"] = args ? args.x509cert1 : undefined;
resourceInputs["x509cert2"] = args ? args.x509cert2 : undefined;
resourceInputs["x509cert3"] = args ? args.x509cert3 : undefined;
resourceInputs["assertionConsumerUrl"] = undefined /*out*/;
resourceInputs["certificate"] = undefined /*out*/;
resourceInputs["entityId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SamlConfiguration.__pulumiType, name, resourceInputs, opts);
}
}
exports.SamlConfiguration = SamlConfiguration;
/** @internal */
SamlConfiguration.__pulumiType = 'sumologic:index/samlConfiguration:SamlConfiguration';
//# sourceMappingURL=samlConfiguration.js.map