UNPKG

@pulumi/aws

Version:

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

80 lines 2.37 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.getProtectionOutput = exports.getProtection = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Data source for managing an AWS Shield Protection. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.shield.getProtection({ * protectionId: "abc123", * }); * ``` * * ### By Resource ARN * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.shield.getProtection({ * resourceArn: "arn:aws:globalaccelerator::123456789012:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh", * }); * ``` */ function getProtection(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:shield/getProtection:getProtection", { "protectionId": args.protectionId, "resourceArn": args.resourceArn, }, opts); } exports.getProtection = getProtection; /** * Data source for managing an AWS Shield Protection. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.shield.getProtection({ * protectionId: "abc123", * }); * ``` * * ### By Resource ARN * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.shield.getProtection({ * resourceArn: "arn:aws:globalaccelerator::123456789012:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh", * }); * ``` */ function getProtectionOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:shield/getProtection:getProtection", { "protectionId": args.protectionId, "resourceArn": args.resourceArn, }, opts); } exports.getProtectionOutput = getProtectionOutput; //# sourceMappingURL=getProtection.js.map