ucloud.IamUserPolicyAttachment
Explore with Pulumi AI
Provides an IAM group membership resource.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
fooIamUser:
type: ucloud:IamUser
properties:
loginEnable: false
isFrozen: false
fooIamProject:
type: ucloud:IamProject
fooIamPolicy:
type: ucloud:IamPolicy
properties:
comment: comment
policy:
fn::toJSON:
Version: '1'
Statement:
- Action:
- '*'
Effect: Allow
Resource:
- '*'
scopeType: Project
fooIamUserPolicyAttachment:
type: ucloud:IamUserPolicyAttachment
properties:
userName: ${fooIamUser.name}
policyUrn: ${fooIamPolicy.ucloudUrn}
projectId: ${fooIamProject.iamProjectId}
Create IamUserPolicyAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamUserPolicyAttachment(name: string, args: IamUserPolicyAttachmentArgs, opts?: CustomResourceOptions);
@overload
def IamUserPolicyAttachment(resource_name: str,
args: IamUserPolicyAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IamUserPolicyAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
policy_urn: Optional[str] = None,
user_name: Optional[str] = None,
iam_user_policy_attachment_id: Optional[str] = None,
project_id: Optional[str] = None)
func NewIamUserPolicyAttachment(ctx *Context, name string, args IamUserPolicyAttachmentArgs, opts ...ResourceOption) (*IamUserPolicyAttachment, error)
public IamUserPolicyAttachment(string name, IamUserPolicyAttachmentArgs args, CustomResourceOptions? opts = null)
public IamUserPolicyAttachment(String name, IamUserPolicyAttachmentArgs args)
public IamUserPolicyAttachment(String name, IamUserPolicyAttachmentArgs args, CustomResourceOptions options)
type: ucloud:IamUserPolicyAttachment
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 IamUserPolicyAttachmentArgs
- 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 IamUserPolicyAttachmentArgs
- 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 IamUserPolicyAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamUserPolicyAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamUserPolicyAttachmentArgs
- 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 iamUserPolicyAttachmentResource = new Ucloud.IamUserPolicyAttachment("iamUserPolicyAttachmentResource", new()
{
PolicyUrn = "string",
UserName = "string",
IamUserPolicyAttachmentId = "string",
ProjectId = "string",
});
example, err := ucloud.NewIamUserPolicyAttachment(ctx, "iamUserPolicyAttachmentResource", &ucloud.IamUserPolicyAttachmentArgs{
PolicyUrn: pulumi.String("string"),
UserName: pulumi.String("string"),
IamUserPolicyAttachmentId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
})
var iamUserPolicyAttachmentResource = new IamUserPolicyAttachment("iamUserPolicyAttachmentResource", IamUserPolicyAttachmentArgs.builder()
.policyUrn("string")
.userName("string")
.iamUserPolicyAttachmentId("string")
.projectId("string")
.build());
iam_user_policy_attachment_resource = ucloud.IamUserPolicyAttachment("iamUserPolicyAttachmentResource",
policy_urn="string",
user_name="string",
iam_user_policy_attachment_id="string",
project_id="string")
const iamUserPolicyAttachmentResource = new ucloud.IamUserPolicyAttachment("iamUserPolicyAttachmentResource", {
policyUrn: "string",
userName: "string",
iamUserPolicyAttachmentId: "string",
projectId: "string",
});
type: ucloud:IamUserPolicyAttachment
properties:
iamUserPolicyAttachmentId: string
policyUrn: string
projectId: string
userName: string
IamUserPolicyAttachment 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 IamUserPolicyAttachment resource accepts the following input properties:
- Policy
Urn string - URN of the IAM policy, including user policy and system policy.
- User
Name string - Name of the IAM user.
- Iam
User stringPolicy Attachment Id - Project
Id string - ID of the IAM project, which is the scope of the policy.
- Policy
Urn string - URN of the IAM policy, including user policy and system policy.
- User
Name string - Name of the IAM user.
- Iam
User stringPolicy Attachment Id - Project
Id string - ID of the IAM project, which is the scope of the policy.
- policy
Urn String - URN of the IAM policy, including user policy and system policy.
- user
Name String - Name of the IAM user.
- iam
User StringPolicy Attachment Id - project
Id String - ID of the IAM project, which is the scope of the policy.
- policy
Urn string - URN of the IAM policy, including user policy and system policy.
- user
Name string - Name of the IAM user.
- iam
User stringPolicy Attachment Id - project
Id string - ID of the IAM project, which is the scope of the policy.
- policy_
urn str - URN of the IAM policy, including user policy and system policy.
- user_
name str - Name of the IAM user.
- iam_
user_ strpolicy_ attachment_ id - project_
id str - ID of the IAM project, which is the scope of the policy.
- policy
Urn String - URN of the IAM policy, including user policy and system policy.
- user
Name String - Name of the IAM user.
- iam
User StringPolicy Attachment Id - project
Id 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 IamUserPolicyAttachment resource produces the following output properties:
- Create
Time 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 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 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 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.
- create
Time 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 IamUserPolicyAttachment Resource
Get an existing IamUserPolicyAttachment 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?: IamUserPolicyAttachmentState, opts?: CustomResourceOptions): IamUserPolicyAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
iam_user_policy_attachment_id: Optional[str] = None,
policy_urn: Optional[str] = None,
project_id: Optional[str] = None,
user_name: Optional[str] = None) -> IamUserPolicyAttachment
func GetIamUserPolicyAttachment(ctx *Context, name string, id IDInput, state *IamUserPolicyAttachmentState, opts ...ResourceOption) (*IamUserPolicyAttachment, error)
public static IamUserPolicyAttachment Get(string name, Input<string> id, IamUserPolicyAttachmentState? state, CustomResourceOptions? opts = null)
public static IamUserPolicyAttachment get(String name, Output<String> id, IamUserPolicyAttachmentState state, CustomResourceOptions options)
resources: _: type: ucloud:IamUserPolicyAttachment 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.
- Create
Time string - The time of creation of group policy attachment, formatted in RFC3339 time string.
- Iam
User stringPolicy Attachment Id - Policy
Urn string - URN of the IAM policy, including user policy and system policy.
- Project
Id string - ID of the IAM project, which is the scope of the policy.
- User
Name string - Name of the IAM user.
- Create
Time string - The time of creation of group policy attachment, formatted in RFC3339 time string.
- Iam
User stringPolicy Attachment Id - Policy
Urn string - URN of the IAM policy, including user policy and system policy.
- Project
Id string - ID of the IAM project, which is the scope of the policy.
- User
Name string - Name of the IAM user.
- create
Time String - The time of creation of group policy attachment, formatted in RFC3339 time string.
- iam
User StringPolicy Attachment Id - policy
Urn String - URN of the IAM policy, including user policy and system policy.
- project
Id String - ID of the IAM project, which is the scope of the policy.
- user
Name String - Name of the IAM user.
- create
Time string - The time of creation of group policy attachment, formatted in RFC3339 time string.
- iam
User stringPolicy Attachment Id - policy
Urn string - URN of the IAM policy, including user policy and system policy.
- project
Id string - ID of the IAM project, which is the scope of the policy.
- user
Name string - Name of the IAM user.
- create_
time str - The time of creation of group policy attachment, formatted in RFC3339 time string.
- iam_
user_ strpolicy_ attachment_ id - 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.
- user_
name str - Name of the IAM user.
- create
Time String - The time of creation of group policy attachment, formatted in RFC3339 time string.
- iam
User StringPolicy Attachment Id - policy
Urn String - URN of the IAM policy, including user policy and system policy.
- project
Id String - ID of the IAM project, which is the scope of the policy.
- user
Name String - Name of the IAM user.
Import
IAM user policy attachment can be imported using account/<user-name>/<policy-urn>
for account scope policy, or project/<project-id>/<user-name>/<policy-urn>
for project scope policy, e.g.
$ pulumi import ucloud:index/iamUserPolicyAttachment:IamUserPolicyAttachment example project/org-xxx/test-user/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.