? VpcEndpointServiceId { get; set; }
+
+ public VpcEndpointServiceAllowedPrincipalState()
+ {
+ }
+ public static new VpcEndpointServiceAllowedPrincipalState Empty => new VpcEndpointServiceAllowedPrincipalState();
+ }
+}
diff --git a/sdk/dotnet/Ec2/VpcEndpointServiceAllowedPrinciple.cs b/sdk/dotnet/Ec2/VpcEndpointServiceAllowedPrinciple.cs
index 95191cd6a0e..9872ccfda92 100644
--- a/sdk/dotnet/Ec2/VpcEndpointServiceAllowedPrinciple.cs
+++ b/sdk/dotnet/Ec2/VpcEndpointServiceAllowedPrinciple.cs
@@ -32,7 +32,7 @@ namespace Pulumi.Aws.Ec2
/// {
/// var current = Aws.GetCallerIdentity.Invoke();
///
- /// var allowMeToFoo = new Aws.Ec2.VpcEndpointServiceAllowedPrinciple("allow_me_to_foo", new()
+ /// var allowMeToFoo = new Aws.Ec2.VpcEndpointServiceAllowedPrincipal("allow_me_to_foo", new()
/// {
/// VpcEndpointServiceId = foo.Id,
/// PrincipalArn = current.Apply(getCallerIdentityResult => getCallerIdentityResult.Arn),
@@ -41,6 +41,7 @@ namespace Pulumi.Aws.Ec2
/// });
/// ```
///
+ [Obsolete(@"aws.ec2/vpcendpointserviceallowedprinciple.VpcEndpointServiceAllowedPrinciple has been deprecated in favor of aws.ec2/vpcendpointserviceallowedprincipal.VpcEndpointServiceAllowedPrincipal")]
[AwsResourceType("aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple")]
public partial class VpcEndpointServiceAllowedPrinciple : global::Pulumi.CustomResource
{
@@ -79,6 +80,10 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
+ Aliases =
+ {
+ new global::Pulumi.Alias { Type = "aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple" },
+ },
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
diff --git a/sdk/go/aws/ec2/init.go b/sdk/go/aws/ec2/init.go
index ac4d0e3e05b..d8d1b522676 100644
--- a/sdk/go/aws/ec2/init.go
+++ b/sdk/go/aws/ec2/init.go
@@ -177,6 +177,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi
r = &VpcEndpointRouteTableAssociation{}
case "aws:ec2/vpcEndpointService:VpcEndpointService":
r = &VpcEndpointService{}
+ case "aws:ec2/vpcEndpointServiceAllowedPrincipal:VpcEndpointServiceAllowedPrincipal":
+ r = &VpcEndpointServiceAllowedPrincipal{}
case "aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple":
r = &VpcEndpointServiceAllowedPrinciple{}
case "aws:ec2/vpcEndpointSubnetAssociation:VpcEndpointSubnetAssociation":
@@ -622,6 +624,11 @@ func init() {
"ec2/vpcEndpointService",
&module{version},
)
+ pulumi.RegisterResourceModule(
+ "aws",
+ "ec2/vpcEndpointServiceAllowedPrincipal",
+ &module{version},
+ )
pulumi.RegisterResourceModule(
"aws",
"ec2/vpcEndpointServiceAllowedPrinciple",
diff --git a/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrincipal.go b/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrincipal.go
new file mode 100644
index 00000000000..570795741f0
--- /dev/null
+++ b/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrincipal.go
@@ -0,0 +1,283 @@
+// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
+// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
+
+package ec2
+
+import (
+ "context"
+ "reflect"
+
+ "errors"
+ "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
+ "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+)
+
+// Provides a resource to allow a principal to discover a VPC endpoint service.
+//
+// > **NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals:** This provider provides
+// both a standalone VPC Endpoint Service Allowed Principal resource
+// and a VPC Endpoint Service resource with an `allowedPrincipals` attribute. Do not use the same principal ARN in both
+// a VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict
+// and will overwrite the association.
+//
+// ## Example Usage
+//
+// Basic usage:
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
+// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
+// "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 = ec2.NewVpcEndpointServiceAllowedPrincipal(ctx, "allow_me_to_foo", &ec2.VpcEndpointServiceAllowedPrincipalArgs{
+// VpcEndpointServiceId: pulumi.Any(foo.Id),
+// PrincipalArn: pulumi.String(current.Arn),
+// })
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
+type VpcEndpointServiceAllowedPrincipal struct {
+ pulumi.CustomResourceState
+
+ // The ARN of the principal to allow permissions.
+ PrincipalArn pulumi.StringOutput `pulumi:"principalArn"`
+ // The ID of the VPC endpoint service to allow permission.
+ VpcEndpointServiceId pulumi.StringOutput `pulumi:"vpcEndpointServiceId"`
+}
+
+// NewVpcEndpointServiceAllowedPrincipal registers a new resource with the given unique name, arguments, and options.
+func NewVpcEndpointServiceAllowedPrincipal(ctx *pulumi.Context,
+ name string, args *VpcEndpointServiceAllowedPrincipalArgs, opts ...pulumi.ResourceOption) (*VpcEndpointServiceAllowedPrincipal, error) {
+ if args == nil {
+ return nil, errors.New("missing one or more required arguments")
+ }
+
+ if args.PrincipalArn == nil {
+ return nil, errors.New("invalid value for required argument 'PrincipalArn'")
+ }
+ if args.VpcEndpointServiceId == nil {
+ return nil, errors.New("invalid value for required argument 'VpcEndpointServiceId'")
+ }
+ aliases := pulumi.Aliases([]pulumi.Alias{
+ {
+ Type: pulumi.String("aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple"),
+ },
+ })
+ opts = append(opts, aliases)
+ opts = internal.PkgResourceDefaultOpts(opts)
+ var resource VpcEndpointServiceAllowedPrincipal
+ err := ctx.RegisterResource("aws:ec2/vpcEndpointServiceAllowedPrincipal:VpcEndpointServiceAllowedPrincipal", name, args, &resource, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &resource, nil
+}
+
+// GetVpcEndpointServiceAllowedPrincipal gets an existing VpcEndpointServiceAllowedPrincipal resource's state with the given name, ID, and optional
+// state properties that are used to uniquely qualify the lookup (nil if not required).
+func GetVpcEndpointServiceAllowedPrincipal(ctx *pulumi.Context,
+ name string, id pulumi.IDInput, state *VpcEndpointServiceAllowedPrincipalState, opts ...pulumi.ResourceOption) (*VpcEndpointServiceAllowedPrincipal, error) {
+ var resource VpcEndpointServiceAllowedPrincipal
+ err := ctx.ReadResource("aws:ec2/vpcEndpointServiceAllowedPrincipal:VpcEndpointServiceAllowedPrincipal", name, id, state, &resource, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &resource, nil
+}
+
+// Input properties used for looking up and filtering VpcEndpointServiceAllowedPrincipal resources.
+type vpcEndpointServiceAllowedPrincipalState struct {
+ // The ARN of the principal to allow permissions.
+ PrincipalArn *string `pulumi:"principalArn"`
+ // The ID of the VPC endpoint service to allow permission.
+ VpcEndpointServiceId *string `pulumi:"vpcEndpointServiceId"`
+}
+
+type VpcEndpointServiceAllowedPrincipalState struct {
+ // The ARN of the principal to allow permissions.
+ PrincipalArn pulumi.StringPtrInput
+ // The ID of the VPC endpoint service to allow permission.
+ VpcEndpointServiceId pulumi.StringPtrInput
+}
+
+func (VpcEndpointServiceAllowedPrincipalState) ElementType() reflect.Type {
+ return reflect.TypeOf((*vpcEndpointServiceAllowedPrincipalState)(nil)).Elem()
+}
+
+type vpcEndpointServiceAllowedPrincipalArgs struct {
+ // The ARN of the principal to allow permissions.
+ PrincipalArn string `pulumi:"principalArn"`
+ // The ID of the VPC endpoint service to allow permission.
+ VpcEndpointServiceId string `pulumi:"vpcEndpointServiceId"`
+}
+
+// The set of arguments for constructing a VpcEndpointServiceAllowedPrincipal resource.
+type VpcEndpointServiceAllowedPrincipalArgs struct {
+ // The ARN of the principal to allow permissions.
+ PrincipalArn pulumi.StringInput
+ // The ID of the VPC endpoint service to allow permission.
+ VpcEndpointServiceId pulumi.StringInput
+}
+
+func (VpcEndpointServiceAllowedPrincipalArgs) ElementType() reflect.Type {
+ return reflect.TypeOf((*vpcEndpointServiceAllowedPrincipalArgs)(nil)).Elem()
+}
+
+type VpcEndpointServiceAllowedPrincipalInput interface {
+ pulumi.Input
+
+ ToVpcEndpointServiceAllowedPrincipalOutput() VpcEndpointServiceAllowedPrincipalOutput
+ ToVpcEndpointServiceAllowedPrincipalOutputWithContext(ctx context.Context) VpcEndpointServiceAllowedPrincipalOutput
+}
+
+func (*VpcEndpointServiceAllowedPrincipal) ElementType() reflect.Type {
+ return reflect.TypeOf((**VpcEndpointServiceAllowedPrincipal)(nil)).Elem()
+}
+
+func (i *VpcEndpointServiceAllowedPrincipal) ToVpcEndpointServiceAllowedPrincipalOutput() VpcEndpointServiceAllowedPrincipalOutput {
+ return i.ToVpcEndpointServiceAllowedPrincipalOutputWithContext(context.Background())
+}
+
+func (i *VpcEndpointServiceAllowedPrincipal) ToVpcEndpointServiceAllowedPrincipalOutputWithContext(ctx context.Context) VpcEndpointServiceAllowedPrincipalOutput {
+ return pulumi.ToOutputWithContext(ctx, i).(VpcEndpointServiceAllowedPrincipalOutput)
+}
+
+// VpcEndpointServiceAllowedPrincipalArrayInput is an input type that accepts VpcEndpointServiceAllowedPrincipalArray and VpcEndpointServiceAllowedPrincipalArrayOutput values.
+// You can construct a concrete instance of `VpcEndpointServiceAllowedPrincipalArrayInput` via:
+//
+// VpcEndpointServiceAllowedPrincipalArray{ VpcEndpointServiceAllowedPrincipalArgs{...} }
+type VpcEndpointServiceAllowedPrincipalArrayInput interface {
+ pulumi.Input
+
+ ToVpcEndpointServiceAllowedPrincipalArrayOutput() VpcEndpointServiceAllowedPrincipalArrayOutput
+ ToVpcEndpointServiceAllowedPrincipalArrayOutputWithContext(context.Context) VpcEndpointServiceAllowedPrincipalArrayOutput
+}
+
+type VpcEndpointServiceAllowedPrincipalArray []VpcEndpointServiceAllowedPrincipalInput
+
+func (VpcEndpointServiceAllowedPrincipalArray) ElementType() reflect.Type {
+ return reflect.TypeOf((*[]*VpcEndpointServiceAllowedPrincipal)(nil)).Elem()
+}
+
+func (i VpcEndpointServiceAllowedPrincipalArray) ToVpcEndpointServiceAllowedPrincipalArrayOutput() VpcEndpointServiceAllowedPrincipalArrayOutput {
+ return i.ToVpcEndpointServiceAllowedPrincipalArrayOutputWithContext(context.Background())
+}
+
+func (i VpcEndpointServiceAllowedPrincipalArray) ToVpcEndpointServiceAllowedPrincipalArrayOutputWithContext(ctx context.Context) VpcEndpointServiceAllowedPrincipalArrayOutput {
+ return pulumi.ToOutputWithContext(ctx, i).(VpcEndpointServiceAllowedPrincipalArrayOutput)
+}
+
+// VpcEndpointServiceAllowedPrincipalMapInput is an input type that accepts VpcEndpointServiceAllowedPrincipalMap and VpcEndpointServiceAllowedPrincipalMapOutput values.
+// You can construct a concrete instance of `VpcEndpointServiceAllowedPrincipalMapInput` via:
+//
+// VpcEndpointServiceAllowedPrincipalMap{ "key": VpcEndpointServiceAllowedPrincipalArgs{...} }
+type VpcEndpointServiceAllowedPrincipalMapInput interface {
+ pulumi.Input
+
+ ToVpcEndpointServiceAllowedPrincipalMapOutput() VpcEndpointServiceAllowedPrincipalMapOutput
+ ToVpcEndpointServiceAllowedPrincipalMapOutputWithContext(context.Context) VpcEndpointServiceAllowedPrincipalMapOutput
+}
+
+type VpcEndpointServiceAllowedPrincipalMap map[string]VpcEndpointServiceAllowedPrincipalInput
+
+func (VpcEndpointServiceAllowedPrincipalMap) ElementType() reflect.Type {
+ return reflect.TypeOf((*map[string]*VpcEndpointServiceAllowedPrincipal)(nil)).Elem()
+}
+
+func (i VpcEndpointServiceAllowedPrincipalMap) ToVpcEndpointServiceAllowedPrincipalMapOutput() VpcEndpointServiceAllowedPrincipalMapOutput {
+ return i.ToVpcEndpointServiceAllowedPrincipalMapOutputWithContext(context.Background())
+}
+
+func (i VpcEndpointServiceAllowedPrincipalMap) ToVpcEndpointServiceAllowedPrincipalMapOutputWithContext(ctx context.Context) VpcEndpointServiceAllowedPrincipalMapOutput {
+ return pulumi.ToOutputWithContext(ctx, i).(VpcEndpointServiceAllowedPrincipalMapOutput)
+}
+
+type VpcEndpointServiceAllowedPrincipalOutput struct{ *pulumi.OutputState }
+
+func (VpcEndpointServiceAllowedPrincipalOutput) ElementType() reflect.Type {
+ return reflect.TypeOf((**VpcEndpointServiceAllowedPrincipal)(nil)).Elem()
+}
+
+func (o VpcEndpointServiceAllowedPrincipalOutput) ToVpcEndpointServiceAllowedPrincipalOutput() VpcEndpointServiceAllowedPrincipalOutput {
+ return o
+}
+
+func (o VpcEndpointServiceAllowedPrincipalOutput) ToVpcEndpointServiceAllowedPrincipalOutputWithContext(ctx context.Context) VpcEndpointServiceAllowedPrincipalOutput {
+ return o
+}
+
+// The ARN of the principal to allow permissions.
+func (o VpcEndpointServiceAllowedPrincipalOutput) PrincipalArn() pulumi.StringOutput {
+ return o.ApplyT(func(v *VpcEndpointServiceAllowedPrincipal) pulumi.StringOutput { return v.PrincipalArn }).(pulumi.StringOutput)
+}
+
+// The ID of the VPC endpoint service to allow permission.
+func (o VpcEndpointServiceAllowedPrincipalOutput) VpcEndpointServiceId() pulumi.StringOutput {
+ return o.ApplyT(func(v *VpcEndpointServiceAllowedPrincipal) pulumi.StringOutput { return v.VpcEndpointServiceId }).(pulumi.StringOutput)
+}
+
+type VpcEndpointServiceAllowedPrincipalArrayOutput struct{ *pulumi.OutputState }
+
+func (VpcEndpointServiceAllowedPrincipalArrayOutput) ElementType() reflect.Type {
+ return reflect.TypeOf((*[]*VpcEndpointServiceAllowedPrincipal)(nil)).Elem()
+}
+
+func (o VpcEndpointServiceAllowedPrincipalArrayOutput) ToVpcEndpointServiceAllowedPrincipalArrayOutput() VpcEndpointServiceAllowedPrincipalArrayOutput {
+ return o
+}
+
+func (o VpcEndpointServiceAllowedPrincipalArrayOutput) ToVpcEndpointServiceAllowedPrincipalArrayOutputWithContext(ctx context.Context) VpcEndpointServiceAllowedPrincipalArrayOutput {
+ return o
+}
+
+func (o VpcEndpointServiceAllowedPrincipalArrayOutput) Index(i pulumi.IntInput) VpcEndpointServiceAllowedPrincipalOutput {
+ return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpcEndpointServiceAllowedPrincipal {
+ return vs[0].([]*VpcEndpointServiceAllowedPrincipal)[vs[1].(int)]
+ }).(VpcEndpointServiceAllowedPrincipalOutput)
+}
+
+type VpcEndpointServiceAllowedPrincipalMapOutput struct{ *pulumi.OutputState }
+
+func (VpcEndpointServiceAllowedPrincipalMapOutput) ElementType() reflect.Type {
+ return reflect.TypeOf((*map[string]*VpcEndpointServiceAllowedPrincipal)(nil)).Elem()
+}
+
+func (o VpcEndpointServiceAllowedPrincipalMapOutput) ToVpcEndpointServiceAllowedPrincipalMapOutput() VpcEndpointServiceAllowedPrincipalMapOutput {
+ return o
+}
+
+func (o VpcEndpointServiceAllowedPrincipalMapOutput) ToVpcEndpointServiceAllowedPrincipalMapOutputWithContext(ctx context.Context) VpcEndpointServiceAllowedPrincipalMapOutput {
+ return o
+}
+
+func (o VpcEndpointServiceAllowedPrincipalMapOutput) MapIndex(k pulumi.StringInput) VpcEndpointServiceAllowedPrincipalOutput {
+ return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpcEndpointServiceAllowedPrincipal {
+ return vs[0].(map[string]*VpcEndpointServiceAllowedPrincipal)[vs[1].(string)]
+ }).(VpcEndpointServiceAllowedPrincipalOutput)
+}
+
+func init() {
+ pulumi.RegisterInputType(reflect.TypeOf((*VpcEndpointServiceAllowedPrincipalInput)(nil)).Elem(), &VpcEndpointServiceAllowedPrincipal{})
+ pulumi.RegisterInputType(reflect.TypeOf((*VpcEndpointServiceAllowedPrincipalArrayInput)(nil)).Elem(), VpcEndpointServiceAllowedPrincipalArray{})
+ pulumi.RegisterInputType(reflect.TypeOf((*VpcEndpointServiceAllowedPrincipalMapInput)(nil)).Elem(), VpcEndpointServiceAllowedPrincipalMap{})
+ pulumi.RegisterOutputType(VpcEndpointServiceAllowedPrincipalOutput{})
+ pulumi.RegisterOutputType(VpcEndpointServiceAllowedPrincipalArrayOutput{})
+ pulumi.RegisterOutputType(VpcEndpointServiceAllowedPrincipalMapOutput{})
+}
diff --git a/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrinciple.go b/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrinciple.go
index 064b19b6934..66eaac45542 100644
--- a/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrinciple.go
+++ b/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrinciple.go
@@ -41,7 +41,7 @@ import (
// if err != nil {
// return err
// }
-// _, err = ec2.NewVpcEndpointServiceAllowedPrinciple(ctx, "allow_me_to_foo", &ec2.VpcEndpointServiceAllowedPrincipleArgs{
+// _, err = ec2.NewVpcEndpointServiceAllowedPrincipal(ctx, "allow_me_to_foo", &ec2.VpcEndpointServiceAllowedPrincipalArgs{
// VpcEndpointServiceId: pulumi.Any(foo.Id),
// PrincipalArn: pulumi.String(current.Arn),
// })
@@ -53,6 +53,8 @@ import (
// }
//
// ```
+//
+// Deprecated: aws.ec2/vpcendpointserviceallowedprinciple.VpcEndpointServiceAllowedPrinciple has been deprecated in favor of aws.ec2/vpcendpointserviceallowedprincipal.VpcEndpointServiceAllowedPrincipal
type VpcEndpointServiceAllowedPrinciple struct {
pulumi.CustomResourceState
@@ -75,6 +77,12 @@ func NewVpcEndpointServiceAllowedPrinciple(ctx *pulumi.Context,
if args.VpcEndpointServiceId == nil {
return nil, errors.New("invalid value for required argument 'VpcEndpointServiceId'")
}
+ aliases := pulumi.Aliases([]pulumi.Alias{
+ {
+ Type: pulumi.String("aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple"),
+ },
+ })
+ opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource VpcEndpointServiceAllowedPrinciple
err := ctx.RegisterResource("aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple", name, args, &resource, opts...)
diff --git a/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrincipal.java b/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrincipal.java
new file mode 100644
index 00000000000..0221dbd3e8f
--- /dev/null
+++ b/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrincipal.java
@@ -0,0 +1,159 @@
+// *** WARNING: this file was generated by pulumi-java-gen. ***
+// *** Do not edit by hand unless you're certain you know what you are doing! ***
+
+package com.pulumi.aws.ec2;
+
+import com.pulumi.aws.Utilities;
+import com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrincipalArgs;
+import com.pulumi.aws.ec2.inputs.VpcEndpointServiceAllowedPrincipalState;
+import com.pulumi.core.Alias;
+import com.pulumi.core.Output;
+import com.pulumi.core.annotations.Export;
+import com.pulumi.core.annotations.ResourceType;
+import com.pulumi.core.internal.Codegen;
+import java.lang.String;
+import java.util.List;
+import javax.annotation.Nullable;
+
+/**
+ * Provides a resource to allow a principal to discover a VPC endpoint service.
+ *
+ * > **NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals:** This provider provides
+ * both a standalone VPC Endpoint Service Allowed Principal resource
+ * and a VPC Endpoint Service resource with an `allowed_principals` attribute. Do not use the same principal ARN in both
+ * a VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict
+ * and will overwrite the association.
+ *
+ * ## Example Usage
+ *
+ * Basic usage:
+ *
+ * <!--Start PulumiCodeChooser -->
+ *
+ * {@code
+ * 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.ec2.VpcEndpointServiceAllowedPrincipal;
+ * import com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrincipalArgs;
+ * 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 allowMeToFoo = new VpcEndpointServiceAllowedPrincipal("allowMeToFoo", VpcEndpointServiceAllowedPrincipalArgs.builder()
+ * .vpcEndpointServiceId(foo.id())
+ * .principalArn(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.arn()))
+ * .build());
+ *
+ * }
+ * }
+ * }
+ *
+ * <!--End PulumiCodeChooser -->
+ *
+ */
+@ResourceType(type="aws:ec2/vpcEndpointServiceAllowedPrincipal:VpcEndpointServiceAllowedPrincipal")
+public class VpcEndpointServiceAllowedPrincipal extends com.pulumi.resources.CustomResource {
+ /**
+ * The ARN of the principal to allow permissions.
+ *
+ */
+ @Export(name="principalArn", refs={String.class}, tree="[0]")
+ private Output principalArn;
+
+ /**
+ * @return The ARN of the principal to allow permissions.
+ *
+ */
+ public Output principalArn() {
+ return this.principalArn;
+ }
+ /**
+ * The ID of the VPC endpoint service to allow permission.
+ *
+ */
+ @Export(name="vpcEndpointServiceId", refs={String.class}, tree="[0]")
+ private Output vpcEndpointServiceId;
+
+ /**
+ * @return The ID of the VPC endpoint service to allow permission.
+ *
+ */
+ public Output vpcEndpointServiceId() {
+ return this.vpcEndpointServiceId;
+ }
+
+ /**
+ *
+ * @param name The _unique_ name of the resulting resource.
+ */
+ public VpcEndpointServiceAllowedPrincipal(java.lang.String name) {
+ this(name, VpcEndpointServiceAllowedPrincipalArgs.Empty);
+ }
+ /**
+ *
+ * @param name The _unique_ name of the resulting resource.
+ * @param args The arguments to use to populate this resource's properties.
+ */
+ public VpcEndpointServiceAllowedPrincipal(java.lang.String name, VpcEndpointServiceAllowedPrincipalArgs args) {
+ this(name, args, null);
+ }
+ /**
+ *
+ * @param name The _unique_ name of the resulting resource.
+ * @param args The arguments to use to populate this resource's properties.
+ * @param options A bag of options that control this resource's behavior.
+ */
+ public VpcEndpointServiceAllowedPrincipal(java.lang.String name, VpcEndpointServiceAllowedPrincipalArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
+ super("aws:ec2/vpcEndpointServiceAllowedPrincipal:VpcEndpointServiceAllowedPrincipal", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
+ }
+
+ private VpcEndpointServiceAllowedPrincipal(java.lang.String name, Output id, @Nullable VpcEndpointServiceAllowedPrincipalState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
+ super("aws:ec2/vpcEndpointServiceAllowedPrincipal:VpcEndpointServiceAllowedPrincipal", name, state, makeResourceOptions(options, id), false);
+ }
+
+ private static VpcEndpointServiceAllowedPrincipalArgs makeArgs(VpcEndpointServiceAllowedPrincipalArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
+ if (options != null && options.getUrn().isPresent()) {
+ return null;
+ }
+ return args == null ? VpcEndpointServiceAllowedPrincipalArgs.Empty : args;
+ }
+
+ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
+ var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
+ .version(Utilities.getVersion())
+ .aliases(List.of(
+ Output.of(Alias.builder().type("aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple").build())
+ ))
+ .build();
+ return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
+ }
+
+ /**
+ * Get an existing Host resource's state with the given name, ID, and optional extra
+ * properties used to qualify the lookup.
+ *
+ * @param name The _unique_ name of the resulting resource.
+ * @param id The _unique_ provider ID of the resource to lookup.
+ * @param state
+ * @param options Optional settings to control the behavior of the CustomResource.
+ */
+ public static VpcEndpointServiceAllowedPrincipal get(java.lang.String name, Output id, @Nullable VpcEndpointServiceAllowedPrincipalState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
+ return new VpcEndpointServiceAllowedPrincipal(name, id, state, options);
+ }
+}
diff --git a/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrincipalArgs.java b/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrincipalArgs.java
new file mode 100644
index 00000000000..782f58f5fd6
--- /dev/null
+++ b/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrincipalArgs.java
@@ -0,0 +1,125 @@
+// *** WARNING: this file was generated by pulumi-java-gen. ***
+// *** Do not edit by hand unless you're certain you know what you are doing! ***
+
+package com.pulumi.aws.ec2;
+
+import com.pulumi.core.Output;
+import com.pulumi.core.annotations.Import;
+import com.pulumi.exceptions.MissingRequiredPropertyException;
+import java.lang.String;
+import java.util.Objects;
+
+
+public final class VpcEndpointServiceAllowedPrincipalArgs extends com.pulumi.resources.ResourceArgs {
+
+ public static final VpcEndpointServiceAllowedPrincipalArgs Empty = new VpcEndpointServiceAllowedPrincipalArgs();
+
+ /**
+ * The ARN of the principal to allow permissions.
+ *
+ */
+ @Import(name="principalArn", required=true)
+ private Output principalArn;
+
+ /**
+ * @return The ARN of the principal to allow permissions.
+ *
+ */
+ public Output principalArn() {
+ return this.principalArn;
+ }
+
+ /**
+ * The ID of the VPC endpoint service to allow permission.
+ *
+ */
+ @Import(name="vpcEndpointServiceId", required=true)
+ private Output vpcEndpointServiceId;
+
+ /**
+ * @return The ID of the VPC endpoint service to allow permission.
+ *
+ */
+ public Output vpcEndpointServiceId() {
+ return this.vpcEndpointServiceId;
+ }
+
+ private VpcEndpointServiceAllowedPrincipalArgs() {}
+
+ private VpcEndpointServiceAllowedPrincipalArgs(VpcEndpointServiceAllowedPrincipalArgs $) {
+ this.principalArn = $.principalArn;
+ this.vpcEndpointServiceId = $.vpcEndpointServiceId;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+ public static Builder builder(VpcEndpointServiceAllowedPrincipalArgs defaults) {
+ return new Builder(defaults);
+ }
+
+ public static final class Builder {
+ private VpcEndpointServiceAllowedPrincipalArgs $;
+
+ public Builder() {
+ $ = new VpcEndpointServiceAllowedPrincipalArgs();
+ }
+
+ public Builder(VpcEndpointServiceAllowedPrincipalArgs defaults) {
+ $ = new VpcEndpointServiceAllowedPrincipalArgs(Objects.requireNonNull(defaults));
+ }
+
+ /**
+ * @param principalArn The ARN of the principal to allow permissions.
+ *
+ * @return builder
+ *
+ */
+ public Builder principalArn(Output principalArn) {
+ $.principalArn = principalArn;
+ return this;
+ }
+
+ /**
+ * @param principalArn The ARN of the principal to allow permissions.
+ *
+ * @return builder
+ *
+ */
+ public Builder principalArn(String principalArn) {
+ return principalArn(Output.of(principalArn));
+ }
+
+ /**
+ * @param vpcEndpointServiceId The ID of the VPC endpoint service to allow permission.
+ *
+ * @return builder
+ *
+ */
+ public Builder vpcEndpointServiceId(Output vpcEndpointServiceId) {
+ $.vpcEndpointServiceId = vpcEndpointServiceId;
+ return this;
+ }
+
+ /**
+ * @param vpcEndpointServiceId The ID of the VPC endpoint service to allow permission.
+ *
+ * @return builder
+ *
+ */
+ public Builder vpcEndpointServiceId(String vpcEndpointServiceId) {
+ return vpcEndpointServiceId(Output.of(vpcEndpointServiceId));
+ }
+
+ public VpcEndpointServiceAllowedPrincipalArgs build() {
+ if ($.principalArn == null) {
+ throw new MissingRequiredPropertyException("VpcEndpointServiceAllowedPrincipalArgs", "principalArn");
+ }
+ if ($.vpcEndpointServiceId == null) {
+ throw new MissingRequiredPropertyException("VpcEndpointServiceAllowedPrincipalArgs", "vpcEndpointServiceId");
+ }
+ return $;
+ }
+ }
+
+}
diff --git a/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrinciple.java b/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrinciple.java
index 20832fca380..7f929280220 100644
--- a/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrinciple.java
+++ b/sdk/java/src/main/java/com/pulumi/aws/ec2/VpcEndpointServiceAllowedPrinciple.java
@@ -6,11 +6,13 @@
import com.pulumi.aws.Utilities;
import com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrincipleArgs;
import com.pulumi.aws.ec2.inputs.VpcEndpointServiceAllowedPrincipleState;
+import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
+import java.util.List;
import javax.annotation.Nullable;
/**
@@ -36,8 +38,8 @@
* import com.pulumi.core.Output;
* import com.pulumi.aws.AwsFunctions;
* import com.pulumi.aws.inputs.GetCallerIdentityArgs;
- * import com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrinciple;
- * import com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrincipleArgs;
+ * import com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrincipal;
+ * import com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrincipalArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -53,7 +55,7 @@
* public static void stack(Context ctx) {
* final var current = AwsFunctions.getCallerIdentity();
*
- * var allowMeToFoo = new VpcEndpointServiceAllowedPrinciple("allowMeToFoo", VpcEndpointServiceAllowedPrincipleArgs.builder()
+ * var allowMeToFoo = new VpcEndpointServiceAllowedPrincipal("allowMeToFoo", VpcEndpointServiceAllowedPrincipalArgs.builder()
* .vpcEndpointServiceId(foo.id())
* .principalArn(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.arn()))
* .build());
@@ -64,7 +66,11 @@
*
* <!--End PulumiCodeChooser -->
*
+ * @deprecated
+ * aws.ec2/vpcendpointserviceallowedprinciple.VpcEndpointServiceAllowedPrinciple has been deprecated in favor of aws.ec2/vpcendpointserviceallowedprincipal.VpcEndpointServiceAllowedPrincipal
+ *
*/
+@Deprecated /* aws.ec2/vpcendpointserviceallowedprinciple.VpcEndpointServiceAllowedPrinciple has been deprecated in favor of aws.ec2/vpcendpointserviceallowedprincipal.VpcEndpointServiceAllowedPrincipal */
@ResourceType(type="aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple")
public class VpcEndpointServiceAllowedPrinciple extends com.pulumi.resources.CustomResource {
/**
@@ -135,6 +141,9 @@ private static VpcEndpointServiceAllowedPrincipleArgs makeArgs(VpcEndpointServic
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
+ .aliases(List.of(
+ Output.of(Alias.builder().type("aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple").build())
+ ))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
diff --git a/sdk/java/src/main/java/com/pulumi/aws/ec2/inputs/VpcEndpointServiceAllowedPrincipalState.java b/sdk/java/src/main/java/com/pulumi/aws/ec2/inputs/VpcEndpointServiceAllowedPrincipalState.java
new file mode 100644
index 00000000000..ad111f88c65
--- /dev/null
+++ b/sdk/java/src/main/java/com/pulumi/aws/ec2/inputs/VpcEndpointServiceAllowedPrincipalState.java
@@ -0,0 +1,120 @@
+// *** WARNING: this file was generated by pulumi-java-gen. ***
+// *** Do not edit by hand unless you're certain you know what you are doing! ***
+
+package com.pulumi.aws.ec2.inputs;
+
+import com.pulumi.core.Output;
+import com.pulumi.core.annotations.Import;
+import java.lang.String;
+import java.util.Objects;
+import java.util.Optional;
+import javax.annotation.Nullable;
+
+
+public final class VpcEndpointServiceAllowedPrincipalState extends com.pulumi.resources.ResourceArgs {
+
+ public static final VpcEndpointServiceAllowedPrincipalState Empty = new VpcEndpointServiceAllowedPrincipalState();
+
+ /**
+ * The ARN of the principal to allow permissions.
+ *
+ */
+ @Import(name="principalArn")
+ private @Nullable Output principalArn;
+
+ /**
+ * @return The ARN of the principal to allow permissions.
+ *
+ */
+ public Optional