aws.grafana.WorkspaceServiceAccount
Explore with Pulumi AI
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.grafana.WorkspaceServiceAccount("example", {
name: "example-admin",
grafanaRole: "ADMIN",
workspaceId: exampleAwsGrafanaWorkspace.id,
});
import pulumi
import pulumi_aws as aws
example = aws.grafana.WorkspaceServiceAccount("example",
name="example-admin",
grafana_role="ADMIN",
workspace_id=example_aws_grafana_workspace["id"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/grafana"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := grafana.NewWorkspaceServiceAccount(ctx, "example", &grafana.WorkspaceServiceAccountArgs{
Name: pulumi.String("example-admin"),
GrafanaRole: pulumi.String("ADMIN"),
WorkspaceId: pulumi.Any(exampleAwsGrafanaWorkspace.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 example = new Aws.Grafana.WorkspaceServiceAccount("example", new()
{
Name = "example-admin",
GrafanaRole = "ADMIN",
WorkspaceId = exampleAwsGrafanaWorkspace.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.grafana.WorkspaceServiceAccount;
import com.pulumi.aws.grafana.WorkspaceServiceAccountArgs;
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 WorkspaceServiceAccount("example", WorkspaceServiceAccountArgs.builder()
.name("example-admin")
.grafanaRole("ADMIN")
.workspaceId(exampleAwsGrafanaWorkspace.id())
.build());
}
}
resources:
example:
type: aws:grafana:WorkspaceServiceAccount
properties:
name: example-admin
grafanaRole: ADMIN
workspaceId: ${exampleAwsGrafanaWorkspace.id}
Create WorkspaceServiceAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkspaceServiceAccount(name: string, args: WorkspaceServiceAccountArgs, opts?: CustomResourceOptions);
@overload
def WorkspaceServiceAccount(resource_name: str,
args: WorkspaceServiceAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkspaceServiceAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
grafana_role: Optional[str] = None,
workspace_id: Optional[str] = None,
name: Optional[str] = None)
func NewWorkspaceServiceAccount(ctx *Context, name string, args WorkspaceServiceAccountArgs, opts ...ResourceOption) (*WorkspaceServiceAccount, error)
public WorkspaceServiceAccount(string name, WorkspaceServiceAccountArgs args, CustomResourceOptions? opts = null)
public WorkspaceServiceAccount(String name, WorkspaceServiceAccountArgs args)
public WorkspaceServiceAccount(String name, WorkspaceServiceAccountArgs args, CustomResourceOptions options)
type: aws:grafana:WorkspaceServiceAccount
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 WorkspaceServiceAccountArgs
- 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 WorkspaceServiceAccountArgs
- 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 WorkspaceServiceAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceServiceAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceServiceAccountArgs
- 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 workspaceServiceAccountResource = new Aws.Grafana.WorkspaceServiceAccount("workspaceServiceAccountResource", new()
{
GrafanaRole = "string",
WorkspaceId = "string",
Name = "string",
});
example, err := grafana.NewWorkspaceServiceAccount(ctx, "workspaceServiceAccountResource", &grafana.WorkspaceServiceAccountArgs{
GrafanaRole: pulumi.String("string"),
WorkspaceId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var workspaceServiceAccountResource = new WorkspaceServiceAccount("workspaceServiceAccountResource", WorkspaceServiceAccountArgs.builder()
.grafanaRole("string")
.workspaceId("string")
.name("string")
.build());
workspace_service_account_resource = aws.grafana.WorkspaceServiceAccount("workspaceServiceAccountResource",
grafana_role="string",
workspace_id="string",
name="string")
const workspaceServiceAccountResource = new aws.grafana.WorkspaceServiceAccount("workspaceServiceAccountResource", {
grafanaRole: "string",
workspaceId: "string",
name: "string",
});
type: aws:grafana:WorkspaceServiceAccount
properties:
grafanaRole: string
name: string
workspaceId: string
WorkspaceServiceAccount 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 WorkspaceServiceAccount resource accepts the following input properties:
- Grafana
Role string - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- Workspace
Id string - The Grafana workspace with which the service account is associated.
- Name string
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- Grafana
Role string - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- Workspace
Id string - The Grafana workspace with which the service account is associated.
- Name string
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- grafana
Role String - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- workspace
Id String - The Grafana workspace with which the service account is associated.
- name String
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- grafana
Role string - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- workspace
Id string - The Grafana workspace with which the service account is associated.
- name string
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- grafana_
role str - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- workspace_
id str - The Grafana workspace with which the service account is associated.
- name str
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- grafana
Role String - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- workspace
Id String - The Grafana workspace with which the service account is associated.
- name String
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkspaceServiceAccount resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Account stringId - Identifier of the service account in the given Grafana workspace
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Account stringId - Identifier of the service account in the given Grafana workspace
- id String
- The provider-assigned unique ID for this managed resource.
- service
Account StringId - Identifier of the service account in the given Grafana workspace
- id string
- The provider-assigned unique ID for this managed resource.
- service
Account stringId - Identifier of the service account in the given Grafana workspace
- id str
- The provider-assigned unique ID for this managed resource.
- service_
account_ strid - Identifier of the service account in the given Grafana workspace
- id String
- The provider-assigned unique ID for this managed resource.
- service
Account StringId - Identifier of the service account in the given Grafana workspace
Look up Existing WorkspaceServiceAccount Resource
Get an existing WorkspaceServiceAccount 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?: WorkspaceServiceAccountState, opts?: CustomResourceOptions): WorkspaceServiceAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
grafana_role: Optional[str] = None,
name: Optional[str] = None,
service_account_id: Optional[str] = None,
workspace_id: Optional[str] = None) -> WorkspaceServiceAccount
func GetWorkspaceServiceAccount(ctx *Context, name string, id IDInput, state *WorkspaceServiceAccountState, opts ...ResourceOption) (*WorkspaceServiceAccount, error)
public static WorkspaceServiceAccount Get(string name, Input<string> id, WorkspaceServiceAccountState? state, CustomResourceOptions? opts = null)
public static WorkspaceServiceAccount get(String name, Output<String> id, WorkspaceServiceAccountState 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.
- Grafana
Role string - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- Name string
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- Service
Account stringId - Identifier of the service account in the given Grafana workspace
- Workspace
Id string - The Grafana workspace with which the service account is associated.
- Grafana
Role string - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- Name string
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- Service
Account stringId - Identifier of the service account in the given Grafana workspace
- Workspace
Id string - The Grafana workspace with which the service account is associated.
- grafana
Role String - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- name String
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- service
Account StringId - Identifier of the service account in the given Grafana workspace
- workspace
Id String - The Grafana workspace with which the service account is associated.
- grafana
Role string - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- name string
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- service
Account stringId - Identifier of the service account in the given Grafana workspace
- workspace
Id string - The Grafana workspace with which the service account is associated.
- grafana_
role str - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- name str
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- service_
account_ strid - Identifier of the service account in the given Grafana workspace
- workspace_
id str - The Grafana workspace with which the service account is associated.
- grafana
Role String - The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
- name String
- A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
- service
Account StringId - Identifier of the service account in the given Grafana workspace
- workspace
Id String - The Grafana workspace with which the service account is associated.
Import
Using pulumi import
, import Managed Grafana Workspace Service Account using the workspace_id
and service_account_id
separated by a comma (,
). For example:
$ pulumi import aws:grafana/workspaceServiceAccount:WorkspaceServiceAccount example g-abc12345,1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.