1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. OrganizationPolicySubAccountAttachment
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.OrganizationPolicySubAccountAttachment

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a organization policy_sub_account_attachment

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const policySubAccountAttachment = new tencentcloud.OrganizationPolicySubAccountAttachment("policySubAccountAttachment", {
        memberUin: 100028582828,
        orgSubAccountUin: 100028223737,
        policyId: 144256499,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    policy_sub_account_attachment = tencentcloud.OrganizationPolicySubAccountAttachment("policySubAccountAttachment",
        member_uin=100028582828,
        org_sub_account_uin=100028223737,
        policy_id=144256499)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewOrganizationPolicySubAccountAttachment(ctx, "policySubAccountAttachment", &tencentcloud.OrganizationPolicySubAccountAttachmentArgs{
    			MemberUin:        pulumi.Float64(100028582828),
    			OrgSubAccountUin: pulumi.Float64(100028223737),
    			PolicyId:         pulumi.Float64(144256499),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var policySubAccountAttachment = new Tencentcloud.OrganizationPolicySubAccountAttachment("policySubAccountAttachment", new()
        {
            MemberUin = 100028582828,
            OrgSubAccountUin = 100028223737,
            PolicyId = 144256499,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.OrganizationPolicySubAccountAttachment;
    import com.pulumi.tencentcloud.OrganizationPolicySubAccountAttachmentArgs;
    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 policySubAccountAttachment = new OrganizationPolicySubAccountAttachment("policySubAccountAttachment", OrganizationPolicySubAccountAttachmentArgs.builder()
                .memberUin(100028582828)
                .orgSubAccountUin(100028223737)
                .policyId(144256499)
                .build());
    
        }
    }
    
    resources:
      policySubAccountAttachment:
        type: tencentcloud:OrganizationPolicySubAccountAttachment
        properties:
          memberUin: 1.00028582828e+11
          orgSubAccountUin: 1.00028223737e+11
          policyId: 1.44256499e+08
    

    Create OrganizationPolicySubAccountAttachment Resource

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

    Constructor syntax

    new OrganizationPolicySubAccountAttachment(name: string, args: OrganizationPolicySubAccountAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationPolicySubAccountAttachment(resource_name: str,
                                               args: OrganizationPolicySubAccountAttachmentArgs,
                                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationPolicySubAccountAttachment(resource_name: str,
                                               opts: Optional[ResourceOptions] = None,
                                               member_uin: Optional[float] = None,
                                               org_sub_account_uin: Optional[float] = None,
                                               policy_id: Optional[float] = None,
                                               organization_policy_sub_account_attachment_id: Optional[str] = None)
    func NewOrganizationPolicySubAccountAttachment(ctx *Context, name string, args OrganizationPolicySubAccountAttachmentArgs, opts ...ResourceOption) (*OrganizationPolicySubAccountAttachment, error)
    public OrganizationPolicySubAccountAttachment(string name, OrganizationPolicySubAccountAttachmentArgs args, CustomResourceOptions? opts = null)
    public OrganizationPolicySubAccountAttachment(String name, OrganizationPolicySubAccountAttachmentArgs args)
    public OrganizationPolicySubAccountAttachment(String name, OrganizationPolicySubAccountAttachmentArgs args, CustomResourceOptions options)
    
    type: tencentcloud:OrganizationPolicySubAccountAttachment
    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 OrganizationPolicySubAccountAttachmentArgs
    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 OrganizationPolicySubAccountAttachmentArgs
    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 OrganizationPolicySubAccountAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationPolicySubAccountAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationPolicySubAccountAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    OrganizationPolicySubAccountAttachment Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The OrganizationPolicySubAccountAttachment resource accepts the following input properties:

    MemberUin double
    Organization member uin.
    OrgSubAccountUin double
    Organization administrator sub account uin list.
    PolicyId double
    Policy ID.
    OrganizationPolicySubAccountAttachmentId string
    ID of the resource.
    MemberUin float64
    Organization member uin.
    OrgSubAccountUin float64
    Organization administrator sub account uin list.
    PolicyId float64
    Policy ID.
    OrganizationPolicySubAccountAttachmentId string
    ID of the resource.
    memberUin Double
    Organization member uin.
    orgSubAccountUin Double
    Organization administrator sub account uin list.
    policyId Double
    Policy ID.
    organizationPolicySubAccountAttachmentId String
    ID of the resource.
    memberUin number
    Organization member uin.
    orgSubAccountUin number
    Organization administrator sub account uin list.
    policyId number
    Policy ID.
    organizationPolicySubAccountAttachmentId string
    ID of the resource.
    member_uin float
    Organization member uin.
    org_sub_account_uin float
    Organization administrator sub account uin list.
    policy_id float
    Policy ID.
    organization_policy_sub_account_attachment_id str
    ID of the resource.
    memberUin Number
    Organization member uin.
    orgSubAccountUin Number
    Organization administrator sub account uin list.
    policyId Number
    Policy ID.
    organizationPolicySubAccountAttachmentId String
    ID of the resource.

    Outputs

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

    CreateTime string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    IdentityId double
    Manage Identity ID.
    IdentityRoleAliasName string
    Identity role alias name.
    IdentityRoleName string
    Identity role name.
    OrgSubAccountName string
    Organization administrator sub account name.
    PolicyName string
    Policy name.
    UpdateTime string
    Update time.
    CreateTime string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    IdentityId float64
    Manage Identity ID.
    IdentityRoleAliasName string
    Identity role alias name.
    IdentityRoleName string
    Identity role name.
    OrgSubAccountName string
    Organization administrator sub account name.
    PolicyName string
    Policy name.
    UpdateTime string
    Update time.
    createTime String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    identityId Double
    Manage Identity ID.
    identityRoleAliasName String
    Identity role alias name.
    identityRoleName String
    Identity role name.
    orgSubAccountName String
    Organization administrator sub account name.
    policyName String
    Policy name.
    updateTime String
    Update time.
    createTime string
    Creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    identityId number
    Manage Identity ID.
    identityRoleAliasName string
    Identity role alias name.
    identityRoleName string
    Identity role name.
    orgSubAccountName string
    Organization administrator sub account name.
    policyName string
    Policy name.
    updateTime string
    Update time.
    create_time str
    Creation time.
    id str
    The provider-assigned unique ID for this managed resource.
    identity_id float
    Manage Identity ID.
    identity_role_alias_name str
    Identity role alias name.
    identity_role_name str
    Identity role name.
    org_sub_account_name str
    Organization administrator sub account name.
    policy_name str
    Policy name.
    update_time str
    Update time.
    createTime String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    identityId Number
    Manage Identity ID.
    identityRoleAliasName String
    Identity role alias name.
    identityRoleName String
    Identity role name.
    orgSubAccountName String
    Organization administrator sub account name.
    policyName String
    Policy name.
    updateTime String
    Update time.

    Look up Existing OrganizationPolicySubAccountAttachment Resource

    Get an existing OrganizationPolicySubAccountAttachment 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?: OrganizationPolicySubAccountAttachmentState, opts?: CustomResourceOptions): OrganizationPolicySubAccountAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            identity_id: Optional[float] = None,
            identity_role_alias_name: Optional[str] = None,
            identity_role_name: Optional[str] = None,
            member_uin: Optional[float] = None,
            org_sub_account_name: Optional[str] = None,
            org_sub_account_uin: Optional[float] = None,
            organization_policy_sub_account_attachment_id: Optional[str] = None,
            policy_id: Optional[float] = None,
            policy_name: Optional[str] = None,
            update_time: Optional[str] = None) -> OrganizationPolicySubAccountAttachment
    func GetOrganizationPolicySubAccountAttachment(ctx *Context, name string, id IDInput, state *OrganizationPolicySubAccountAttachmentState, opts ...ResourceOption) (*OrganizationPolicySubAccountAttachment, error)
    public static OrganizationPolicySubAccountAttachment Get(string name, Input<string> id, OrganizationPolicySubAccountAttachmentState? state, CustomResourceOptions? opts = null)
    public static OrganizationPolicySubAccountAttachment get(String name, Output<String> id, OrganizationPolicySubAccountAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:OrganizationPolicySubAccountAttachment    get:      id: ${id}
    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:
    CreateTime string
    Creation time.
    IdentityId double
    Manage Identity ID.
    IdentityRoleAliasName string
    Identity role alias name.
    IdentityRoleName string
    Identity role name.
    MemberUin double
    Organization member uin.
    OrgSubAccountName string
    Organization administrator sub account name.
    OrgSubAccountUin double
    Organization administrator sub account uin list.
    OrganizationPolicySubAccountAttachmentId string
    ID of the resource.
    PolicyId double
    Policy ID.
    PolicyName string
    Policy name.
    UpdateTime string
    Update time.
    CreateTime string
    Creation time.
    IdentityId float64
    Manage Identity ID.
    IdentityRoleAliasName string
    Identity role alias name.
    IdentityRoleName string
    Identity role name.
    MemberUin float64
    Organization member uin.
    OrgSubAccountName string
    Organization administrator sub account name.
    OrgSubAccountUin float64
    Organization administrator sub account uin list.
    OrganizationPolicySubAccountAttachmentId string
    ID of the resource.
    PolicyId float64
    Policy ID.
    PolicyName string
    Policy name.
    UpdateTime string
    Update time.
    createTime String
    Creation time.
    identityId Double
    Manage Identity ID.
    identityRoleAliasName String
    Identity role alias name.
    identityRoleName String
    Identity role name.
    memberUin Double
    Organization member uin.
    orgSubAccountName String
    Organization administrator sub account name.
    orgSubAccountUin Double
    Organization administrator sub account uin list.
    organizationPolicySubAccountAttachmentId String
    ID of the resource.
    policyId Double
    Policy ID.
    policyName String
    Policy name.
    updateTime String
    Update time.
    createTime string
    Creation time.
    identityId number
    Manage Identity ID.
    identityRoleAliasName string
    Identity role alias name.
    identityRoleName string
    Identity role name.
    memberUin number
    Organization member uin.
    orgSubAccountName string
    Organization administrator sub account name.
    orgSubAccountUin number
    Organization administrator sub account uin list.
    organizationPolicySubAccountAttachmentId string
    ID of the resource.
    policyId number
    Policy ID.
    policyName string
    Policy name.
    updateTime string
    Update time.
    create_time str
    Creation time.
    identity_id float
    Manage Identity ID.
    identity_role_alias_name str
    Identity role alias name.
    identity_role_name str
    Identity role name.
    member_uin float
    Organization member uin.
    org_sub_account_name str
    Organization administrator sub account name.
    org_sub_account_uin float
    Organization administrator sub account uin list.
    organization_policy_sub_account_attachment_id str
    ID of the resource.
    policy_id float
    Policy ID.
    policy_name str
    Policy name.
    update_time str
    Update time.
    createTime String
    Creation time.
    identityId Number
    Manage Identity ID.
    identityRoleAliasName String
    Identity role alias name.
    identityRoleName String
    Identity role name.
    memberUin Number
    Organization member uin.
    orgSubAccountName String
    Organization administrator sub account name.
    orgSubAccountUin Number
    Organization administrator sub account uin list.
    organizationPolicySubAccountAttachmentId String
    ID of the resource.
    policyId Number
    Policy ID.
    policyName String
    Policy name.
    updateTime String
    Update time.

    Import

    organization policy_sub_account_attachment can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/organizationPolicySubAccountAttachment:OrganizationPolicySubAccountAttachment policy_sub_account_attachment policyId#memberUin#orgSubAccountUin
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack