1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. dms
  5. getEnterpriseProxyAccesses
Alibaba Cloud v3.45.1 published on Thursday, Dec 7, 2023 by Pulumi

alicloud.dms.getEnterpriseProxyAccesses

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.45.1 published on Thursday, Dec 7, 2023 by Pulumi

    This data source provides DMS Enterprise Proxy Access available to the user.What is Proxy Access

    NOTE: Available since v1.195.0.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultEnterpriseProxyAccess = new AliCloud.Dms.EnterpriseProxyAccess("defaultEnterpriseProxyAccess", new()
        {
            IndepPassword = "PASSWORD-DEMO",
            ProxyId = "1881",
            IndepAccount = "dmstest",
            UserId = "104442",
        });
    
        var defaultEnterpriseProxyAccesses = AliCloud.Dms.GetEnterpriseProxyAccesses.Invoke(new()
        {
            Ids = new[]
            {
                defaultEnterpriseProxyAccess.Id,
            },
            ProxyId = "1881",
        });
    
        return new Dictionary<string, object?>
        {
            ["alicloudDmsProxyAccesesExampleId"] = defaultEnterpriseProxyAccesses.Apply(getEnterpriseProxyAccessesResult => getEnterpriseProxyAccessesResult.Accesses[0]?.Id),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dms"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultEnterpriseProxyAccess, err := dms.NewEnterpriseProxyAccess(ctx, "defaultEnterpriseProxyAccess", &dms.EnterpriseProxyAccessArgs{
    			IndepPassword: pulumi.String("PASSWORD-DEMO"),
    			ProxyId:       pulumi.String("1881"),
    			IndepAccount:  pulumi.String("dmstest"),
    			UserId:        pulumi.String("104442"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultEnterpriseProxyAccesses := dms.GetEnterpriseProxyAccessesOutput(ctx, dms.GetEnterpriseProxyAccessesOutputArgs{
    			Ids: pulumi.StringArray{
    				defaultEnterpriseProxyAccess.ID(),
    			},
    			ProxyId: pulumi.String("1881"),
    		}, nil)
    		ctx.Export("alicloudDmsProxyAccesesExampleId", defaultEnterpriseProxyAccesses.ApplyT(func(defaultEnterpriseProxyAccesses dms.GetEnterpriseProxyAccessesResult) (*string, error) {
    			return &defaultEnterpriseProxyAccesses.Accesses[0].Id, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.dms.EnterpriseProxyAccess;
    import com.pulumi.alicloud.dms.EnterpriseProxyAccessArgs;
    import com.pulumi.alicloud.dms.DmsFunctions;
    import com.pulumi.alicloud.dms.inputs.GetEnterpriseProxyAccessesArgs;
    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) {
            var defaultEnterpriseProxyAccess = new EnterpriseProxyAccess("defaultEnterpriseProxyAccess", EnterpriseProxyAccessArgs.builder()        
                .indepPassword("PASSWORD-DEMO")
                .proxyId(1881)
                .indepAccount("dmstest")
                .userId(104442)
                .build());
    
            final var defaultEnterpriseProxyAccesses = DmsFunctions.getEnterpriseProxyAccesses(GetEnterpriseProxyAccessesArgs.builder()
                .ids(defaultEnterpriseProxyAccess.id())
                .proxyId(1881)
                .build());
    
            ctx.export("alicloudDmsProxyAccesesExampleId", defaultEnterpriseProxyAccesses.applyValue(getEnterpriseProxyAccessesResult -> getEnterpriseProxyAccessesResult).applyValue(defaultEnterpriseProxyAccesses -> defaultEnterpriseProxyAccesses.applyValue(getEnterpriseProxyAccessesResult -> getEnterpriseProxyAccessesResult.accesses()[0].id())));
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_enterprise_proxy_access = alicloud.dms.EnterpriseProxyAccess("defaultEnterpriseProxyAccess",
        indep_password="PASSWORD-DEMO",
        proxy_id="1881",
        indep_account="dmstest",
        user_id="104442")
    default_enterprise_proxy_accesses = alicloud.dms.get_enterprise_proxy_accesses_output(ids=[default_enterprise_proxy_access.id],
        proxy_id="1881")
    pulumi.export("alicloudDmsProxyAccesesExampleId", default_enterprise_proxy_accesses.accesses[0].id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultEnterpriseProxyAccess = new alicloud.dms.EnterpriseProxyAccess("defaultEnterpriseProxyAccess", {
        indepPassword: "PASSWORD-DEMO",
        proxyId: "1881",
        indepAccount: "dmstest",
        userId: "104442",
    });
    const defaultEnterpriseProxyAccesses = alicloud.dms.getEnterpriseProxyAccessesOutput({
        ids: [defaultEnterpriseProxyAccess.id],
        proxyId: "1881",
    });
    export const alicloudDmsProxyAccesesExampleId = defaultEnterpriseProxyAccesses.apply(defaultEnterpriseProxyAccesses => defaultEnterpriseProxyAccesses.accesses?.[0]?.id);
    
    resources:
      defaultEnterpriseProxyAccess:
        type: alicloud:dms:EnterpriseProxyAccess
        properties:
          indepPassword: PASSWORD-DEMO
          proxyId: 1881
          indepAccount: dmstest
          userId: 104442
    variables:
      defaultEnterpriseProxyAccesses:
        fn::invoke:
          Function: alicloud:dms:getEnterpriseProxyAccesses
          Arguments:
            ids:
              - ${defaultEnterpriseProxyAccess.id}
            proxyId: 1881
    outputs:
      alicloudDmsProxyAccesesExampleId: ${defaultEnterpriseProxyAccesses.accesses[0].id}
    

    Using getEnterpriseProxyAccesses

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getEnterpriseProxyAccesses(args: GetEnterpriseProxyAccessesArgs, opts?: InvokeOptions): Promise<GetEnterpriseProxyAccessesResult>
    function getEnterpriseProxyAccessesOutput(args: GetEnterpriseProxyAccessesOutputArgs, opts?: InvokeOptions): Output<GetEnterpriseProxyAccessesResult>
    def get_enterprise_proxy_accesses(enable_details: Optional[bool] = None,
                                      ids: Optional[Sequence[str]] = None,
                                      output_file: Optional[str] = None,
                                      proxy_id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetEnterpriseProxyAccessesResult
    def get_enterprise_proxy_accesses_output(enable_details: Optional[pulumi.Input[bool]] = None,
                                      ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                      output_file: Optional[pulumi.Input[str]] = None,
                                      proxy_id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetEnterpriseProxyAccessesResult]
    func GetEnterpriseProxyAccesses(ctx *Context, args *GetEnterpriseProxyAccessesArgs, opts ...InvokeOption) (*GetEnterpriseProxyAccessesResult, error)
    func GetEnterpriseProxyAccessesOutput(ctx *Context, args *GetEnterpriseProxyAccessesOutputArgs, opts ...InvokeOption) GetEnterpriseProxyAccessesResultOutput

    > Note: This function is named GetEnterpriseProxyAccesses in the Go SDK.

    public static class GetEnterpriseProxyAccesses 
    {
        public static Task<GetEnterpriseProxyAccessesResult> InvokeAsync(GetEnterpriseProxyAccessesArgs args, InvokeOptions? opts = null)
        public static Output<GetEnterpriseProxyAccessesResult> Invoke(GetEnterpriseProxyAccessesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnterpriseProxyAccessesResult> getEnterpriseProxyAccesses(GetEnterpriseProxyAccessesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:dms/getEnterpriseProxyAccesses:getEnterpriseProxyAccesses
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProxyId string

    The ID of the security agent.

    EnableDetails bool
    Ids List<string>

    A list of Proxy Access IDs.

    OutputFile string

    File name where to save data source results (after running pulumi preview).

    ProxyId string

    The ID of the security agent.

    EnableDetails bool
    Ids []string

    A list of Proxy Access IDs.

    OutputFile string

    File name where to save data source results (after running pulumi preview).

    proxyId String

    The ID of the security agent.

    enableDetails Boolean
    ids List<String>

    A list of Proxy Access IDs.

    outputFile String

    File name where to save data source results (after running pulumi preview).

    proxyId string

    The ID of the security agent.

    enableDetails boolean
    ids string[]

    A list of Proxy Access IDs.

    outputFile string

    File name where to save data source results (after running pulumi preview).

    proxy_id str

    The ID of the security agent.

    enable_details bool
    ids Sequence[str]

    A list of Proxy Access IDs.

    output_file str

    File name where to save data source results (after running pulumi preview).

    proxyId String

    The ID of the security agent.

    enableDetails Boolean
    ids List<String>

    A list of Proxy Access IDs.

    outputFile String

    File name where to save data source results (after running pulumi preview).

    getEnterpriseProxyAccesses Result

    The following output properties are available:

    Accesses List<Pulumi.AliCloud.Dms.Outputs.GetEnterpriseProxyAccessesAccess>

    A list of Proxy Access Entries. Each element contains the following attributes:

    Id string

    The provider-assigned unique ID for this managed resource.

    Ids List<string>

    A list of Proxy Access IDs.

    ProxyId string

    The ID of the security agent.

    EnableDetails bool
    OutputFile string
    Accesses []GetEnterpriseProxyAccessesAccess

    A list of Proxy Access Entries. Each element contains the following attributes:

    Id string

    The provider-assigned unique ID for this managed resource.

    Ids []string

    A list of Proxy Access IDs.

    ProxyId string

    The ID of the security agent.

    EnableDetails bool
    OutputFile string
    accesses List<GetEnterpriseProxyAccessesAccess>

    A list of Proxy Access Entries. Each element contains the following attributes:

    id String

    The provider-assigned unique ID for this managed resource.

    ids List<String>

    A list of Proxy Access IDs.

    proxyId String

    The ID of the security agent.

    enableDetails Boolean
    outputFile String
    accesses GetEnterpriseProxyAccessesAccess[]

    A list of Proxy Access Entries. Each element contains the following attributes:

    id string

    The provider-assigned unique ID for this managed resource.

    ids string[]

    A list of Proxy Access IDs.

    proxyId string

    The ID of the security agent.

    enableDetails boolean
    outputFile string
    accesses Sequence[GetEnterpriseProxyAccessesAccess]

    A list of Proxy Access Entries. Each element contains the following attributes:

    id str

    The provider-assigned unique ID for this managed resource.

    ids Sequence[str]

    A list of Proxy Access IDs.

    proxy_id str

    The ID of the security agent.

    enable_details bool
    output_file str
    accesses List<Property Map>

    A list of Proxy Access Entries. Each element contains the following attributes:

    id String

    The provider-assigned unique ID for this managed resource.

    ids List<String>

    A list of Proxy Access IDs.

    proxyId String

    The ID of the security agent.

    enableDetails Boolean
    outputFile String

    Supporting Types

    GetEnterpriseProxyAccessesAccess

    AccessId string

    The authorized account of the security agent.

    AccessSecret string
    CreateTime string

    The authorization time of the security access agent permission.

    Id string

    Security Protection authorization ID.

    IndepAccount string

    Database account.

    InstanceId string

    The ID of the instance.

    OriginInfo string

    The source information of the security access agent permission is enabled, and the return value is as follows:Owner Authorization: The UID of the owner in parentheses.Work Order Authorization: The ticket number in parentheses is the number of the user to apply for permission.

    ProxyAccessId string

    Security Protection authorization ID. After the target user is authorized by the security protection agent, the system automatically generates a security protection authorization ID, which is globally unique.

    ProxyId string

    The ID of the security agent.

    UserId string

    The user ID.

    UserName string

    User nickname.

    UserUid string

    User UID.

    AccessId string

    The authorized account of the security agent.

    AccessSecret string
    CreateTime string

    The authorization time of the security access agent permission.

    Id string

    Security Protection authorization ID.

    IndepAccount string

    Database account.

    InstanceId string

    The ID of the instance.

    OriginInfo string

    The source information of the security access agent permission is enabled, and the return value is as follows:Owner Authorization: The UID of the owner in parentheses.Work Order Authorization: The ticket number in parentheses is the number of the user to apply for permission.

    ProxyAccessId string

    Security Protection authorization ID. After the target user is authorized by the security protection agent, the system automatically generates a security protection authorization ID, which is globally unique.

    ProxyId string

    The ID of the security agent.

    UserId string

    The user ID.

    UserName string

    User nickname.

    UserUid string

    User UID.

    accessId String

    The authorized account of the security agent.

    accessSecret String
    createTime String

    The authorization time of the security access agent permission.

    id String

    Security Protection authorization ID.

    indepAccount String

    Database account.

    instanceId String

    The ID of the instance.

    originInfo String

    The source information of the security access agent permission is enabled, and the return value is as follows:Owner Authorization: The UID of the owner in parentheses.Work Order Authorization: The ticket number in parentheses is the number of the user to apply for permission.

    proxyAccessId String

    Security Protection authorization ID. After the target user is authorized by the security protection agent, the system automatically generates a security protection authorization ID, which is globally unique.

    proxyId String

    The ID of the security agent.

    userId String

    The user ID.

    userName String

    User nickname.

    userUid String

    User UID.

    accessId string

    The authorized account of the security agent.

    accessSecret string
    createTime string

    The authorization time of the security access agent permission.

    id string

    Security Protection authorization ID.

    indepAccount string

    Database account.

    instanceId string

    The ID of the instance.

    originInfo string

    The source information of the security access agent permission is enabled, and the return value is as follows:Owner Authorization: The UID of the owner in parentheses.Work Order Authorization: The ticket number in parentheses is the number of the user to apply for permission.

    proxyAccessId string

    Security Protection authorization ID. After the target user is authorized by the security protection agent, the system automatically generates a security protection authorization ID, which is globally unique.

    proxyId string

    The ID of the security agent.

    userId string

    The user ID.

    userName string

    User nickname.

    userUid string

    User UID.

    access_id str

    The authorized account of the security agent.

    access_secret str
    create_time str

    The authorization time of the security access agent permission.

    id str

    Security Protection authorization ID.

    indep_account str

    Database account.

    instance_id str

    The ID of the instance.

    origin_info str

    The source information of the security access agent permission is enabled, and the return value is as follows:Owner Authorization: The UID of the owner in parentheses.Work Order Authorization: The ticket number in parentheses is the number of the user to apply for permission.

    proxy_access_id str

    Security Protection authorization ID. After the target user is authorized by the security protection agent, the system automatically generates a security protection authorization ID, which is globally unique.

    proxy_id str

    The ID of the security agent.

    user_id str

    The user ID.

    user_name str

    User nickname.

    user_uid str

    User UID.

    accessId String

    The authorized account of the security agent.

    accessSecret String
    createTime String

    The authorization time of the security access agent permission.

    id String

    Security Protection authorization ID.

    indepAccount String

    Database account.

    instanceId String

    The ID of the instance.

    originInfo String

    The source information of the security access agent permission is enabled, and the return value is as follows:Owner Authorization: The UID of the owner in parentheses.Work Order Authorization: The ticket number in parentheses is the number of the user to apply for permission.

    proxyAccessId String

    Security Protection authorization ID. After the target user is authorized by the security protection agent, the system automatically generates a security protection authorization ID, which is globally unique.

    proxyId String

    The ID of the security agent.

    userId String

    The user ID.

    userName String

    User nickname.

    userUid String

    User UID.

    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.45.1 published on Thursday, Dec 7, 2023 by Pulumi