1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. privatelink
  5. VpcEndpointServiceUser
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.privatelink.VpcEndpointServiceUser

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Private Link Vpc Endpoint Service User resource. Endpoint service user whitelist.

    For information about Private Link Vpc Endpoint Service User and how to use it, see What is Vpc Endpoint Service User.

    NOTE: Available since v1.110.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tfexampleuser";
    const exampleVpcEndpointService = new alicloud.privatelink.VpcEndpointService("exampleVpcEndpointService", {
        serviceDescription: name,
        connectBandwidth: 103,
        autoAcceptConnection: false,
    });
    const exampleUser = new alicloud.ram.User("exampleUser", {
        displayName: "user_display_name",
        mobile: "86-18688888888",
        email: "hello.uuu@aaa.com",
        comments: "yoyoyo",
    });
    const exampleVpcEndpointServiceUser = new alicloud.privatelink.VpcEndpointServiceUser("exampleVpcEndpointServiceUser", {
        serviceId: exampleVpcEndpointService.id,
        userId: exampleUser.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tfexampleuser"
    example_vpc_endpoint_service = alicloud.privatelink.VpcEndpointService("exampleVpcEndpointService",
        service_description=name,
        connect_bandwidth=103,
        auto_accept_connection=False)
    example_user = alicloud.ram.User("exampleUser",
        display_name="user_display_name",
        mobile="86-18688888888",
        email="hello.uuu@aaa.com",
        comments="yoyoyo")
    example_vpc_endpoint_service_user = alicloud.privatelink.VpcEndpointServiceUser("exampleVpcEndpointServiceUser",
        service_id=example_vpc_endpoint_service.id,
        user_id=example_user.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/privatelink"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tfexampleuser"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		exampleVpcEndpointService, err := privatelink.NewVpcEndpointService(ctx, "exampleVpcEndpointService", &privatelink.VpcEndpointServiceArgs{
    			ServiceDescription:   pulumi.String(name),
    			ConnectBandwidth:     pulumi.Int(103),
    			AutoAcceptConnection: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		exampleUser, err := ram.NewUser(ctx, "exampleUser", &ram.UserArgs{
    			DisplayName: pulumi.String("user_display_name"),
    			Mobile:      pulumi.String("86-18688888888"),
    			Email:       pulumi.String("hello.uuu@aaa.com"),
    			Comments:    pulumi.String("yoyoyo"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = privatelink.NewVpcEndpointServiceUser(ctx, "exampleVpcEndpointServiceUser", &privatelink.VpcEndpointServiceUserArgs{
    			ServiceId: exampleVpcEndpointService.ID(),
    			UserId:    exampleUser.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tfexampleuser";
        var exampleVpcEndpointService = new AliCloud.PrivateLink.VpcEndpointService("exampleVpcEndpointService", new()
        {
            ServiceDescription = name,
            ConnectBandwidth = 103,
            AutoAcceptConnection = false,
        });
    
        var exampleUser = new AliCloud.Ram.User("exampleUser", new()
        {
            DisplayName = "user_display_name",
            Mobile = "86-18688888888",
            Email = "hello.uuu@aaa.com",
            Comments = "yoyoyo",
        });
    
        var exampleVpcEndpointServiceUser = new AliCloud.PrivateLink.VpcEndpointServiceUser("exampleVpcEndpointServiceUser", new()
        {
            ServiceId = exampleVpcEndpointService.Id,
            UserId = exampleUser.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.privatelink.VpcEndpointService;
    import com.pulumi.alicloud.privatelink.VpcEndpointServiceArgs;
    import com.pulumi.alicloud.ram.User;
    import com.pulumi.alicloud.ram.UserArgs;
    import com.pulumi.alicloud.privatelink.VpcEndpointServiceUser;
    import com.pulumi.alicloud.privatelink.VpcEndpointServiceUserArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("tfexampleuser");
            var exampleVpcEndpointService = new VpcEndpointService("exampleVpcEndpointService", VpcEndpointServiceArgs.builder()        
                .serviceDescription(name)
                .connectBandwidth(103)
                .autoAcceptConnection(false)
                .build());
    
            var exampleUser = new User("exampleUser", UserArgs.builder()        
                .displayName("user_display_name")
                .mobile("86-18688888888")
                .email("hello.uuu@aaa.com")
                .comments("yoyoyo")
                .build());
    
            var exampleVpcEndpointServiceUser = new VpcEndpointServiceUser("exampleVpcEndpointServiceUser", VpcEndpointServiceUserArgs.builder()        
                .serviceId(exampleVpcEndpointService.id())
                .userId(exampleUser.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tfexampleuser
    resources:
      exampleVpcEndpointService:
        type: alicloud:privatelink:VpcEndpointService
        properties:
          serviceDescription: ${name}
          connectBandwidth: 103
          autoAcceptConnection: false
      exampleUser:
        type: alicloud:ram:User
        properties:
          displayName: user_display_name
          mobile: 86-18688888888
          email: hello.uuu@aaa.com
          comments: yoyoyo
      exampleVpcEndpointServiceUser:
        type: alicloud:privatelink:VpcEndpointServiceUser
        properties:
          serviceId: ${exampleVpcEndpointService.id}
          userId: ${exampleUser.id}
    

    Create VpcEndpointServiceUser Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VpcEndpointServiceUser(name: string, args: VpcEndpointServiceUserArgs, opts?: CustomResourceOptions);
    @overload
    def VpcEndpointServiceUser(resource_name: str,
                               args: VpcEndpointServiceUserArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcEndpointServiceUser(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               service_id: Optional[str] = None,
                               user_id: Optional[str] = None,
                               dry_run: Optional[bool] = None)
    func NewVpcEndpointServiceUser(ctx *Context, name string, args VpcEndpointServiceUserArgs, opts ...ResourceOption) (*VpcEndpointServiceUser, error)
    public VpcEndpointServiceUser(string name, VpcEndpointServiceUserArgs args, CustomResourceOptions? opts = null)
    public VpcEndpointServiceUser(String name, VpcEndpointServiceUserArgs args)
    public VpcEndpointServiceUser(String name, VpcEndpointServiceUserArgs args, CustomResourceOptions options)
    
    type: alicloud:privatelink:VpcEndpointServiceUser
    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 VpcEndpointServiceUserArgs
    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 VpcEndpointServiceUserArgs
    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 VpcEndpointServiceUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcEndpointServiceUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcEndpointServiceUserArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var vpcEndpointServiceUserResource = new AliCloud.PrivateLink.VpcEndpointServiceUser("vpcEndpointServiceUserResource", new()
    {
        ServiceId = "string",
        UserId = "string",
        DryRun = false,
    });
    
    example, err := privatelink.NewVpcEndpointServiceUser(ctx, "vpcEndpointServiceUserResource", &privatelink.VpcEndpointServiceUserArgs{
    	ServiceId: pulumi.String("string"),
    	UserId:    pulumi.String("string"),
    	DryRun:    pulumi.Bool(false),
    })
    
    var vpcEndpointServiceUserResource = new VpcEndpointServiceUser("vpcEndpointServiceUserResource", VpcEndpointServiceUserArgs.builder()        
        .serviceId("string")
        .userId("string")
        .dryRun(false)
        .build());
    
    vpc_endpoint_service_user_resource = alicloud.privatelink.VpcEndpointServiceUser("vpcEndpointServiceUserResource",
        service_id="string",
        user_id="string",
        dry_run=False)
    
    const vpcEndpointServiceUserResource = new alicloud.privatelink.VpcEndpointServiceUser("vpcEndpointServiceUserResource", {
        serviceId: "string",
        userId: "string",
        dryRun: false,
    });
    
    type: alicloud:privatelink:VpcEndpointServiceUser
    properties:
        dryRun: false
        serviceId: string
        userId: string
    

    VpcEndpointServiceUser Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The VpcEndpointServiceUser resource accepts the following input properties:

    ServiceId string
    The endpoint service ID.
    UserId string
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    DryRun bool
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    ServiceId string
    The endpoint service ID.
    UserId string
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    DryRun bool
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    serviceId String
    The endpoint service ID.
    userId String
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    dryRun Boolean
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    serviceId string
    The endpoint service ID.
    userId string
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    dryRun boolean
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    service_id str
    The endpoint service ID.
    user_id str
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    dry_run bool
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    serviceId String
    The endpoint service ID.
    userId String
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    dryRun Boolean
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VpcEndpointServiceUser resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VpcEndpointServiceUser Resource

    Get an existing VpcEndpointServiceUser 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?: VpcEndpointServiceUserState, opts?: CustomResourceOptions): VpcEndpointServiceUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dry_run: Optional[bool] = None,
            service_id: Optional[str] = None,
            user_id: Optional[str] = None) -> VpcEndpointServiceUser
    func GetVpcEndpointServiceUser(ctx *Context, name string, id IDInput, state *VpcEndpointServiceUserState, opts ...ResourceOption) (*VpcEndpointServiceUser, error)
    public static VpcEndpointServiceUser Get(string name, Input<string> id, VpcEndpointServiceUserState? state, CustomResourceOptions? opts = null)
    public static VpcEndpointServiceUser get(String name, Output<String> id, VpcEndpointServiceUserState 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.
    The following state arguments are supported:
    DryRun bool
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    ServiceId string
    The endpoint service ID.
    UserId string
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    DryRun bool
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    ServiceId string
    The endpoint service ID.
    UserId string
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    dryRun Boolean
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    serviceId String
    The endpoint service ID.
    userId String
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    dryRun boolean
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    serviceId string
    The endpoint service ID.
    userId string
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    dry_run bool
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    service_id str
    The endpoint service ID.
    user_id str
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.
    dryRun Boolean
    Specifies whether to perform only a dry run, without performing the actual request. Valid values:

    • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
    • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
    serviceId String
    The endpoint service ID.
    userId String
    The ID of the Alibaba Cloud account in the whitelist of the endpoint service.

    Import

    Private Link Vpc Endpoint Service User can be imported using the id, e.g.

    $ pulumi import alicloud:privatelink/vpcEndpointServiceUser:VpcEndpointServiceUser example <service_id>:<user_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi