github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/aws-s3-logging-pp/dotnet/aws-s3-logging.cs (about)

     1  using System.Collections.Generic;
     2  using Pulumi;
     3  using Aws = Pulumi.Aws;
     4  
     5  return await Deployment.RunAsync(() => 
     6  {
     7      var logs = new Aws.S3.Bucket("logs");
     8  
     9      var bucket = new Aws.S3.Bucket("bucket", new()
    10      {
    11          Loggings = new[]
    12          {
    13              new Aws.S3.Inputs.BucketLoggingArgs
    14              {
    15                  TargetBucket = logs.BucketName,
    16              },
    17          },
    18      });
    19  
    20      return new Dictionary<string, object?>
    21      {
    22          ["targetBucket"] = bucket.Loggings.Apply(loggings => loggings[0]?.TargetBucket),
    23      };
    24  });
    25