@pulumi/azuread
Version:
A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.
93 lines • 3.5 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.NamedLocation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuread from "@pulumi/azuread";
*
* const example_ip = new azuread.NamedLocation("example-ip", {
* displayName: "IP Named Location",
* ip: {
* ipRanges: [
* "1.1.1.1/32",
* "2.2.2.2/32",
* ],
* trusted: true,
* },
* });
* const example_country = new azuread.NamedLocation("example-country", {
* displayName: "Country Named Location",
* country: {
* countriesAndRegions: [
* "GB",
* "US",
* ],
* includeUnknownCountriesAndRegions: false,
* },
* });
* ```
*
* ## Import
*
* Named Locations can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import azuread:index/namedLocation:NamedLocation my_location /identity/conditionalAccess/namedLocations/00000000-0000-0000-0000-000000000000
* ```
*/
class NamedLocation extends pulumi.CustomResource {
/**
* Get an existing NamedLocation 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 NamedLocation(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of NamedLocation. 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'] === NamedLocation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["country"] = state ? state.country : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["ip"] = state ? state.ip : undefined;
}
else {
const args = argsOrState;
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["country"] = args ? args.country : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["ip"] = args ? args.ip : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(NamedLocation.__pulumiType, name, resourceInputs, opts);
}
}
exports.NamedLocation = NamedLocation;
/** @internal */
NamedLocation.__pulumiType = 'azuread:index/namedLocation:NamedLocation';
//# sourceMappingURL=namedLocation.js.map