harness.platform.Roles
Resource for creating roles.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Harness = Lbrlabs.PulumiPackage.Harness;
return await Deployment.RunAsync(() =>
{
var example = new Harness.Platform.Roles("example", new()
{
AllowedScopeLevels = new[]
{
"project",
},
Description = "test",
Identifier = "identifier",
Permissions = new[]
{
"core_pipeline_edit",
},
Tags = new[]
{
"foo:bar",
},
});
});
package main
import (
"github.com/lbrlabs/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := platform.NewRoles(ctx, "example", &platform.RolesArgs{
AllowedScopeLevels: pulumi.StringArray{
pulumi.String("project"),
},
Description: pulumi.String("test"),
Identifier: pulumi.String("identifier"),
Permissions: pulumi.StringArray{
pulumi.String("core_pipeline_edit"),
},
Tags: pulumi.StringArray{
pulumi.String("foo:bar"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.Roles;
import com.pulumi.harness.platform.RolesArgs;
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 example = new Roles("example", RolesArgs.builder()
.allowedScopeLevels("project")
.description("test")
.identifier("identifier")
.permissions("core_pipeline_edit")
.tags("foo:bar")
.build());
}
}
import pulumi
import lbrlabs_pulumi_harness as harness
example = harness.platform.Roles("example",
allowed_scope_levels=["project"],
description="test",
identifier="identifier",
permissions=["core_pipeline_edit"],
tags=["foo:bar"])
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = new harness.platform.Roles("example", {
allowedScopeLevels: ["project"],
description: "test",
identifier: "identifier",
permissions: ["core_pipeline_edit"],
tags: ["foo:bar"],
});
resources:
example:
type: harness:platform:Roles
properties:
allowedScopeLevels:
- project
description: test
identifier: identifier
permissions:
- core_pipeline_edit
tags:
- foo:bar
Create Roles Resource
new Roles(name: string, args: RolesArgs, opts?: CustomResourceOptions);
@overload
def Roles(resource_name: str,
opts: Optional[ResourceOptions] = None,
allowed_scope_levels: Optional[Sequence[str]] = None,
description: Optional[str] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
@overload
def Roles(resource_name: str,
args: RolesArgs,
opts: Optional[ResourceOptions] = None)
func NewRoles(ctx *Context, name string, args RolesArgs, opts ...ResourceOption) (*Roles, error)
public Roles(string name, RolesArgs args, CustomResourceOptions? opts = null)
type: harness:platform:Roles
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RolesArgs
- 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 RolesArgs
- 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 RolesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RolesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RolesArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Roles 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 Roles resource accepts the following input properties:
- Identifier string
Unique identifier of the resource.
- Allowed
Scope List<string>Levels The scope levels at which this role can be used
- Description string
Description of the resource.
- Name string
Name of the resource.
- Org
Id string Unique identifier of the Organization.
- Permissions List<string>
List of the permission identifiers
- Project
Id string Unique identifier of the Project.
- List<string>
Tags to associate with the resource. Tags should be in the form
name:value
.
- Identifier string
Unique identifier of the resource.
- Allowed
Scope []stringLevels The scope levels at which this role can be used
- Description string
Description of the resource.
- Name string
Name of the resource.
- Org
Id string Unique identifier of the Organization.
- Permissions []string
List of the permission identifiers
- Project
Id string Unique identifier of the Project.
- []string
Tags to associate with the resource. Tags should be in the form
name:value
.
- identifier String
Unique identifier of the resource.
- allowed
Scope List<String>Levels The scope levels at which this role can be used
- description String
Description of the resource.
- name String
Name of the resource.
- org
Id String Unique identifier of the Organization.
- permissions List<String>
List of the permission identifiers
- project
Id String Unique identifier of the Project.
- List<String>
Tags to associate with the resource. Tags should be in the form
name:value
.
- identifier string
Unique identifier of the resource.
- allowed
Scope string[]Levels The scope levels at which this role can be used
- description string
Description of the resource.
- name string
Name of the resource.
- org
Id string Unique identifier of the Organization.
- permissions string[]
List of the permission identifiers
- project
Id string Unique identifier of the Project.
- string[]
Tags to associate with the resource. Tags should be in the form
name:value
.
- identifier str
Unique identifier of the resource.
- allowed_
scope_ Sequence[str]levels The scope levels at which this role can be used
- description str
Description of the resource.
- name str
Name of the resource.
- org_
id str Unique identifier of the Organization.
- permissions Sequence[str]
List of the permission identifiers
- project_
id str Unique identifier of the Project.
- Sequence[str]
Tags to associate with the resource. Tags should be in the form
name:value
.
- identifier String
Unique identifier of the resource.
- allowed
Scope List<String>Levels The scope levels at which this role can be used
- description String
Description of the resource.
- name String
Name of the resource.
- org
Id String Unique identifier of the Organization.
- permissions List<String>
List of the permission identifiers
- project
Id String Unique identifier of the Project.
- List<String>
Tags to associate with the resource. Tags should be in the form
name:value
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Roles 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 Roles Resource
Get an existing Roles 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?: RolesState, opts?: CustomResourceOptions): Roles
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_scope_levels: Optional[Sequence[str]] = None,
description: Optional[str] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> Roles
func GetRoles(ctx *Context, name string, id IDInput, state *RolesState, opts ...ResourceOption) (*Roles, error)
public static Roles Get(string name, Input<string> id, RolesState? state, CustomResourceOptions? opts = null)
public static Roles get(String name, Output<String> id, RolesState 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.
- Allowed
Scope List<string>Levels The scope levels at which this role can be used
- Description string
Description of the resource.
- Identifier string
Unique identifier of the resource.
- Name string
Name of the resource.
- Org
Id string Unique identifier of the Organization.
- Permissions List<string>
List of the permission identifiers
- Project
Id string Unique identifier of the Project.
- List<string>
Tags to associate with the resource. Tags should be in the form
name:value
.
- Allowed
Scope []stringLevels The scope levels at which this role can be used
- Description string
Description of the resource.
- Identifier string
Unique identifier of the resource.
- Name string
Name of the resource.
- Org
Id string Unique identifier of the Organization.
- Permissions []string
List of the permission identifiers
- Project
Id string Unique identifier of the Project.
- []string
Tags to associate with the resource. Tags should be in the form
name:value
.
- allowed
Scope List<String>Levels The scope levels at which this role can be used
- description String
Description of the resource.
- identifier String
Unique identifier of the resource.
- name String
Name of the resource.
- org
Id String Unique identifier of the Organization.
- permissions List<String>
List of the permission identifiers
- project
Id String Unique identifier of the Project.
- List<String>
Tags to associate with the resource. Tags should be in the form
name:value
.
- allowed
Scope string[]Levels The scope levels at which this role can be used
- description string
Description of the resource.
- identifier string
Unique identifier of the resource.
- name string
Name of the resource.
- org
Id string Unique identifier of the Organization.
- permissions string[]
List of the permission identifiers
- project
Id string Unique identifier of the Project.
- string[]
Tags to associate with the resource. Tags should be in the form
name:value
.
- allowed_
scope_ Sequence[str]levels The scope levels at which this role can be used
- description str
Description of the resource.
- identifier str
Unique identifier of the resource.
- name str
Name of the resource.
- org_
id str Unique identifier of the Organization.
- permissions Sequence[str]
List of the permission identifiers
- project_
id str Unique identifier of the Project.
- Sequence[str]
Tags to associate with the resource. Tags should be in the form
name:value
.
- allowed
Scope List<String>Levels The scope levels at which this role can be used
- description String
Description of the resource.
- identifier String
Unique identifier of the resource.
- name String
Name of the resource.
- org
Id String Unique identifier of the Organization.
- permissions List<String>
List of the permission identifiers
- project
Id String Unique identifier of the Project.
- List<String>
Tags to associate with the resource. Tags should be in the form
name:value
.
Import
Import using roles id
$ pulumi import harness:platform/roles:Roles example <roles_id>
Package Details
- Repository
- harness lbrlabs/pulumi-harness
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
harness
Terraform Provider.