Show / Hide Table of Contents

Class DomainPolicy

Allows setting policy to an Elasticsearch domain while referencing domain attributes (e.g. ARN)

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.ElasticSearch.Domain("example", new Aws.ElasticSearch.DomainArgs
    {
        ElasticsearchVersion = "2.3",
    });
    var main = new Aws.ElasticSearch.DomainPolicy("main", new Aws.ElasticSearch.DomainPolicyArgs
    {
        AccessPolicies = example.Arn.Apply(arn => @$"{{
""Version"": ""2012-10-17"",
""Statement"": [
    {{
        ""Action"": ""es:*"",
        ""Principal"": ""*"",
        ""Effect"": ""Allow"",
        ""Condition"": {{
            ""IpAddress"": {{""aws:SourceIp"": ""127.0.0.1/32""}}
        }},
        ""Resource"": ""{arn}/*""
    }}
]
}}

"),
        DomainName = example.DomainName,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
DomainPolicy
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
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.ElasticSearch
Assembly: Pulumi.Aws.dll
Syntax
public class DomainPolicy : CustomResource

Constructors

View Source

DomainPolicy(String, DomainPolicyArgs, CustomResourceOptions)

Create a DomainPolicy resource with the given unique name, arguments, and options.

Declaration
public DomainPolicy(string name, DomainPolicyArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

DomainPolicyArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AccessPolicies

IAM policy document specifying the access policies for the domain

Declaration
public Output<string> AccessPolicies { get; }
Property Value
Type Description
Output<System.String>
View Source

DomainName

Name of the domain.

Declaration
public Output<string> DomainName { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, DomainPolicyState, CustomResourceOptions)

Get an existing DomainPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static DomainPolicy Get(string name, Input<string> id, DomainPolicyState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

DomainPolicyState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
DomainPolicy
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.