alicloud.dms.EnterpriseProxyAccess
Explore with Pulumi AI
Provides a DMS Enterprise Proxy Access resource.
For information about DMS Enterprise Proxy Access and how to use it, see What is Proxy Access.
NOTE: Available since v1.195.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const dmsEnterpriseUsersDs = alicloud.dms.getEnterpriseUsers({
role: "USER",
status: "NORMAL",
});
const ids = alicloud.dms.getEnterpriseProxies({});
const _default = new alicloud.dms.EnterpriseProxyAccess("default", {
proxyId: ids.then(ids => ids.proxies?.[0]?.id),
userId: dmsEnterpriseUsersDs.then(dmsEnterpriseUsersDs => dmsEnterpriseUsersDs.users?.[0]?.userId),
});
import pulumi
import pulumi_alicloud as alicloud
dms_enterprise_users_ds = alicloud.dms.get_enterprise_users(role="USER",
status="NORMAL")
ids = alicloud.dms.get_enterprise_proxies()
default = alicloud.dms.EnterpriseProxyAccess("default",
proxy_id=ids.proxies[0].id,
user_id=dms_enterprise_users_ds.users[0].user_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 {
dmsEnterpriseUsersDs, err := dms.GetEnterpriseUsers(ctx, &dms.GetEnterpriseUsersArgs{
Role: pulumi.StringRef("USER"),
Status: pulumi.StringRef("NORMAL"),
}, nil)
if err != nil {
return err
}
ids, err := dms.GetEnterpriseProxies(ctx, nil, nil)
if err != nil {
return err
}
_, err = dms.NewEnterpriseProxyAccess(ctx, "default", &dms.EnterpriseProxyAccessArgs{
ProxyId: pulumi.String(ids.Proxies[0].Id),
UserId: pulumi.String(dmsEnterpriseUsersDs.Users[0].UserId),
})
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 dmsEnterpriseUsersDs = AliCloud.Dms.GetEnterpriseUsers.Invoke(new()
{
Role = "USER",
Status = "NORMAL",
});
var ids = AliCloud.Dms.GetEnterpriseProxies.Invoke();
var @default = new AliCloud.Dms.EnterpriseProxyAccess("default", new()
{
ProxyId = ids.Apply(getEnterpriseProxiesResult => getEnterpriseProxiesResult.Proxies[0]?.Id),
UserId = dmsEnterpriseUsersDs.Apply(getEnterpriseUsersResult => getEnterpriseUsersResult.Users[0]?.UserId),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dms.DmsFunctions;
import com.pulumi.alicloud.dms.inputs.GetEnterpriseUsersArgs;
import com.pulumi.alicloud.dms.inputs.GetEnterpriseProxiesArgs;
import com.pulumi.alicloud.dms.EnterpriseProxyAccess;
import com.pulumi.alicloud.dms.EnterpriseProxyAccessArgs;
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 dmsEnterpriseUsersDs = DmsFunctions.getEnterpriseUsers(GetEnterpriseUsersArgs.builder()
.role("USER")
.status("NORMAL")
.build());
final var ids = DmsFunctions.getEnterpriseProxies();
var default_ = new EnterpriseProxyAccess("default", EnterpriseProxyAccessArgs.builder()
.proxyId(ids.applyValue(getEnterpriseProxiesResult -> getEnterpriseProxiesResult.proxies()[0].id()))
.userId(dmsEnterpriseUsersDs.applyValue(getEnterpriseUsersResult -> getEnterpriseUsersResult.users()[0].userId()))
.build());
}
}
resources:
default:
type: alicloud:dms:EnterpriseProxyAccess
properties:
proxyId: ${ids.proxies[0].id}
userId: ${dmsEnterpriseUsersDs.users[0].userId}
variables:
dmsEnterpriseUsersDs:
fn::invoke:
Function: alicloud:dms:getEnterpriseUsers
Arguments:
role: USER
status: NORMAL
ids:
fn::invoke:
Function: alicloud:dms:getEnterpriseProxies
Arguments: {}
Create EnterpriseProxyAccess Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EnterpriseProxyAccess(name: string, args: EnterpriseProxyAccessArgs, opts?: CustomResourceOptions);
@overload
def EnterpriseProxyAccess(resource_name: str,
args: EnterpriseProxyAccessArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EnterpriseProxyAccess(resource_name: str,
opts: Optional[ResourceOptions] = None,
proxy_id: Optional[str] = None,
user_id: Optional[str] = None,
indep_account: Optional[str] = None,
indep_password: Optional[str] = None,
proxy_access_id: Optional[str] = None)
func NewEnterpriseProxyAccess(ctx *Context, name string, args EnterpriseProxyAccessArgs, opts ...ResourceOption) (*EnterpriseProxyAccess, error)
public EnterpriseProxyAccess(string name, EnterpriseProxyAccessArgs args, CustomResourceOptions? opts = null)
public EnterpriseProxyAccess(String name, EnterpriseProxyAccessArgs args)
public EnterpriseProxyAccess(String name, EnterpriseProxyAccessArgs args, CustomResourceOptions options)
type: alicloud:dms:EnterpriseProxyAccess
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 EnterpriseProxyAccessArgs
- 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 EnterpriseProxyAccessArgs
- 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 EnterpriseProxyAccessArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnterpriseProxyAccessArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnterpriseProxyAccessArgs
- 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 enterpriseProxyAccessResource = new AliCloud.Dms.EnterpriseProxyAccess("enterpriseProxyAccessResource", new()
{
ProxyId = "string",
UserId = "string",
IndepAccount = "string",
IndepPassword = "string",
ProxyAccessId = "string",
});
example, err := dms.NewEnterpriseProxyAccess(ctx, "enterpriseProxyAccessResource", &dms.EnterpriseProxyAccessArgs{
ProxyId: pulumi.String("string"),
UserId: pulumi.String("string"),
IndepAccount: pulumi.String("string"),
IndepPassword: pulumi.String("string"),
ProxyAccessId: pulumi.String("string"),
})
var enterpriseProxyAccessResource = new EnterpriseProxyAccess("enterpriseProxyAccessResource", EnterpriseProxyAccessArgs.builder()
.proxyId("string")
.userId("string")
.indepAccount("string")
.indepPassword("string")
.proxyAccessId("string")
.build());
enterprise_proxy_access_resource = alicloud.dms.EnterpriseProxyAccess("enterpriseProxyAccessResource",
proxy_id="string",
user_id="string",
indep_account="string",
indep_password="string",
proxy_access_id="string")
const enterpriseProxyAccessResource = new alicloud.dms.EnterpriseProxyAccess("enterpriseProxyAccessResource", {
proxyId: "string",
userId: "string",
indepAccount: "string",
indepPassword: "string",
proxyAccessId: "string",
});
type: alicloud:dms:EnterpriseProxyAccess
properties:
indepAccount: string
indepPassword: string
proxyAccessId: string
proxyId: string
userId: string
EnterpriseProxyAccess 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 EnterpriseProxyAccess resource accepts the following input properties:
- Proxy
Id string - The ID of the security agent.
- User
Id string - The user ID.
- Indep
Account string - Database account.
- Indep
Password string - Database password.
- Proxy
Access stringId - 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 string - The ID of the security agent.
- User
Id string - The user ID.
- Indep
Account string - Database account.
- Indep
Password string - Database password.
- Proxy
Access stringId - 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 String - The ID of the security agent.
- user
Id String - The user ID.
- indep
Account String - Database account.
- indep
Password String - Database password.
- proxy
Access StringId - 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 string - The ID of the security agent.
- user
Id string - The user ID.
- indep
Account string - Database account.
- indep
Password string - Database password.
- proxy
Access stringId - 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.
- indep_
account str - Database account.
- indep_
password str - Database password.
- proxy_
access_ strid - 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 String - The ID of the security agent.
- user
Id String - The user ID.
- indep
Account String - Database account.
- indep
Password String - Database password.
- proxy
Access StringId - 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the EnterpriseProxyAccess resource produces the following output properties:
- Access
Id string - The authorized account of the security agent.
- Access
Secret string - Secure access agent authorization password.
- Create
Time string - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The ID of the instance.
- Origin
Info 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.
- User
Name string - User nickname.
- User
Uid string - User UID.
- Access
Id string - The authorized account of the security agent.
- Access
Secret string - Secure access agent authorization password.
- Create
Time string - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The ID of the instance.
- Origin
Info 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.
- User
Name string - User nickname.
- User
Uid string - User UID.
- access
Id String - The authorized account of the security agent.
- access
Secret String - Secure access agent authorization password.
- create
Time String - id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ID of the instance.
- origin
Info 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.
- user
Name String - User nickname.
- user
Uid String - User UID.
- access
Id string - The authorized account of the security agent.
- access
Secret string - Secure access agent authorization password.
- create
Time string - id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - The ID of the instance.
- origin
Info 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.
- user
Name string - User nickname.
- user
Uid string - User UID.
- access_
id str - The authorized account of the security agent.
- access_
secret str - Secure access agent authorization password.
- create_
time str - id str
- The provider-assigned unique ID for this managed resource.
- 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.
- user_
name str - User nickname.
- user_
uid str - User UID.
- access
Id String - The authorized account of the security agent.
- access
Secret String - Secure access agent authorization password.
- create
Time String - id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ID of the instance.
- origin
Info 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.
- user
Name String - User nickname.
- user
Uid String - User UID.
Look up Existing EnterpriseProxyAccess Resource
Get an existing EnterpriseProxyAccess 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?: EnterpriseProxyAccessState, opts?: CustomResourceOptions): EnterpriseProxyAccess
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_id: Optional[str] = None,
access_secret: Optional[str] = None,
create_time: Optional[str] = None,
indep_account: Optional[str] = None,
indep_password: Optional[str] = None,
instance_id: Optional[str] = None,
origin_info: Optional[str] = None,
proxy_access_id: Optional[str] = None,
proxy_id: Optional[str] = None,
user_id: Optional[str] = None,
user_name: Optional[str] = None,
user_uid: Optional[str] = None) -> EnterpriseProxyAccess
func GetEnterpriseProxyAccess(ctx *Context, name string, id IDInput, state *EnterpriseProxyAccessState, opts ...ResourceOption) (*EnterpriseProxyAccess, error)
public static EnterpriseProxyAccess Get(string name, Input<string> id, EnterpriseProxyAccessState? state, CustomResourceOptions? opts = null)
public static EnterpriseProxyAccess get(String name, Output<String> id, EnterpriseProxyAccessState 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.
- Access
Id string - The authorized account of the security agent.
- Access
Secret string - Secure access agent authorization password.
- Create
Time string - Indep
Account string - Database account.
- Indep
Password string - Database password.
- Instance
Id string - The ID of the instance.
- Origin
Info 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.
- Proxy
Access stringId - 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 string - The ID of the security agent.
- User
Id string - The user ID.
- User
Name string - User nickname.
- User
Uid string - User UID.
- Access
Id string - The authorized account of the security agent.
- Access
Secret string - Secure access agent authorization password.
- Create
Time string - Indep
Account string - Database account.
- Indep
Password string - Database password.
- Instance
Id string - The ID of the instance.
- Origin
Info 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.
- Proxy
Access stringId - 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 string - The ID of the security agent.
- User
Id string - The user ID.
- User
Name string - User nickname.
- User
Uid string - User UID.
- access
Id String - The authorized account of the security agent.
- access
Secret String - Secure access agent authorization password.
- create
Time String - indep
Account String - Database account.
- indep
Password String - Database password.
- instance
Id String - The ID of the instance.
- origin
Info 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.
- proxy
Access StringId - 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 String - The ID of the security agent.
- user
Id String - The user ID.
- user
Name String - User nickname.
- user
Uid String - User UID.
- access
Id string - The authorized account of the security agent.
- access
Secret string - Secure access agent authorization password.
- create
Time string - indep
Account string - Database account.
- indep
Password string - Database password.
- instance
Id string - The ID of the instance.
- origin
Info 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.
- proxy
Access stringId - 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 string - The ID of the security agent.
- user
Id string - The user ID.
- user
Name string - User nickname.
- user
Uid string - User UID.
- access_
id str - The authorized account of the security agent.
- access_
secret str - Secure access agent authorization password.
- create_
time str - indep_
account str - Database account.
- indep_
password str - Database password.
- 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_ strid - 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.
- access
Id String - The authorized account of the security agent.
- access
Secret String - Secure access agent authorization password.
- create
Time String - indep
Account String - Database account.
- indep
Password String - Database password.
- instance
Id String - The ID of the instance.
- origin
Info 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.
- proxy
Access StringId - 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 String - The ID of the security agent.
- user
Id String - The user ID.
- user
Name String - User nickname.
- user
Uid String - User UID.
Import
DMS Enterprise Proxy Access can be imported using the id, e.g.
$ pulumi import alicloud:dms/enterpriseProxyAccess:EnterpriseProxyAccess example <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.