1. Packages
  2. Grafana Cloud
  3. API Docs
  4. CloudApiKey
Grafana v0.4.2 published on Monday, Apr 15, 2024 by pulumiverse

grafana.CloudApiKey

Explore with Pulumi AI

grafana logo
Grafana v0.4.2 published on Monday, Apr 15, 2024 by pulumiverse

    Create CloudApiKey Resource

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

    Constructor syntax

    new CloudApiKey(name: string, args: CloudApiKeyArgs, opts?: CustomResourceOptions);
    @overload
    def CloudApiKey(resource_name: str,
                    args: CloudApiKeyArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudApiKey(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    cloud_org_slug: Optional[str] = None,
                    role: Optional[str] = None,
                    name: Optional[str] = None)
    func NewCloudApiKey(ctx *Context, name string, args CloudApiKeyArgs, opts ...ResourceOption) (*CloudApiKey, error)
    public CloudApiKey(string name, CloudApiKeyArgs args, CustomResourceOptions? opts = null)
    public CloudApiKey(String name, CloudApiKeyArgs args)
    public CloudApiKey(String name, CloudApiKeyArgs args, CustomResourceOptions options)
    
    type: grafana:CloudApiKey
    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 CloudApiKeyArgs
    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 CloudApiKeyArgs
    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 CloudApiKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudApiKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudApiKeyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var cloudApiKeyResource = new Grafana.CloudApiKey("cloudApiKeyResource", new()
    {
        CloudOrgSlug = "string",
        Role = "string",
        Name = "string",
    });
    
    example, err := grafana.NewCloudApiKey(ctx, "cloudApiKeyResource", &grafana.CloudApiKeyArgs{
    	CloudOrgSlug: pulumi.String("string"),
    	Role:         pulumi.String("string"),
    	Name:         pulumi.String("string"),
    })
    
    var cloudApiKeyResource = new CloudApiKey("cloudApiKeyResource", CloudApiKeyArgs.builder()        
        .cloudOrgSlug("string")
        .role("string")
        .name("string")
        .build());
    
    cloud_api_key_resource = grafana.CloudApiKey("cloudApiKeyResource",
        cloud_org_slug="string",
        role="string",
        name="string")
    
    const cloudApiKeyResource = new grafana.CloudApiKey("cloudApiKeyResource", {
        cloudOrgSlug: "string",
        role: "string",
        name: "string",
    });
    
    type: grafana:CloudApiKey
    properties:
        cloudOrgSlug: string
        name: string
        role: string
    

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

    CloudOrgSlug string
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    Role string
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    Name string
    Name of the API key.
    CloudOrgSlug string
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    Role string
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    Name string
    Name of the API key.
    cloudOrgSlug String
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    role String
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    name String
    Name of the API key.
    cloudOrgSlug string
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    role string
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    name string
    Name of the API key.
    cloud_org_slug str
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    role str
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    name str
    Name of the API key.
    cloudOrgSlug String
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    role String
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    name String
    Name of the API key.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CloudApiKey resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The generated API key.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The generated API key.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The generated API key.
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    The generated API key.
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    The generated API key.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The generated API key.

    Look up Existing CloudApiKey Resource

    Get an existing CloudApiKey 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?: CloudApiKeyState, opts?: CustomResourceOptions): CloudApiKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cloud_org_slug: Optional[str] = None,
            key: Optional[str] = None,
            name: Optional[str] = None,
            role: Optional[str] = None) -> CloudApiKey
    func GetCloudApiKey(ctx *Context, name string, id IDInput, state *CloudApiKeyState, opts ...ResourceOption) (*CloudApiKey, error)
    public static CloudApiKey Get(string name, Input<string> id, CloudApiKeyState? state, CustomResourceOptions? opts = null)
    public static CloudApiKey get(String name, Output<String> id, CloudApiKeyState 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.
    The following state arguments are supported:
    CloudOrgSlug string
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    Key string
    The generated API key.
    Name string
    Name of the API key.
    Role string
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    CloudOrgSlug string
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    Key string
    The generated API key.
    Name string
    Name of the API key.
    Role string
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    cloudOrgSlug String
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    key String
    The generated API key.
    name String
    Name of the API key.
    role String
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    cloudOrgSlug string
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    key string
    The generated API key.
    name string
    Name of the API key.
    role string
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    cloud_org_slug str
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    key str
    The generated API key.
    name str
    Name of the API key.
    role str
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
    cloudOrgSlug String
    The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
    key String
    The generated API key.
    name String
    Name of the API key.
    role String
    Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.4.2 published on Monday, Apr 15, 2024 by pulumiverse