snowflake.GrantAccountRole
Explore with Pulumi AI
Import
format is role_name (string) | grantee_object_type (ROLE|USER) | grantee_name (string)
$ pulumi import snowflake:index/grantAccountRole:GrantAccountRole example '"test_role"|ROLE|"test_parent_role"'
Create GrantAccountRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GrantAccountRole(name: string, args: GrantAccountRoleArgs, opts?: CustomResourceOptions);
@overload
def GrantAccountRole(resource_name: str,
args: GrantAccountRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GrantAccountRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
role_name: Optional[str] = None,
parent_role_name: Optional[str] = None,
user_name: Optional[str] = None)
func NewGrantAccountRole(ctx *Context, name string, args GrantAccountRoleArgs, opts ...ResourceOption) (*GrantAccountRole, error)
public GrantAccountRole(string name, GrantAccountRoleArgs args, CustomResourceOptions? opts = null)
public GrantAccountRole(String name, GrantAccountRoleArgs args)
public GrantAccountRole(String name, GrantAccountRoleArgs args, CustomResourceOptions options)
type: snowflake:GrantAccountRole
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 GrantAccountRoleArgs
- 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 GrantAccountRoleArgs
- 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 GrantAccountRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GrantAccountRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GrantAccountRoleArgs
- 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 grantAccountRoleResource = new Snowflake.GrantAccountRole("grantAccountRoleResource", new()
{
RoleName = "string",
ParentRoleName = "string",
UserName = "string",
});
example, err := snowflake.NewGrantAccountRole(ctx, "grantAccountRoleResource", &snowflake.GrantAccountRoleArgs{
RoleName: pulumi.String("string"),
ParentRoleName: pulumi.String("string"),
UserName: pulumi.String("string"),
})
var grantAccountRoleResource = new GrantAccountRole("grantAccountRoleResource", GrantAccountRoleArgs.builder()
.roleName("string")
.parentRoleName("string")
.userName("string")
.build());
grant_account_role_resource = snowflake.GrantAccountRole("grantAccountRoleResource",
role_name="string",
parent_role_name="string",
user_name="string")
const grantAccountRoleResource = new snowflake.GrantAccountRole("grantAccountRoleResource", {
roleName: "string",
parentRoleName: "string",
userName: "string",
});
type: snowflake:GrantAccountRole
properties:
parentRoleName: string
roleName: string
userName: string
GrantAccountRole 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 GrantAccountRole resource accepts the following input properties:
- Role
Name string - The fully qualified name of the role which will be granted to the user or parent role.
- Parent
Role stringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- User
Name string - The fully qualified name of the user on which specified role will be granted.
- Role
Name string - The fully qualified name of the role which will be granted to the user or parent role.
- Parent
Role stringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- User
Name string - The fully qualified name of the user on which specified role will be granted.
- role
Name String - The fully qualified name of the role which will be granted to the user or parent role.
- parent
Role StringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- user
Name String - The fully qualified name of the user on which specified role will be granted.
- role
Name string - The fully qualified name of the role which will be granted to the user or parent role.
- parent
Role stringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- user
Name string - The fully qualified name of the user on which specified role will be granted.
- role_
name str - The fully qualified name of the role which will be granted to the user or parent role.
- parent_
role_ strname - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- user_
name str - The fully qualified name of the user on which specified role will be granted.
- role
Name String - The fully qualified name of the role which will be granted to the user or parent role.
- parent
Role StringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- user
Name String - The fully qualified name of the user on which specified role will be granted.
Outputs
All input properties are implicitly available as output properties. Additionally, the GrantAccountRole 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 GrantAccountRole Resource
Get an existing GrantAccountRole 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?: GrantAccountRoleState, opts?: CustomResourceOptions): GrantAccountRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
parent_role_name: Optional[str] = None,
role_name: Optional[str] = None,
user_name: Optional[str] = None) -> GrantAccountRole
func GetGrantAccountRole(ctx *Context, name string, id IDInput, state *GrantAccountRoleState, opts ...ResourceOption) (*GrantAccountRole, error)
public static GrantAccountRole Get(string name, Input<string> id, GrantAccountRoleState? state, CustomResourceOptions? opts = null)
public static GrantAccountRole get(String name, Output<String> id, GrantAccountRoleState 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.
- Parent
Role stringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- Role
Name string - The fully qualified name of the role which will be granted to the user or parent role.
- User
Name string - The fully qualified name of the user on which specified role will be granted.
- Parent
Role stringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- Role
Name string - The fully qualified name of the role which will be granted to the user or parent role.
- User
Name string - The fully qualified name of the user on which specified role will be granted.
- parent
Role StringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- role
Name String - The fully qualified name of the role which will be granted to the user or parent role.
- user
Name String - The fully qualified name of the user on which specified role will be granted.
- parent
Role stringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- role
Name string - The fully qualified name of the role which will be granted to the user or parent role.
- user
Name string - The fully qualified name of the user on which specified role will be granted.
- parent_
role_ strname - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- role_
name str - The fully qualified name of the role which will be granted to the user or parent role.
- user_
name str - The fully qualified name of the user on which specified role will be granted.
- parent
Role StringName - The fully qualified name of the parent role which will create a parent-child relationship between the roles.
- role
Name String - The fully qualified name of the role which will be granted to the user or parent role.
- user
Name String - The fully qualified name of the user on which specified role will be granted.
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.