aws.opsworks.Permission
Explore with Pulumi AI
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Permission(name: string, args: PermissionArgs, opts?: CustomResourceOptions);
@overload
def Permission(resource_name: str,
args: PermissionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Permission(resource_name: str,
opts: Optional[ResourceOptions] = None,
stack_id: Optional[str] = None,
user_arn: Optional[str] = None,
allow_ssh: Optional[bool] = None,
allow_sudo: Optional[bool] = None,
level: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var examplepermissionResourceResourceFromOpsworkspermission = new Aws.OpsWorks.Permission("examplepermissionResourceResourceFromOpsworkspermission", new()
{
StackId = "string",
UserArn = "string",
AllowSsh = false,
AllowSudo = false,
Level = "string",
});
example, err := opsworks.NewPermission(ctx, "examplepermissionResourceResourceFromOpsworkspermission", &opsworks.PermissionArgs{
StackId: pulumi.String("string"),
UserArn: pulumi.String("string"),
AllowSsh: pulumi.Bool(false),
AllowSudo: pulumi.Bool(false),
Level: pulumi.String("string"),
})
var examplepermissionResourceResourceFromOpsworkspermission = new Permission("examplepermissionResourceResourceFromOpsworkspermission", PermissionArgs.builder()
.stackId("string")
.userArn("string")
.allowSsh(false)
.allowSudo(false)
.level("string")
.build());
examplepermission_resource_resource_from_opsworkspermission = aws.opsworks.Permission("examplepermissionResourceResourceFromOpsworkspermission",
stack_id="string",
user_arn="string",
allow_ssh=False,
allow_sudo=False,
level="string")
const examplepermissionResourceResourceFromOpsworkspermission = new aws.opsworks.Permission("examplepermissionResourceResourceFromOpsworkspermission", {
stackId: "string",
userArn: "string",
allowSsh: false,
allowSudo: false,
level: "string",
});
type: aws:opsworks:Permission
properties:
allowSsh: false
allowSudo: false
level: string
stackId: string
userArn: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Permission resource accepts the following input properties:
- Stack
Id string - The stack to set the permissions for
- User
Arn 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 string
- The users permission level. Mus be one of
deny
,show
,deploy
,manage
,iam_only
- Stack
Id string - The stack to set the permissions for
- User
Arn 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 string
- The users permission level. Mus be one of
deny
,show
,deploy
,manage
,iam_only
- stack
Id String - The stack to set the permissions for
- user
Arn String - The user's IAM ARN to set permissions for
- allow
Ssh Boolean - Whether the user is allowed to use SSH to communicate with the instance
- allow
Sudo 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 string - The stack to set the permissions for
- user
Arn string - The user's IAM ARN to set permissions for
- allow
Ssh boolean - Whether the user is allowed to use SSH to communicate with the instance
- allow
Sudo 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
- stack
Id String - The stack to set the permissions for
- user
Arn String - The user's IAM ARN to set permissions for
- allow
Ssh Boolean - Whether the user is allowed to use SSH to communicate with the instance
- allow
Sudo 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.
- 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 string
- The users permission level. Mus be one of
deny
,show
,deploy
,manage
,iam_only
- Stack
Id string - The stack to set the permissions for
- User
Arn 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 string
- The users permission level. Mus be one of
deny
,show
,deploy
,manage
,iam_only
- Stack
Id string - The stack to set the permissions for
- User
Arn string - The user's IAM ARN to set permissions for
- allow
Ssh Boolean - Whether the user is allowed to use SSH to communicate with the instance
- allow
Sudo 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 String - The stack to set the permissions for
- user
Arn String - The user's IAM ARN to set permissions for
- allow
Ssh boolean - Whether the user is allowed to use SSH to communicate with the instance
- allow
Sudo 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 string - The stack to set the permissions for
- user
Arn 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
- allow
Ssh Boolean - Whether the user is allowed to use SSH to communicate with the instance
- allow
Sudo 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 String - The stack to set the permissions for
- user
Arn 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.