1. Packages
  2. AWS Classic
  3. API Docs
  4. opsworks
  5. Permission

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.opsworks.Permission

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    Provides an OpsWorks permission resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const myStackPermission = new aws.opsworks.Permission("my_stack_permission", {
        allowSsh: true,
        allowSudo: true,
        level: "iam_only",
        userArn: user.arn,
        stackId: stack.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    my_stack_permission = aws.opsworks.Permission("my_stack_permission",
        allow_ssh=True,
        allow_sudo=True,
        level="iam_only",
        user_arn=user["arn"],
        stack_id=stack["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opsworks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opsworks.NewPermission(ctx, "my_stack_permission", &opsworks.PermissionArgs{
    			AllowSsh:  pulumi.Bool(true),
    			AllowSudo: pulumi.Bool(true),
    			Level:     pulumi.String("iam_only"),
    			UserArn:   pulumi.Any(user.Arn),
    			StackId:   pulumi.Any(stack.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var myStackPermission = new Aws.OpsWorks.Permission("my_stack_permission", new()
        {
            AllowSsh = true,
            AllowSudo = true,
            Level = "iam_only",
            UserArn = user.Arn,
            StackId = stack.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.opsworks.Permission;
    import com.pulumi.aws.opsworks.PermissionArgs;
    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 myStackPermission = new Permission("myStackPermission", PermissionArgs.builder()        
                .allowSsh(true)
                .allowSudo(true)
                .level("iam_only")
                .userArn(user.arn())
                .stackId(stack.id())
                .build());
    
        }
    }
    
    resources:
      myStackPermission:
        type: aws:opsworks:Permission
        name: my_stack_permission
        properties:
          allowSsh: true
          allowSudo: true
          level: iam_only
          userArn: ${user.arn}
          stackId: ${stack.id}
    

    Create Permission Resource

    new Permission(name: string, args: PermissionArgs, opts?: CustomResourceOptions);
    @overload
    def Permission(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   allow_ssh: Optional[bool] = None,
                   allow_sudo: Optional[bool] = None,
                   level: Optional[str] = None,
                   stack_id: Optional[str] = None,
                   user_arn: Optional[str] = None)
    @overload
    def Permission(resource_name: str,
                   args: PermissionArgs,
                   opts: Optional[ResourceOptions] = None)
    func NewPermission(ctx *Context, name string, args PermissionArgs, opts ...ResourceOption) (*Permission, error)
    public Permission(string name, PermissionArgs args, CustomResourceOptions? opts = null)
    public Permission(String name, PermissionArgs args)
    public Permission(String name, PermissionArgs args, CustomResourceOptions options)
    
    type: aws:opsworks:Permission
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args PermissionArgs
    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 PermissionArgs
    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 PermissionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PermissionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PermissionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Permission Resource Properties

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

    Inputs

    The Permission resource accepts the following input properties:

    StackId string
    The stack to set the permissions for
    UserArn string
    The user's IAM ARN to set permissions for
    AllowSsh bool
    Whether the user is allowed to use SSH to communicate with the instance
    AllowSudo bool
    Whether the user is allowed to use sudo to elevate privileges
    Level string
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    StackId string
    The stack to set the permissions for
    UserArn string
    The user's IAM ARN to set permissions for
    AllowSsh bool
    Whether the user is allowed to use SSH to communicate with the instance
    AllowSudo bool
    Whether the user is allowed to use sudo to elevate privileges
    Level string
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    stackId String
    The stack to set the permissions for
    userArn String
    The user's IAM ARN to set permissions for
    allowSsh Boolean
    Whether the user is allowed to use SSH to communicate with the instance
    allowSudo Boolean
    Whether the user is allowed to use sudo to elevate privileges
    level String
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    stackId string
    The stack to set the permissions for
    userArn string
    The user's IAM ARN to set permissions for
    allowSsh boolean
    Whether the user is allowed to use SSH to communicate with the instance
    allowSudo boolean
    Whether the user is allowed to use sudo to elevate privileges
    level string
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    stack_id str
    The stack to set the permissions for
    user_arn str
    The user's IAM ARN to set permissions for
    allow_ssh bool
    Whether the user is allowed to use SSH to communicate with the instance
    allow_sudo bool
    Whether the user is allowed to use sudo to elevate privileges
    level str
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    stackId String
    The stack to set the permissions for
    userArn String
    The user's IAM ARN to set permissions for
    allowSsh Boolean
    Whether the user is allowed to use SSH to communicate with the instance
    allowSudo Boolean
    Whether the user is allowed to use sudo to elevate privileges
    level String
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Permission 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 Permission Resource

    Get an existing Permission 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?: PermissionState, opts?: CustomResourceOptions): Permission
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_ssh: Optional[bool] = None,
            allow_sudo: Optional[bool] = None,
            level: Optional[str] = None,
            stack_id: Optional[str] = None,
            user_arn: Optional[str] = None) -> Permission
    func GetPermission(ctx *Context, name string, id IDInput, state *PermissionState, opts ...ResourceOption) (*Permission, error)
    public static Permission Get(string name, Input<string> id, PermissionState? state, CustomResourceOptions? opts = null)
    public static Permission get(String name, Output<String> id, PermissionState 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.
    The following state arguments are supported:
    AllowSsh bool
    Whether the user is allowed to use SSH to communicate with the instance
    AllowSudo bool
    Whether the user is allowed to use sudo to elevate privileges
    Level string
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    StackId string
    The stack to set the permissions for
    UserArn string
    The user's IAM ARN to set permissions for
    AllowSsh bool
    Whether the user is allowed to use SSH to communicate with the instance
    AllowSudo bool
    Whether the user is allowed to use sudo to elevate privileges
    Level string
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    StackId string
    The stack to set the permissions for
    UserArn string
    The user's IAM ARN to set permissions for
    allowSsh Boolean
    Whether the user is allowed to use SSH to communicate with the instance
    allowSudo Boolean
    Whether the user is allowed to use sudo to elevate privileges
    level String
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    stackId String
    The stack to set the permissions for
    userArn String
    The user's IAM ARN to set permissions for
    allowSsh boolean
    Whether the user is allowed to use SSH to communicate with the instance
    allowSudo boolean
    Whether the user is allowed to use sudo to elevate privileges
    level string
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    stackId string
    The stack to set the permissions for
    userArn string
    The user's IAM ARN to set permissions for
    allow_ssh bool
    Whether the user is allowed to use SSH to communicate with the instance
    allow_sudo bool
    Whether the user is allowed to use sudo to elevate privileges
    level str
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    stack_id str
    The stack to set the permissions for
    user_arn str
    The user's IAM ARN to set permissions for
    allowSsh Boolean
    Whether the user is allowed to use SSH to communicate with the instance
    allowSudo Boolean
    Whether the user is allowed to use sudo to elevate privileges
    level String
    The users permission level. Mus be one of deny, show, deploy, manage, iam_only
    stackId String
    The stack to set the permissions for
    userArn String
    The user's IAM ARN to set permissions for

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi