1. Packages
  2. Platform Provider
  3. API Docs
  4. GlobalRole
platform 2.2.2 published on Thursday, Apr 3, 2025 by jfrog

platform.GlobalRole

Explore with Pulumi AI

Provides a JFrog global role resource to manage custom global roles.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as platform from "@pulumi/platform";

const my_global_role = new platform.GlobalRole("my-global-role", {
    actions: [
        "READ_REPOSITORY",
        "READ_BUILD",
    ],
    description: "My custom global role",
    environments: [
        "DEV",
        "PROD",
    ],
    type: "CUSTOM_GLOBAL",
});
Copy
import pulumi
import pulumi_platform as platform

my_global_role = platform.GlobalRole("my-global-role",
    actions=[
        "READ_REPOSITORY",
        "READ_BUILD",
    ],
    description="My custom global role",
    environments=[
        "DEV",
        "PROD",
    ],
    type="CUSTOM_GLOBAL")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/platform/v2/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.NewGlobalRole(ctx, "my-global-role", &platform.GlobalRoleArgs{
			Actions: pulumi.StringArray{
				pulumi.String("READ_REPOSITORY"),
				pulumi.String("READ_BUILD"),
			},
			Description: pulumi.String("My custom global role"),
			Environments: pulumi.StringArray{
				pulumi.String("DEV"),
				pulumi.String("PROD"),
			},
			Type: pulumi.String("CUSTOM_GLOBAL"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Platform = Pulumi.Platform;

return await Deployment.RunAsync(() => 
{
    var my_global_role = new Platform.GlobalRole("my-global-role", new()
    {
        Actions = new[]
        {
            "READ_REPOSITORY",
            "READ_BUILD",
        },
        Description = "My custom global role",
        Environments = new[]
        {
            "DEV",
            "PROD",
        },
        Type = "CUSTOM_GLOBAL",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.platform.GlobalRole;
import com.pulumi.platform.GlobalRoleArgs;
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 my_global_role = new GlobalRole("my-global-role", GlobalRoleArgs.builder()
            .actions(            
                "READ_REPOSITORY",
                "READ_BUILD")
            .description("My custom global role")
            .environments(            
                "DEV",
                "PROD")
            .type("CUSTOM_GLOBAL")
            .build());

    }
}
Copy
resources:
  my-global-role:
    type: platform:GlobalRole
    properties:
      actions:
        - READ_REPOSITORY
        - READ_BUILD
      description: My custom global role
      environments:
        - DEV
        - PROD
      type: CUSTOM_GLOBAL
Copy

Create GlobalRole Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new GlobalRole(name: string, args: GlobalRoleArgs, opts?: CustomResourceOptions);
@overload
def GlobalRole(resource_name: str,
               args: GlobalRoleArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def GlobalRole(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               actions: Optional[Sequence[str]] = None,
               environments: Optional[Sequence[str]] = None,
               type: Optional[str] = None,
               description: Optional[str] = None,
               name: Optional[str] = None)
func NewGlobalRole(ctx *Context, name string, args GlobalRoleArgs, opts ...ResourceOption) (*GlobalRole, error)
public GlobalRole(string name, GlobalRoleArgs args, CustomResourceOptions? opts = null)
public GlobalRole(String name, GlobalRoleArgs args)
public GlobalRole(String name, GlobalRoleArgs args, CustomResourceOptions options)
type: platform:GlobalRole
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. GlobalRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. GlobalRoleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. GlobalRoleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GlobalRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GlobalRoleArgs
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 globalRoleResource = new Platform.GlobalRole("globalRoleResource", new()
{
    Actions = new[]
    {
        "string",
    },
    Environments = new[]
    {
        "string",
    },
    Type = "string",
    Description = "string",
    Name = "string",
});
Copy
example, err := platform.NewGlobalRole(ctx, "globalRoleResource", &platform.GlobalRoleArgs{
Actions: pulumi.StringArray{
pulumi.String("string"),
},
Environments: pulumi.StringArray{
pulumi.String("string"),
},
Type: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var globalRoleResource = new GlobalRole("globalRoleResource", GlobalRoleArgs.builder()
    .actions("string")
    .environments("string")
    .type("string")
    .description("string")
    .name("string")
    .build());
Copy
global_role_resource = platform.GlobalRole("globalRoleResource",
    actions=["string"],
    environments=["string"],
    type="string",
    description="string",
    name="string")
Copy
const globalRoleResource = new platform.GlobalRole("globalRoleResource", {
    actions: ["string"],
    environments: ["string"],
    type: "string",
    description: "string",
    name: "string",
});
Copy
type: platform:GlobalRole
properties:
    actions:
        - string
    description: string
    environments:
        - string
    name: string
    type: string
Copy

GlobalRole 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 GlobalRole resource accepts the following input properties:

Actions This property is required. List<string>
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
Environments This property is required. List<string>
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
Type This property is required. string
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
Description string
Description of the role
Name string
Name of the role
Actions This property is required. []string
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
Environments This property is required. []string
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
Type This property is required. string
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
Description string
Description of the role
Name string
Name of the role
actions This property is required. List<String>
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
environments This property is required. List<String>
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
type This property is required. String
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
description String
Description of the role
name String
Name of the role
actions This property is required. string[]
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
environments This property is required. string[]
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
type This property is required. string
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
description string
Description of the role
name string
Name of the role
actions This property is required. Sequence[str]
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
environments This property is required. Sequence[str]
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
type This property is required. str
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
description str
Description of the role
name str
Name of the role
actions This property is required. List<String>
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
environments This property is required. List<String>
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
type This property is required. String
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
description String
Description of the role
name String
Name of the role

Outputs

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

Get an existing GlobalRole 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?: GlobalRoleState, opts?: CustomResourceOptions): GlobalRole
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        actions: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        environments: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        type: Optional[str] = None) -> GlobalRole
func GetGlobalRole(ctx *Context, name string, id IDInput, state *GlobalRoleState, opts ...ResourceOption) (*GlobalRole, error)
public static GlobalRole Get(string name, Input<string> id, GlobalRoleState? state, CustomResourceOptions? opts = null)
public static GlobalRole get(String name, Output<String> id, GlobalRoleState state, CustomResourceOptions options)
resources:  _:    type: platform:GlobalRole    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Actions List<string>
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
Description string
Description of the role
Environments List<string>
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
Name string
Name of the role
Type string
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
Actions []string
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
Description string
Description of the role
Environments []string
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
Name string
Name of the role
Type string
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
actions List<String>
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
description String
Description of the role
environments List<String>
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
name String
Name of the role
type String
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
actions string[]
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
description string
Description of the role
environments string[]
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
name string
Name of the role
type string
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
actions Sequence[str]
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
description str
Description of the role
environments Sequence[str]
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
name str
Name of the role
type str
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED
actions List<String>
List of actions. Allowed values: READREPOSITORY, ANNOTATEREPOSITORY, DEPLOYCACHEREPOSITORY, DELETEOVERWRITEREPOSITORY, MANAGEXRAYMDREPOSITORY, READRELEASEBUNDLE, ANNOTATERELEASEBUNDLE, CREATERELEASEBUNDLE, DISTRIBUTERELEASEBUNDLE, DELETERELEASEBUNDLE, MANAGEXRAYMDRELEASEBUNDLE, READBUILD, ANNOTATEBUILD, DEPLOYBUILD, DELETEBUILD, MANAGEXRAYMDBUILD, READSOURCESPIPELINE, TRIGGERPIPELINE, READINTEGRATIONSPIPELINE, READPOOLSPIPELINE, REPORTSSECURITY, WATCHESSECURITY, POLICIESSECURITY, RULESSECURITY, READPOLICIES_SECURITY
description String
Description of the role
environments List<String>
List of global or custom environments. A repository can be available in different environments. Members with roles defined in the set environment will have access to the repository.
name String
Name of the role
type String
Type of the role. Allowed values: ADMIN, CUSTOM_GLOBAL, PREDEFINED

Import

$ pulumi import platform:index/globalRole:GlobalRole my-global-role my-global-role
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
platform jfrog/terraform-provider-platform
License
Notes
This Pulumi package is based on the platform Terraform Provider.