1. Packages
  2. Ucloud Provider
  3. API Docs
  4. IamGroupPolicyAttachment
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

ucloud.IamGroupPolicyAttachment

Explore with Pulumi AI

ucloud logo
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

    Provides an IAM group policy attachment resource.

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      fooIamGroup:
        type: ucloud:IamGroup
        properties:
          comment: comment
      fooIamProject:
        type: ucloud:IamProject
      fooIamPolicy:
        type: ucloud:IamPolicy
        properties:
          comment: comment
          policy:
            fn::toJSON:
              Version: '1'
              Statement:
                - Action:
                    - '*'
                  Effect: Allow
                  Resource:
                    - '*'
          scopeType: Project
      fooIamGroupPolicyAttachment:
        type: ucloud:IamGroupPolicyAttachment
        properties:
          groupName: ${fooIamGroup.name}
          policyUrn: ${fooIamPolicy.ucloudUrn}
          projectId: ${fooIamProject.iamProjectId}
    

    Create IamGroupPolicyAttachment Resource

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

    Constructor syntax

    new IamGroupPolicyAttachment(name: string, args: IamGroupPolicyAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def IamGroupPolicyAttachment(resource_name: str,
                                 args: IamGroupPolicyAttachmentArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamGroupPolicyAttachment(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 group_name: Optional[str] = None,
                                 policy_urn: Optional[str] = None,
                                 iam_group_policy_attachment_id: Optional[str] = None,
                                 project_id: Optional[str] = None)
    func NewIamGroupPolicyAttachment(ctx *Context, name string, args IamGroupPolicyAttachmentArgs, opts ...ResourceOption) (*IamGroupPolicyAttachment, error)
    public IamGroupPolicyAttachment(string name, IamGroupPolicyAttachmentArgs args, CustomResourceOptions? opts = null)
    public IamGroupPolicyAttachment(String name, IamGroupPolicyAttachmentArgs args)
    public IamGroupPolicyAttachment(String name, IamGroupPolicyAttachmentArgs args, CustomResourceOptions options)
    
    type: ucloud:IamGroupPolicyAttachment
    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 IamGroupPolicyAttachmentArgs
    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 IamGroupPolicyAttachmentArgs
    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 IamGroupPolicyAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamGroupPolicyAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamGroupPolicyAttachmentArgs
    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 iamGroupPolicyAttachmentResource = new Ucloud.IamGroupPolicyAttachment("iamGroupPolicyAttachmentResource", new()
    {
        GroupName = "string",
        PolicyUrn = "string",
        IamGroupPolicyAttachmentId = "string",
        ProjectId = "string",
    });
    
    example, err := ucloud.NewIamGroupPolicyAttachment(ctx, "iamGroupPolicyAttachmentResource", &ucloud.IamGroupPolicyAttachmentArgs{
    	GroupName:                  pulumi.String("string"),
    	PolicyUrn:                  pulumi.String("string"),
    	IamGroupPolicyAttachmentId: pulumi.String("string"),
    	ProjectId:                  pulumi.String("string"),
    })
    
    var iamGroupPolicyAttachmentResource = new IamGroupPolicyAttachment("iamGroupPolicyAttachmentResource", IamGroupPolicyAttachmentArgs.builder()
        .groupName("string")
        .policyUrn("string")
        .iamGroupPolicyAttachmentId("string")
        .projectId("string")
        .build());
    
    iam_group_policy_attachment_resource = ucloud.IamGroupPolicyAttachment("iamGroupPolicyAttachmentResource",
        group_name="string",
        policy_urn="string",
        iam_group_policy_attachment_id="string",
        project_id="string")
    
    const iamGroupPolicyAttachmentResource = new ucloud.IamGroupPolicyAttachment("iamGroupPolicyAttachmentResource", {
        groupName: "string",
        policyUrn: "string",
        iamGroupPolicyAttachmentId: "string",
        projectId: "string",
    });
    
    type: ucloud:IamGroupPolicyAttachment
    properties:
        groupName: string
        iamGroupPolicyAttachmentId: string
        policyUrn: string
        projectId: string
    

    IamGroupPolicyAttachment 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 IamGroupPolicyAttachment resource accepts the following input properties:

    GroupName string
    Name of the IAM user group.
    PolicyUrn string
    URN of the IAM policy, including user policy and system policy.
    IamGroupPolicyAttachmentId string
    ProjectId string
    ID of the IAM project, which is the scope of the policy.
    GroupName string
    Name of the IAM user group.
    PolicyUrn string
    URN of the IAM policy, including user policy and system policy.
    IamGroupPolicyAttachmentId string
    ProjectId string
    ID of the IAM project, which is the scope of the policy.
    groupName String
    Name of the IAM user group.
    policyUrn String
    URN of the IAM policy, including user policy and system policy.
    iamGroupPolicyAttachmentId String
    projectId String
    ID of the IAM project, which is the scope of the policy.
    groupName string
    Name of the IAM user group.
    policyUrn string
    URN of the IAM policy, including user policy and system policy.
    iamGroupPolicyAttachmentId string
    projectId string
    ID of the IAM project, which is the scope of the policy.
    group_name str
    Name of the IAM user group.
    policy_urn str
    URN of the IAM policy, including user policy and system policy.
    iam_group_policy_attachment_id str
    project_id str
    ID of the IAM project, which is the scope of the policy.
    groupName String
    Name of the IAM user group.
    policyUrn String
    URN of the IAM policy, including user policy and system policy.
    iamGroupPolicyAttachmentId String
    projectId String
    ID of the IAM project, which is the scope of the policy.

    Outputs

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

    CreateTime string
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime string
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    id string
    The provider-assigned unique ID for this managed resource.
    create_time str
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    id str
    The provider-assigned unique ID for this managed resource.
    createTime String
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IamGroupPolicyAttachment Resource

    Get an existing IamGroupPolicyAttachment 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?: IamGroupPolicyAttachmentState, opts?: CustomResourceOptions): IamGroupPolicyAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            group_name: Optional[str] = None,
            iam_group_policy_attachment_id: Optional[str] = None,
            policy_urn: Optional[str] = None,
            project_id: Optional[str] = None) -> IamGroupPolicyAttachment
    func GetIamGroupPolicyAttachment(ctx *Context, name string, id IDInput, state *IamGroupPolicyAttachmentState, opts ...ResourceOption) (*IamGroupPolicyAttachment, error)
    public static IamGroupPolicyAttachment Get(string name, Input<string> id, IamGroupPolicyAttachmentState? state, CustomResourceOptions? opts = null)
    public static IamGroupPolicyAttachment get(String name, Output<String> id, IamGroupPolicyAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: ucloud:IamGroupPolicyAttachment    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
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    GroupName string
    Name of the IAM user group.
    IamGroupPolicyAttachmentId string
    PolicyUrn string
    URN of the IAM policy, including user policy and system policy.
    ProjectId string
    ID of the IAM project, which is the scope of the policy.
    CreateTime string
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    GroupName string
    Name of the IAM user group.
    IamGroupPolicyAttachmentId string
    PolicyUrn string
    URN of the IAM policy, including user policy and system policy.
    ProjectId string
    ID of the IAM project, which is the scope of the policy.
    createTime String
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    groupName String
    Name of the IAM user group.
    iamGroupPolicyAttachmentId String
    policyUrn String
    URN of the IAM policy, including user policy and system policy.
    projectId String
    ID of the IAM project, which is the scope of the policy.
    createTime string
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    groupName string
    Name of the IAM user group.
    iamGroupPolicyAttachmentId string
    policyUrn string
    URN of the IAM policy, including user policy and system policy.
    projectId string
    ID of the IAM project, which is the scope of the policy.
    create_time str
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    group_name str
    Name of the IAM user group.
    iam_group_policy_attachment_id str
    policy_urn str
    URN of the IAM policy, including user policy and system policy.
    project_id str
    ID of the IAM project, which is the scope of the policy.
    createTime String
    The time of creation of group policy attachment, formatted in RFC3339 time string.
    groupName String
    Name of the IAM user group.
    iamGroupPolicyAttachmentId String
    policyUrn String
    URN of the IAM policy, including user policy and system policy.
    projectId String
    ID of the IAM project, which is the scope of the policy.

    Import

    IAM group policy attachment resource can be imported using account/<group-name>/<policy-urn> for account scope policy, or project/<project-id>/<group-name>/<policy-urn> for project scope policy, e.g.

    $ pulumi import ucloud:index/iamGroupPolicyAttachment:IamGroupPolicyAttachment example project/org-xxx/test-group/ucs:iam::ucs:policy/AdministratorAccess
    

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

    Package Details

    Repository
    ucloud ucloud/terraform-provider-ucloud
    License
    Notes
    This Pulumi package is based on the ucloud Terraform Provider.
    ucloud logo
    ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud