volcengine.cloud_identity.PermissionSet
Explore with Pulumi AI
Provides a resource to manage cloud identity permission set
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.cloud_identity.PermissionSet("foo", {
description: "tf",
permissionPolicies: [
{
inlinePolicyDocument: "",
permissionPolicyName: "AdministratorAccess",
permissionPolicyType: "System",
},
{
inlinePolicyDocument: "",
permissionPolicyName: "ReadOnlyAccess",
permissionPolicyType: "System",
},
{
inlinePolicyDocument: "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}",
permissionPolicyType: "Inline",
},
],
sessionDuration: 5000,
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.cloud_identity.PermissionSet("foo",
description="tf",
permission_policies=[
volcengine.cloud_identity.PermissionSetPermissionPolicyArgs(
inline_policy_document="",
permission_policy_name="AdministratorAccess",
permission_policy_type="System",
),
volcengine.cloud_identity.PermissionSetPermissionPolicyArgs(
inline_policy_document="",
permission_policy_name="ReadOnlyAccess",
permission_policy_type="System",
),
volcengine.cloud_identity.PermissionSetPermissionPolicyArgs(
inline_policy_document="{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}",
permission_policy_type="Inline",
),
],
session_duration=5000)
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 {
_, err := cloud_identity.NewPermissionSet(ctx, "foo", &cloud_identity.PermissionSetArgs{
Description: pulumi.String("tf"),
PermissionPolicies: cloud_identity.PermissionSetPermissionPolicyArray{
&cloud_identity.PermissionSetPermissionPolicyArgs{
InlinePolicyDocument: pulumi.String(""),
PermissionPolicyName: pulumi.String("AdministratorAccess"),
PermissionPolicyType: pulumi.String("System"),
},
&cloud_identity.PermissionSetPermissionPolicyArgs{
InlinePolicyDocument: pulumi.String(""),
PermissionPolicyName: pulumi.String("ReadOnlyAccess"),
PermissionPolicyType: pulumi.String("System"),
},
&cloud_identity.PermissionSetPermissionPolicyArgs{
InlinePolicyDocument: pulumi.String("{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}"),
PermissionPolicyType: pulumi.String("Inline"),
},
},
SessionDuration: pulumi.Int(5000),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Cloud_identity.PermissionSet("foo", new()
{
Description = "tf",
PermissionPolicies = new[]
{
new Volcengine.Cloud_identity.Inputs.PermissionSetPermissionPolicyArgs
{
InlinePolicyDocument = "",
PermissionPolicyName = "AdministratorAccess",
PermissionPolicyType = "System",
},
new Volcengine.Cloud_identity.Inputs.PermissionSetPermissionPolicyArgs
{
InlinePolicyDocument = "",
PermissionPolicyName = "ReadOnlyAccess",
PermissionPolicyType = "System",
},
new Volcengine.Cloud_identity.Inputs.PermissionSetPermissionPolicyArgs
{
InlinePolicyDocument = "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}",
PermissionPolicyType = "Inline",
},
},
SessionDuration = 5000,
});
});
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 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 foo = new PermissionSet("foo", PermissionSetArgs.builder()
.description("tf")
.permissionPolicies(
PermissionSetPermissionPolicyArgs.builder()
.inlinePolicyDocument("")
.permissionPolicyName("AdministratorAccess")
.permissionPolicyType("System")
.build(),
PermissionSetPermissionPolicyArgs.builder()
.inlinePolicyDocument("")
.permissionPolicyName("ReadOnlyAccess")
.permissionPolicyType("System")
.build(),
PermissionSetPermissionPolicyArgs.builder()
.inlinePolicyDocument("{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}")
.permissionPolicyType("Inline")
.build())
.sessionDuration(5000)
.build());
}
}
resources:
foo:
type: volcengine:cloud_identity:PermissionSet
properties:
description: tf
permissionPolicies:
- inlinePolicyDocument:
permissionPolicyName: AdministratorAccess
permissionPolicyType: System
- inlinePolicyDocument:
permissionPolicyName: ReadOnlyAccess
permissionPolicyType: System
- inlinePolicyDocument: '{"Statement":[{"Effect":"Allow","Action":["auto_scaling:DescribeScalingGroups"],"Resource":["*"]}]}'
permissionPolicyType: Inline
sessionDuration: 5000
Create PermissionSet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PermissionSet(name: string, args?: PermissionSetArgs, opts?: CustomResourceOptions);
@overload
def PermissionSet(resource_name: str,
args: Optional[PermissionSetArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def PermissionSet(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
permission_policies: Optional[Sequence[PermissionSetPermissionPolicyArgs]] = None,
relay_state: Optional[str] = None,
session_duration: Optional[int] = None)
func NewPermissionSet(ctx *Context, name string, args *PermissionSetArgs, opts ...ResourceOption) (*PermissionSet, error)
public PermissionSet(string name, PermissionSetArgs? args = null, CustomResourceOptions? opts = null)
public PermissionSet(String name, PermissionSetArgs args)
public PermissionSet(String name, PermissionSetArgs args, CustomResourceOptions options)
type: volcengine:cloud_identity:PermissionSet
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 PermissionSetArgs
- 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 PermissionSetArgs
- 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 PermissionSetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PermissionSetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PermissionSetArgs
- 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 permissionSetResource = new Volcengine.Cloud_identity.PermissionSet("permissionSetResource", new()
{
Description = "string",
Name = "string",
PermissionPolicies = new[]
{
new Volcengine.Cloud_identity.Inputs.PermissionSetPermissionPolicyArgs
{
PermissionPolicyType = "string",
InlinePolicyDocument = "string",
PermissionPolicyName = "string",
},
},
RelayState = "string",
SessionDuration = 0,
});
example, err := cloud_identity.NewPermissionSet(ctx, "permissionSetResource", &cloud_identity.PermissionSetArgs{
Description: pulumi.String("string"),
Name: pulumi.String("string"),
PermissionPolicies: cloud_identity.PermissionSetPermissionPolicyArray{
&cloud_identity.PermissionSetPermissionPolicyArgs{
PermissionPolicyType: pulumi.String("string"),
InlinePolicyDocument: pulumi.String("string"),
PermissionPolicyName: pulumi.String("string"),
},
},
RelayState: pulumi.String("string"),
SessionDuration: pulumi.Int(0),
})
var permissionSetResource = new PermissionSet("permissionSetResource", PermissionSetArgs.builder()
.description("string")
.name("string")
.permissionPolicies(PermissionSetPermissionPolicyArgs.builder()
.permissionPolicyType("string")
.inlinePolicyDocument("string")
.permissionPolicyName("string")
.build())
.relayState("string")
.sessionDuration(0)
.build());
permission_set_resource = volcengine.cloud_identity.PermissionSet("permissionSetResource",
description="string",
name="string",
permission_policies=[{
"permission_policy_type": "string",
"inline_policy_document": "string",
"permission_policy_name": "string",
}],
relay_state="string",
session_duration=0)
const permissionSetResource = new volcengine.cloud_identity.PermissionSet("permissionSetResource", {
description: "string",
name: "string",
permissionPolicies: [{
permissionPolicyType: "string",
inlinePolicyDocument: "string",
permissionPolicyName: "string",
}],
relayState: "string",
sessionDuration: 0,
});
type: volcengine:cloud_identity:PermissionSet
properties:
description: string
name: string
permissionPolicies:
- inlinePolicyDocument: string
permissionPolicyName: string
permissionPolicyType: string
relayState: string
sessionDuration: 0
PermissionSet 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 PermissionSet resource accepts the following input properties:
- Description string
- The description of the cloud identity permission set.
- Name string
- The name of the cloud identity permission set.
- Permission
Policies List<PermissionSet Permission Policy> - The policies of the cloud identity permission set.
- Relay
State string - The relay state of the cloud identity permission set.
- Session
Duration int - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- Description string
- The description of the cloud identity permission set.
- Name string
- The name of the cloud identity permission set.
- Permission
Policies []PermissionSet Permission Policy Args - The policies of the cloud identity permission set.
- Relay
State string - The relay state of the cloud identity permission set.
- Session
Duration int - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- description String
- The description of the cloud identity permission set.
- name String
- The name of the cloud identity permission set.
- permission
Policies List<PermissionSet Permission Policy> - The policies of the cloud identity permission set.
- relay
State String - The relay state of the cloud identity permission set.
- session
Duration Integer - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- description string
- The description of the cloud identity permission set.
- name string
- The name of the cloud identity permission set.
- permission
Policies PermissionSet Permission Policy[] - The policies of the cloud identity permission set.
- relay
State string - The relay state of the cloud identity permission set.
- session
Duration number - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- description str
- The description of the cloud identity permission set.
- name str
- The name of the cloud identity permission set.
- permission_
policies Sequence[PermissionSet Permission Policy Args] - The policies of the cloud identity permission set.
- relay_
state str - The relay state of the cloud identity permission set.
- session_
duration int - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- description String
- The description of the cloud identity permission set.
- name String
- The name of the cloud identity permission set.
- permission
Policies List<Property Map> - The policies of the cloud identity permission set.
- relay
State String - The relay state of the cloud identity permission set.
- session
Duration Number - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
Outputs
All input properties are implicitly available as output properties. Additionally, the PermissionSet resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PermissionSet Resource
Get an existing PermissionSet 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?: PermissionSetState, opts?: CustomResourceOptions): PermissionSet
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
permission_policies: Optional[Sequence[PermissionSetPermissionPolicyArgs]] = None,
relay_state: Optional[str] = None,
session_duration: Optional[int] = None) -> PermissionSet
func GetPermissionSet(ctx *Context, name string, id IDInput, state *PermissionSetState, opts ...ResourceOption) (*PermissionSet, error)
public static PermissionSet Get(string name, Input<string> id, PermissionSetState? state, CustomResourceOptions? opts = null)
public static PermissionSet get(String name, Output<String> id, PermissionSetState 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.
- Description string
- The description of the cloud identity permission set.
- Name string
- The name of the cloud identity permission set.
- Permission
Policies List<PermissionSet Permission Policy> - The policies of the cloud identity permission set.
- Relay
State string - The relay state of the cloud identity permission set.
- Session
Duration int - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- Description string
- The description of the cloud identity permission set.
- Name string
- The name of the cloud identity permission set.
- Permission
Policies []PermissionSet Permission Policy Args - The policies of the cloud identity permission set.
- Relay
State string - The relay state of the cloud identity permission set.
- Session
Duration int - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- description String
- The description of the cloud identity permission set.
- name String
- The name of the cloud identity permission set.
- permission
Policies List<PermissionSet Permission Policy> - The policies of the cloud identity permission set.
- relay
State String - The relay state of the cloud identity permission set.
- session
Duration Integer - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- description string
- The description of the cloud identity permission set.
- name string
- The name of the cloud identity permission set.
- permission
Policies PermissionSet Permission Policy[] - The policies of the cloud identity permission set.
- relay
State string - The relay state of the cloud identity permission set.
- session
Duration number - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- description str
- The description of the cloud identity permission set.
- name str
- The name of the cloud identity permission set.
- permission_
policies Sequence[PermissionSet Permission Policy Args] - The policies of the cloud identity permission set.
- relay_
state str - The relay state of the cloud identity permission set.
- session_
duration int - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
- description String
- The description of the cloud identity permission set.
- name String
- The name of the cloud identity permission set.
- permission
Policies List<Property Map> - The policies of the cloud identity permission set.
- relay
State String - The relay state of the cloud identity permission set.
- session
Duration Number - The session duration of the cloud identity permission set. Unit: second. Valid value range in 3600~43200.
Supporting Types
PermissionSetPermissionPolicy, PermissionSetPermissionPolicyArgs
- Permission
Policy stringType - The type of the cloud identity permission set policy. Valid values:
System
,Inline
. - Inline
Policy stringDocument - The document of the cloud identity permission set inline policy. When the
permission_policy_type
isInline
, this field must be specified. - Permission
Policy stringName - The name of the cloud identity permission set system policy. When the
permission_policy_type
isSystem
, this field must be specified.
- Permission
Policy stringType - The type of the cloud identity permission set policy. Valid values:
System
,Inline
. - Inline
Policy stringDocument - The document of the cloud identity permission set inline policy. When the
permission_policy_type
isInline
, this field must be specified. - Permission
Policy stringName - The name of the cloud identity permission set system policy. When the
permission_policy_type
isSystem
, this field must be specified.
- permission
Policy StringType - The type of the cloud identity permission set policy. Valid values:
System
,Inline
. - inline
Policy StringDocument - The document of the cloud identity permission set inline policy. When the
permission_policy_type
isInline
, this field must be specified. - permission
Policy StringName - The name of the cloud identity permission set system policy. When the
permission_policy_type
isSystem
, this field must be specified.
- permission
Policy stringType - The type of the cloud identity permission set policy. Valid values:
System
,Inline
. - inline
Policy stringDocument - The document of the cloud identity permission set inline policy. When the
permission_policy_type
isInline
, this field must be specified. - permission
Policy stringName - The name of the cloud identity permission set system policy. When the
permission_policy_type
isSystem
, this field must be specified.
- permission_
policy_ strtype - The type of the cloud identity permission set policy. Valid values:
System
,Inline
. - inline_
policy_ strdocument - The document of the cloud identity permission set inline policy. When the
permission_policy_type
isInline
, this field must be specified. - permission_
policy_ strname - The name of the cloud identity permission set system policy. When the
permission_policy_type
isSystem
, this field must be specified.
- permission
Policy StringType - The type of the cloud identity permission set policy. Valid values:
System
,Inline
. - inline
Policy StringDocument - The document of the cloud identity permission set inline policy. When the
permission_policy_type
isInline
, this field must be specified. - permission
Policy StringName - The name of the cloud identity permission set system policy. When the
permission_policy_type
isSystem
, this field must be specified.
Import
CloudIdentityPermissionSet can be imported using the id, e.g.
$ pulumi import volcengine:cloud_identity/permissionSet:PermissionSet default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.