Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine
volcengine.cloud_identity.PermissionSetAssignments
Explore with Pulumi AI
Use this data source to query detailed information of cloud identity permission set assignments
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooPermissionSet = new Volcengine.Cloud_identity.PermissionSet("fooPermissionSet", new()
{
Description = "tf",
SessionDuration = 5000,
PermissionPolicies = new[]
{
new Volcengine.Cloud_identity.Inputs.PermissionSetPermissionPolicyArgs
{
PermissionPolicyType = "System",
PermissionPolicyName = "AdministratorAccess",
InlinePolicyDocument = "",
},
new Volcengine.Cloud_identity.Inputs.PermissionSetPermissionPolicyArgs
{
PermissionPolicyType = "System",
PermissionPolicyName = "ReadOnlyAccess",
InlinePolicyDocument = "",
},
new Volcengine.Cloud_identity.Inputs.PermissionSetPermissionPolicyArgs
{
PermissionPolicyType = "Inline",
InlinePolicyDocument = "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}",
},
},
});
var fooUser = new Volcengine.Cloud_identity.User("fooUser", new()
{
UserName = "acc-test-user",
DisplayName = "tf-test-user",
Description = "tf",
Email = "88@qq.com",
Phone = "181",
});
var fooPermissionSetAssignment = new Volcengine.Cloud_identity.PermissionSetAssignment("fooPermissionSetAssignment", new()
{
PermissionSetId = fooPermissionSet.Id,
TargetId = "210026****",
PrincipalType = "User",
PrincipalId = fooUser.Id,
});
var fooPermissionSetAssignments = Volcengine.Cloud_identity.PermissionSetAssignments.Invoke(new()
{
PermissionSetId = fooPermissionSetAssignment.PermissionSetId,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cloud_identity"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooPermissionSet, err := cloud_identity.NewPermissionSet(ctx, "fooPermissionSet", &cloud_identity.PermissionSetArgs{
Description: pulumi.String("tf"),
SessionDuration: pulumi.Int(5000),
PermissionPolicies: cloud_identity.PermissionSetPermissionPolicyArray{
&cloud_identity.PermissionSetPermissionPolicyArgs{
PermissionPolicyType: pulumi.String("System"),
PermissionPolicyName: pulumi.String("AdministratorAccess"),
InlinePolicyDocument: pulumi.String(""),
},
&cloud_identity.PermissionSetPermissionPolicyArgs{
PermissionPolicyType: pulumi.String("System"),
PermissionPolicyName: pulumi.String("ReadOnlyAccess"),
InlinePolicyDocument: pulumi.String(""),
},
&cloud_identity.PermissionSetPermissionPolicyArgs{
PermissionPolicyType: pulumi.String("Inline"),
InlinePolicyDocument: pulumi.String("{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}"),
},
},
})
if err != nil {
return err
}
fooUser, err := cloud_identity.NewUser(ctx, "fooUser", &cloud_identity.UserArgs{
UserName: pulumi.String("acc-test-user"),
DisplayName: pulumi.String("tf-test-user"),
Description: pulumi.String("tf"),
Email: pulumi.String("88@qq.com"),
Phone: pulumi.String("181"),
})
if err != nil {
return err
}
fooPermissionSetAssignment, err := cloud_identity.NewPermissionSetAssignment(ctx, "fooPermissionSetAssignment", &cloud_identity.PermissionSetAssignmentArgs{
PermissionSetId: fooPermissionSet.ID(),
TargetId: pulumi.String("210026****"),
PrincipalType: pulumi.String("User"),
PrincipalId: fooUser.ID(),
})
if err != nil {
return err
}
_ = cloud_identity.PermissionSetAssignmentsOutput(ctx, cloud_identity.PermissionSetAssignmentsOutputArgs{
PermissionSetId: fooPermissionSetAssignment.PermissionSetId,
}, nil)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.cloud_identity.PermissionSet;
import com.pulumi.volcengine.cloud_identity.PermissionSetArgs;
import com.pulumi.volcengine.cloud_identity.inputs.PermissionSetPermissionPolicyArgs;
import com.pulumi.volcengine.cloud_identity.User;
import com.pulumi.volcengine.cloud_identity.UserArgs;
import com.pulumi.volcengine.cloud_identity.PermissionSetAssignment;
import com.pulumi.volcengine.cloud_identity.PermissionSetAssignmentArgs;
import com.pulumi.volcengine.cloud_identity.Cloud_identityFunctions;
import com.pulumi.volcengine.cloud_identity.inputs.PermissionSetAssignmentsArgs;
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 fooPermissionSet = new PermissionSet("fooPermissionSet", PermissionSetArgs.builder()
.description("tf")
.sessionDuration(5000)
.permissionPolicies(
PermissionSetPermissionPolicyArgs.builder()
.permissionPolicyType("System")
.permissionPolicyName("AdministratorAccess")
.inlinePolicyDocument("")
.build(),
PermissionSetPermissionPolicyArgs.builder()
.permissionPolicyType("System")
.permissionPolicyName("ReadOnlyAccess")
.inlinePolicyDocument("")
.build(),
PermissionSetPermissionPolicyArgs.builder()
.permissionPolicyType("Inline")
.inlinePolicyDocument("{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}")
.build())
.build());
var fooUser = new User("fooUser", UserArgs.builder()
.userName("acc-test-user")
.displayName("tf-test-user")
.description("tf")
.email("88@qq.com")
.phone("181")
.build());
var fooPermissionSetAssignment = new PermissionSetAssignment("fooPermissionSetAssignment", PermissionSetAssignmentArgs.builder()
.permissionSetId(fooPermissionSet.id())
.targetId("210026****")
.principalType("User")
.principalId(fooUser.id())
.build());
final var fooPermissionSetAssignments = Cloud_identityFunctions.PermissionSetAssignments(PermissionSetAssignmentsArgs.builder()
.permissionSetId(fooPermissionSetAssignment.permissionSetId())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_permission_set = volcengine.cloud_identity.PermissionSet("fooPermissionSet",
description="tf",
session_duration=5000,
permission_policies=[
volcengine.cloud_identity.PermissionSetPermissionPolicyArgs(
permission_policy_type="System",
permission_policy_name="AdministratorAccess",
inline_policy_document="",
),
volcengine.cloud_identity.PermissionSetPermissionPolicyArgs(
permission_policy_type="System",
permission_policy_name="ReadOnlyAccess",
inline_policy_document="",
),
volcengine.cloud_identity.PermissionSetPermissionPolicyArgs(
permission_policy_type="Inline",
inline_policy_document="{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}",
),
])
foo_user = volcengine.cloud_identity.User("fooUser",
user_name="acc-test-user",
display_name="tf-test-user",
description="tf",
email="88@qq.com",
phone="181")
foo_permission_set_assignment = volcengine.cloud_identity.PermissionSetAssignment("fooPermissionSetAssignment",
permission_set_id=foo_permission_set.id,
target_id="210026****",
principal_type="User",
principal_id=foo_user.id)
foo_permission_set_assignments = volcengine.cloud_identity.permission_set_assignments_output(permission_set_id=foo_permission_set_assignment.permission_set_id)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooPermissionSet = new volcengine.cloud_identity.PermissionSet("fooPermissionSet", {
description: "tf",
sessionDuration: 5000,
permissionPolicies: [
{
permissionPolicyType: "System",
permissionPolicyName: "AdministratorAccess",
inlinePolicyDocument: "",
},
{
permissionPolicyType: "System",
permissionPolicyName: "ReadOnlyAccess",
inlinePolicyDocument: "",
},
{
permissionPolicyType: "Inline",
inlinePolicyDocument: "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}",
},
],
});
const fooUser = new volcengine.cloud_identity.User("fooUser", {
userName: "acc-test-user",
displayName: "tf-test-user",
description: "tf",
email: "88@qq.com",
phone: "181",
});
const fooPermissionSetAssignment = new volcengine.cloud_identity.PermissionSetAssignment("fooPermissionSetAssignment", {
permissionSetId: fooPermissionSet.id,
targetId: "210026****",
principalType: "User",
principalId: fooUser.id,
});
const fooPermissionSetAssignments = volcengine.cloud_identity.PermissionSetAssignmentsOutput({
permissionSetId: fooPermissionSetAssignment.permissionSetId,
});
resources:
fooPermissionSet:
type: volcengine:cloud_identity:PermissionSet
properties:
description: tf
sessionDuration: 5000
permissionPolicies:
- permissionPolicyType: System
permissionPolicyName: AdministratorAccess
inlinePolicyDocument:
- permissionPolicyType: System
permissionPolicyName: ReadOnlyAccess
inlinePolicyDocument:
- permissionPolicyType: Inline
inlinePolicyDocument: '{"Statement":[{"Effect":"Allow","Action":["auto_scaling:DescribeScalingGroups"],"Resource":["*"]}]}'
fooUser:
type: volcengine:cloud_identity:User
properties:
userName: acc-test-user
displayName: tf-test-user
description: tf
email: 88@qq.com
phone: '181'
fooPermissionSetAssignment:
type: volcengine:cloud_identity:PermissionSetAssignment
properties:
permissionSetId: ${fooPermissionSet.id}
targetId: 210026****
principalType: User
principalId: ${fooUser.id}
variables:
fooPermissionSetAssignments:
fn::invoke:
Function: volcengine:cloud_identity:PermissionSetAssignments
Arguments:
permissionSetId: ${fooPermissionSetAssignment.permissionSetId}
Using PermissionSetAssignments
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 permissionSetAssignments(args: PermissionSetAssignmentsArgs, opts?: InvokeOptions): Promise<PermissionSetAssignmentsResult>
function permissionSetAssignmentsOutput(args: PermissionSetAssignmentsOutputArgs, opts?: InvokeOptions): Output<PermissionSetAssignmentsResult>
def permission_set_assignments(name_regex: Optional[str] = None,
output_file: Optional[str] = None,
permission_set_id: Optional[str] = None,
principal_id: Optional[str] = None,
principal_type: Optional[str] = None,
target_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> PermissionSetAssignmentsResult
def permission_set_assignments_output(name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
permission_set_id: Optional[pulumi.Input[str]] = None,
principal_id: Optional[pulumi.Input[str]] = None,
principal_type: Optional[pulumi.Input[str]] = None,
target_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[PermissionSetAssignmentsResult]
func PermissionSetAssignments(ctx *Context, args *PermissionSetAssignmentsArgs, opts ...InvokeOption) (*PermissionSetAssignmentsResult, error)
func PermissionSetAssignmentsOutput(ctx *Context, args *PermissionSetAssignmentsOutputArgs, opts ...InvokeOption) PermissionSetAssignmentsResultOutput
public static class PermissionSetAssignments
{
public static Task<PermissionSetAssignmentsResult> InvokeAsync(PermissionSetAssignmentsArgs args, InvokeOptions? opts = null)
public static Output<PermissionSetAssignmentsResult> Invoke(PermissionSetAssignmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<PermissionSetAssignmentsResult> permissionSetAssignments(PermissionSetAssignmentsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: volcengine:cloud_identity:PermissionSetAssignments
arguments:
# arguments dictionary
The following arguments are supported:
- Name
Regex string - A Name Regex of Resource.
- Output
File string - File name where to save data source results.
- Permission
Set stringId - The id of cloud identity permission set.
- Principal
Id string - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - Principal
Type string - The principal type of cloud identity permission set. Valid values:
User
,Group
. - Target
Id string - The target account id of cloud identity permission set assignment.
- Name
Regex string - A Name Regex of Resource.
- Output
File string - File name where to save data source results.
- Permission
Set stringId - The id of cloud identity permission set.
- Principal
Id string - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - Principal
Type string - The principal type of cloud identity permission set. Valid values:
User
,Group
. - Target
Id string - The target account id of cloud identity permission set assignment.
- name
Regex String - A Name Regex of Resource.
- output
File String - File name where to save data source results.
- permission
Set StringId - The id of cloud identity permission set.
- principal
Id String - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - principal
Type String - The principal type of cloud identity permission set. Valid values:
User
,Group
. - target
Id String - The target account id of cloud identity permission set assignment.
- name
Regex string - A Name Regex of Resource.
- output
File string - File name where to save data source results.
- permission
Set stringId - The id of cloud identity permission set.
- principal
Id string - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - principal
Type string - The principal type of cloud identity permission set. Valid values:
User
,Group
. - target
Id string - The target account id of cloud identity permission set assignment.
- name_
regex str - A Name Regex of Resource.
- output_
file str - File name where to save data source results.
- permission_
set_ strid - The id of cloud identity permission set.
- principal_
id str - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - principal_
type str - The principal type of cloud identity permission set. Valid values:
User
,Group
. - target_
id str - The target account id of cloud identity permission set assignment.
- name
Regex String - A Name Regex of Resource.
- output
File String - File name where to save data source results.
- permission
Set StringId - The id of cloud identity permission set.
- principal
Id String - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - principal
Type String - The principal type of cloud identity permission set. Valid values:
User
,Group
. - target
Id String - The target account id of cloud identity permission set assignment.
PermissionSetAssignments Result
The following output properties are available:
- Assignments
List<Permission
Set Assignments Assignment> - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Name
Regex string - Output
File string - Permission
Set stringId - The id of the cloud identity permission set.
- Principal
Id string - The principal id of the cloud identity permission set assignment.
- Principal
Type string - The principal type of the cloud identity permission set assignment.
- Target
Id string - The target account id of the cloud identity permission set assignment.
- Assignments
[]Permission
Set Assignments Assignment - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Name
Regex string - Output
File string - Permission
Set stringId - The id of the cloud identity permission set.
- Principal
Id string - The principal id of the cloud identity permission set assignment.
- Principal
Type string - The principal type of the cloud identity permission set assignment.
- Target
Id string - The target account id of the cloud identity permission set assignment.
- assignments
List<Permission
Set Assignments Assignment> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of query.
- name
Regex String - output
File String - permission
Set StringId - The id of the cloud identity permission set.
- principal
Id String - The principal id of the cloud identity permission set assignment.
- principal
Type String - The principal type of the cloud identity permission set assignment.
- target
Id String - The target account id of the cloud identity permission set assignment.
- assignments
Permission
Set Assignments Assignment[] - The collection of query.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of query.
- name
Regex string - output
File string - permission
Set stringId - The id of the cloud identity permission set.
- principal
Id string - The principal id of the cloud identity permission set assignment.
- principal
Type string - The principal type of the cloud identity permission set assignment.
- target
Id string - The target account id of the cloud identity permission set assignment.
- assignments
Sequence[Permission
Set Assignments Assignment] - The collection of query.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of query.
- name_
regex str - output_
file str - permission_
set_ strid - The id of the cloud identity permission set.
- principal_
id str - The principal id of the cloud identity permission set assignment.
- principal_
type str - The principal type of the cloud identity permission set assignment.
- target_
id str - The target account id of the cloud identity permission set assignment.
- assignments List<Property Map>
- The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of query.
- name
Regex String - output
File String - permission
Set StringId - The id of the cloud identity permission set.
- principal
Id String - The principal id of the cloud identity permission set assignment.
- principal
Type String - The principal type of the cloud identity permission set assignment.
- target
Id String - The target account id of the cloud identity permission set assignment.
Supporting Types
PermissionSetAssignmentsAssignment
- Create
Time string - The create time of the cloud identity permission set assignment.
- Id string
- The id of the cloud identity permission set.
- Permission
Set stringId - The id of cloud identity permission set.
- Permission
Set stringName - The name of the cloud identity permission set.
- Principal
Id string - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - Principal
Type string - The principal type of cloud identity permission set. Valid values:
User
,Group
. - Target
Id string - The target account id of cloud identity permission set assignment.
- Create
Time string - The create time of the cloud identity permission set assignment.
- Id string
- The id of the cloud identity permission set.
- Permission
Set stringId - The id of cloud identity permission set.
- Permission
Set stringName - The name of the cloud identity permission set.
- Principal
Id string - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - Principal
Type string - The principal type of cloud identity permission set. Valid values:
User
,Group
. - Target
Id string - The target account id of cloud identity permission set assignment.
- create
Time String - The create time of the cloud identity permission set assignment.
- id String
- The id of the cloud identity permission set.
- permission
Set StringId - The id of cloud identity permission set.
- permission
Set StringName - The name of the cloud identity permission set.
- principal
Id String - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - principal
Type String - The principal type of cloud identity permission set. Valid values:
User
,Group
. - target
Id String - The target account id of cloud identity permission set assignment.
- create
Time string - The create time of the cloud identity permission set assignment.
- id string
- The id of the cloud identity permission set.
- permission
Set stringId - The id of cloud identity permission set.
- permission
Set stringName - The name of the cloud identity permission set.
- principal
Id string - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - principal
Type string - The principal type of cloud identity permission set. Valid values:
User
,Group
. - target
Id string - The target account id of cloud identity permission set assignment.
- create_
time str - The create time of the cloud identity permission set assignment.
- id str
- The id of the cloud identity permission set.
- permission_
set_ strid - The id of cloud identity permission set.
- permission_
set_ strname - The name of the cloud identity permission set.
- principal_
id str - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - principal_
type str - The principal type of cloud identity permission set. Valid values:
User
,Group
. - target_
id str - The target account id of cloud identity permission set assignment.
- create
Time String - The create time of the cloud identity permission set assignment.
- id String
- The id of the cloud identity permission set.
- permission
Set StringId - The id of cloud identity permission set.
- permission
Set StringName - The name of the cloud identity permission set.
- principal
Id String - The principal id of cloud identity permission set. When the
principal_type
isUser
, this field is specified toUserId
. When theprincipal_type
isGroup
, this field is specified toGroupId
. - principal
Type String - The principal type of cloud identity permission set. Valid values:
User
,Group
. - target
Id String - The target account id of cloud identity permission set assignment.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.