Show / Hide Table of Contents

Class GetServiceAccount

Inheritance
System.Object
GetServiceAccount
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ElasticLoadBalancing
Assembly: Pulumi.Aws.dll
Syntax
[Obsolete("aws.elasticloadbalancing.getServiceAccount has been deprecated in favor of aws.elb.getServiceAccount")]
public static class GetServiceAccount

Methods

View Source

InvokeAsync(GetServiceAccountArgs, InvokeOptions)

Use this data source to get the Account ID of the AWS Elastic Load Balancing Service Account in a given region for the purpose of whitelisting in S3 bucket policy.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var main = Output.Create(Aws.Elb.GetServiceAccount.InvokeAsync());
    var elbLogs = new Aws.S3.Bucket("elbLogs", new Aws.S3.BucketArgs
    {
        Acl = "private",
        Policy = main.Apply(main => @$"{{
""Id"": ""Policy"",
""Version"": ""2012-10-17"",
""Statement"": [
{{
  ""Action"": [
    ""s3:PutObject""
  ],
  ""Effect"": ""Allow"",
  ""Resource"": ""arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*"",
  ""Principal"": {{
    ""AWS"": [
      ""{main.Arn}""
    ]
  }}
}}
]
}}

"),
    });
    var bar = new Aws.Elb.LoadBalancer("bar", new Aws.Elb.LoadBalancerArgs
    {
        AccessLogs = new Aws.Elb.Inputs.LoadBalancerAccessLogsArgs
        {
            Bucket = elbLogs.BucketName,
            Interval = 5,
        },
        AvailabilityZones = 
        {
            "us-west-2a",
        },
        Listeners = 
        {
            new Aws.Elb.Inputs.LoadBalancerListenerArgs
            {
                InstancePort = 8000,
                InstanceProtocol = "http",
                LbPort = 80,
                LbProtocol = "http",
            },
        },
    });
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetServiceAccountResult> InvokeAsync(GetServiceAccountArgs args = null, InvokeOptions options = null)
Parameters
Type Name Description
GetServiceAccountArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetServiceAccountResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.