@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
100 lines • 4.17 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.getLogDeliveryCanonicalUserIdOutput = exports.getLogDeliveryCanonicalUserId = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The CloudFront Log Delivery Canonical User ID data source allows access to the [canonical user ID](http://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html) of the AWS `awslogsdelivery` account for CloudFront bucket logging.
* See the [Amazon CloudFront Developer Guide](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) for more information.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.s3.getCanonicalUserId({});
* const example = aws.cloudfront.getLogDeliveryCanonicalUserId({});
* const exampleBucket = new aws.s3.Bucket("example", {bucket: "example"});
* const exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls("example", {
* bucket: exampleBucket.id,
* rule: {
* objectOwnership: "BucketOwnerPreferred",
* },
* });
* const exampleBucketAcl = new aws.s3.BucketAcl("example", {
* bucket: exampleBucket.id,
* accessControlPolicy: {
* grants: [{
* grantee: {
* id: example.then(example => example.id),
* type: "CanonicalUser",
* },
* permission: "FULL_CONTROL",
* }],
* owner: {
* id: current.then(current => current.id),
* },
* },
* }, {
* dependsOn: [exampleBucketOwnershipControls],
* });
* ```
*/
function getLogDeliveryCanonicalUserId(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:cloudfront/getLogDeliveryCanonicalUserId:getLogDeliveryCanonicalUserId", {
"region": args.region,
}, opts);
}
exports.getLogDeliveryCanonicalUserId = getLogDeliveryCanonicalUserId;
/**
* The CloudFront Log Delivery Canonical User ID data source allows access to the [canonical user ID](http://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html) of the AWS `awslogsdelivery` account for CloudFront bucket logging.
* See the [Amazon CloudFront Developer Guide](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) for more information.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.s3.getCanonicalUserId({});
* const example = aws.cloudfront.getLogDeliveryCanonicalUserId({});
* const exampleBucket = new aws.s3.Bucket("example", {bucket: "example"});
* const exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls("example", {
* bucket: exampleBucket.id,
* rule: {
* objectOwnership: "BucketOwnerPreferred",
* },
* });
* const exampleBucketAcl = new aws.s3.BucketAcl("example", {
* bucket: exampleBucket.id,
* accessControlPolicy: {
* grants: [{
* grantee: {
* id: example.then(example => example.id),
* type: "CanonicalUser",
* },
* permission: "FULL_CONTROL",
* }],
* owner: {
* id: current.then(current => current.id),
* },
* },
* }, {
* dependsOn: [exampleBucketOwnershipControls],
* });
* ```
*/
function getLogDeliveryCanonicalUserIdOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:cloudfront/getLogDeliveryCanonicalUserId:getLogDeliveryCanonicalUserId", {
"region": args.region,
}, opts);
}
exports.getLogDeliveryCanonicalUserIdOutput = getLogDeliveryCanonicalUserIdOutput;
//# sourceMappingURL=getLogDeliveryCanonicalUserId.js.map