aws.opensearch.AuthorizeVpcEndpointAccess
Explore with Pulumi AI
Resource for managing an AWS OpenSearch Authorize Vpc Endpoint Access.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = aws.getCallerIdentity({});
const test = new aws.opensearch.AuthorizeVpcEndpointAccess("test", {
domainName: testAwsOpensearchDomain.domainName,
account: current.then(current => current.accountId),
});
import pulumi
import pulumi_aws as aws
current = aws.get_caller_identity()
test = aws.opensearch.AuthorizeVpcEndpointAccess("test",
domain_name=test_aws_opensearch_domain["domainName"],
account=current.account_id)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil)
if err != nil {
return err
}
_, err = opensearch.NewAuthorizeVpcEndpointAccess(ctx, "test", &opensearch.AuthorizeVpcEndpointAccessArgs{
DomainName: pulumi.Any(testAwsOpensearchDomain.DomainName),
Account: pulumi.String(current.AccountId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var current = Aws.GetCallerIdentity.Invoke();
var test = new Aws.OpenSearch.AuthorizeVpcEndpointAccess("test", new()
{
DomainName = testAwsOpensearchDomain.DomainName,
Account = current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetCallerIdentityArgs;
import com.pulumi.aws.opensearch.AuthorizeVpcEndpointAccess;
import com.pulumi.aws.opensearch.AuthorizeVpcEndpointAccessArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var current = AwsFunctions.getCallerIdentity();
var test = new AuthorizeVpcEndpointAccess("test", AuthorizeVpcEndpointAccessArgs.builder()
.domainName(testAwsOpensearchDomain.domainName())
.account(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
.build());
}
}
resources:
test:
type: aws:opensearch:AuthorizeVpcEndpointAccess
properties:
domainName: ${testAwsOpensearchDomain.domainName}
account: ${current.accountId}
variables:
current:
fn::invoke:
Function: aws:getCallerIdentity
Arguments: {}
Create AuthorizeVpcEndpointAccess Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AuthorizeVpcEndpointAccess(name: string, args: AuthorizeVpcEndpointAccessArgs, opts?: CustomResourceOptions);
@overload
def AuthorizeVpcEndpointAccess(resource_name: str,
args: AuthorizeVpcEndpointAccessArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AuthorizeVpcEndpointAccess(resource_name: str,
opts: Optional[ResourceOptions] = None,
account: Optional[str] = None,
domain_name: Optional[str] = None)
func NewAuthorizeVpcEndpointAccess(ctx *Context, name string, args AuthorizeVpcEndpointAccessArgs, opts ...ResourceOption) (*AuthorizeVpcEndpointAccess, error)
public AuthorizeVpcEndpointAccess(string name, AuthorizeVpcEndpointAccessArgs args, CustomResourceOptions? opts = null)
public AuthorizeVpcEndpointAccess(String name, AuthorizeVpcEndpointAccessArgs args)
public AuthorizeVpcEndpointAccess(String name, AuthorizeVpcEndpointAccessArgs args, CustomResourceOptions options)
type: aws:opensearch:AuthorizeVpcEndpointAccess
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AuthorizeVpcEndpointAccessArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AuthorizeVpcEndpointAccessArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AuthorizeVpcEndpointAccessArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthorizeVpcEndpointAccessArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AuthorizeVpcEndpointAccessArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var authorizeVpcEndpointAccessResource = new Aws.OpenSearch.AuthorizeVpcEndpointAccess("authorizeVpcEndpointAccessResource", new()
{
Account = "string",
DomainName = "string",
});
example, err := opensearch.NewAuthorizeVpcEndpointAccess(ctx, "authorizeVpcEndpointAccessResource", &opensearch.AuthorizeVpcEndpointAccessArgs{
Account: pulumi.String("string"),
DomainName: pulumi.String("string"),
})
var authorizeVpcEndpointAccessResource = new AuthorizeVpcEndpointAccess("authorizeVpcEndpointAccessResource", AuthorizeVpcEndpointAccessArgs.builder()
.account("string")
.domainName("string")
.build());
authorize_vpc_endpoint_access_resource = aws.opensearch.AuthorizeVpcEndpointAccess("authorizeVpcEndpointAccessResource",
account="string",
domain_name="string")
const authorizeVpcEndpointAccessResource = new aws.opensearch.AuthorizeVpcEndpointAccess("authorizeVpcEndpointAccessResource", {
account: "string",
domainName: "string",
});
type: aws:opensearch:AuthorizeVpcEndpointAccess
properties:
account: string
domainName: string
AuthorizeVpcEndpointAccess Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AuthorizeVpcEndpointAccess resource accepts the following input properties:
- Account string
- AWS account ID to grant access to.
- Domain
Name string - Name of OpenSearch Service domain to provide access to.
- Account string
- AWS account ID to grant access to.
- Domain
Name string - Name of OpenSearch Service domain to provide access to.
- account String
- AWS account ID to grant access to.
- domain
Name String - Name of OpenSearch Service domain to provide access to.
- account string
- AWS account ID to grant access to.
- domain
Name string - Name of OpenSearch Service domain to provide access to.
- account str
- AWS account ID to grant access to.
- domain_
name str - Name of OpenSearch Service domain to provide access to.
- account String
- AWS account ID to grant access to.
- domain
Name String - Name of OpenSearch Service domain to provide access to.
Outputs
All input properties are implicitly available as output properties. Additionally, the AuthorizeVpcEndpointAccess resource produces the following output properties:
- List<Authorize
Vpc Endpoint Access Authorized Principal> - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- Id string
- The provider-assigned unique ID for this managed resource.
- []Authorize
Vpc Endpoint Access Authorized Principal - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- Id string
- The provider-assigned unique ID for this managed resource.
- List<Authorize
Vpc Endpoint Access Authorized Principal> - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- id String
- The provider-assigned unique ID for this managed resource.
- Authorize
Vpc Endpoint Access Authorized Principal[] - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- id string
- The provider-assigned unique ID for this managed resource.
- Sequence[Authorize
Vpc Endpoint Access Authorized Principal] - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- id str
- The provider-assigned unique ID for this managed resource.
- List<Property Map>
- Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AuthorizeVpcEndpointAccess Resource
Get an existing AuthorizeVpcEndpointAccess resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AuthorizeVpcEndpointAccessState, opts?: CustomResourceOptions): AuthorizeVpcEndpointAccess
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account: Optional[str] = None,
authorized_principals: Optional[Sequence[AuthorizeVpcEndpointAccessAuthorizedPrincipalArgs]] = None,
domain_name: Optional[str] = None) -> AuthorizeVpcEndpointAccess
func GetAuthorizeVpcEndpointAccess(ctx *Context, name string, id IDInput, state *AuthorizeVpcEndpointAccessState, opts ...ResourceOption) (*AuthorizeVpcEndpointAccess, error)
public static AuthorizeVpcEndpointAccess Get(string name, Input<string> id, AuthorizeVpcEndpointAccessState? state, CustomResourceOptions? opts = null)
public static AuthorizeVpcEndpointAccess get(String name, Output<String> id, AuthorizeVpcEndpointAccessState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account string
- AWS account ID to grant access to.
- List<Authorize
Vpc Endpoint Access Authorized Principal> - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- Domain
Name string - Name of OpenSearch Service domain to provide access to.
- Account string
- AWS account ID to grant access to.
- []Authorize
Vpc Endpoint Access Authorized Principal Args - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- Domain
Name string - Name of OpenSearch Service domain to provide access to.
- account String
- AWS account ID to grant access to.
- List<Authorize
Vpc Endpoint Access Authorized Principal> - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- domain
Name String - Name of OpenSearch Service domain to provide access to.
- account string
- AWS account ID to grant access to.
- Authorize
Vpc Endpoint Access Authorized Principal[] - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- domain
Name string - Name of OpenSearch Service domain to provide access to.
- account str
- AWS account ID to grant access to.
- Sequence[Authorize
Vpc Endpoint Access Authorized Principal Args] - Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- domain_
name str - Name of OpenSearch Service domain to provide access to.
- account String
- AWS account ID to grant access to.
- List<Property Map>
- Information about the Amazon Web Services account or service that was provided access to the domain. See authorized principal attribute for further details.
- domain
Name String - Name of OpenSearch Service domain to provide access to.
Supporting Types
AuthorizeVpcEndpointAccessAuthorizedPrincipal, AuthorizeVpcEndpointAccessAuthorizedPrincipalArgs
- Principal string
- IAM principal that is allowed to access to the domain.
- Principal
Type string - Type of principal.
- Principal string
- IAM principal that is allowed to access to the domain.
- Principal
Type string - Type of principal.
- principal String
- IAM principal that is allowed to access to the domain.
- principal
Type String - Type of principal.
- principal string
- IAM principal that is allowed to access to the domain.
- principal
Type string - Type of principal.
- principal str
- IAM principal that is allowed to access to the domain.
- principal_
type str - Type of principal.
- principal String
- IAM principal that is allowed to access to the domain.
- principal
Type String - Type of principal.
Import
Using pulumi import
, import OpenSearch Authorize Vpc Endpoint Access using the example_id_arg
. For example:
$ pulumi import aws:opensearch/authorizeVpcEndpointAccess:AuthorizeVpcEndpointAccess example authorize_vpc_endpoint_access-id-12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.