UNPKG

@pulumi/aws

Version:

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

86 lines 2.31 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.getPolicyOutput = exports.getPolicy = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * This data source can be used to fetch information about a specific * IAM policy. * * ## Example Usage * * ### By ARN * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.iam.getPolicy({ * arn: "arn:aws:iam::123456789012:policy/UsersManageOwnCredentials", * }); * ``` * * ### By Name * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.iam.getPolicy({ * name: "test_policy", * }); * ``` */ function getPolicy(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:iam/getPolicy:getPolicy", { "arn": args.arn, "name": args.name, "pathPrefix": args.pathPrefix, "tags": args.tags, }, opts); } exports.getPolicy = getPolicy; /** * This data source can be used to fetch information about a specific * IAM policy. * * ## Example Usage * * ### By ARN * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.iam.getPolicy({ * arn: "arn:aws:iam::123456789012:policy/UsersManageOwnCredentials", * }); * ``` * * ### By Name * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.iam.getPolicy({ * name: "test_policy", * }); * ``` */ function getPolicyOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:iam/getPolicy:getPolicy", { "arn": args.arn, "name": args.name, "pathPrefix": args.pathPrefix, "tags": args.tags, }, opts); } exports.getPolicyOutput = getPolicyOutput; //# sourceMappingURL=getPolicy.js.map