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

grafana.ApiKey

Explore with Pulumi AI

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

    Create ApiKey Resource

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

    Constructor syntax

    new ApiKey(name: string, args: ApiKeyArgs, opts?: CustomResourceOptions);
    @overload
    def ApiKey(resource_name: str,
               args: ApiKeyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiKey(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               role: Optional[str] = None,
               name: Optional[str] = None,
               org_id: Optional[str] = None,
               seconds_to_live: Optional[int] = None)
    func NewApiKey(ctx *Context, name string, args ApiKeyArgs, opts ...ResourceOption) (*ApiKey, error)
    public ApiKey(string name, ApiKeyArgs args, CustomResourceOptions? opts = null)
    public ApiKey(String name, ApiKeyArgs args)
    public ApiKey(String name, ApiKeyArgs args, CustomResourceOptions options)
    
    type: grafana:ApiKey
    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 ApiKeyArgs
    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 ApiKeyArgs
    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 ApiKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiKeyArgs
    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 apiKeyResource = new Grafana.ApiKey("apiKeyResource", new()
    {
        Role = "string",
        Name = "string",
        OrgId = "string",
        SecondsToLive = 0,
    });
    
    example, err := grafana.NewApiKey(ctx, "apiKeyResource", &grafana.ApiKeyArgs{
    	Role:          pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	OrgId:         pulumi.String("string"),
    	SecondsToLive: pulumi.Int(0),
    })
    
    var apiKeyResource = new ApiKey("apiKeyResource", ApiKeyArgs.builder()        
        .role("string")
        .name("string")
        .orgId("string")
        .secondsToLive(0)
        .build());
    
    api_key_resource = grafana.ApiKey("apiKeyResource",
        role="string",
        name="string",
        org_id="string",
        seconds_to_live=0)
    
    const apiKeyResource = new grafana.ApiKey("apiKeyResource", {
        role: "string",
        name: "string",
        orgId: "string",
        secondsToLive: 0,
    });
    
    type: grafana:ApiKey
    properties:
        name: string
        orgId: string
        role: string
        secondsToLive: 0
    

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

    Role string
    Name string
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    SecondsToLive int
    Role string
    Name string
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    SecondsToLive int
    role String
    name String
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secondsToLive Integer
    role string
    name string
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secondsToLive number
    role str
    name str
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    seconds_to_live int
    role String
    name String
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    secondsToLive Number

    Outputs

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

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

    Look up Existing ApiKey Resource

    Get an existing ApiKey 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?: ApiKeyState, opts?: CustomResourceOptions): ApiKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            expiration: Optional[str] = None,
            key: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            role: Optional[str] = None,
            seconds_to_live: Optional[int] = None) -> ApiKey
    func GetApiKey(ctx *Context, name string, id IDInput, state *ApiKeyState, opts ...ResourceOption) (*ApiKey, error)
    public static ApiKey Get(string name, Input<string> id, ApiKeyState? state, CustomResourceOptions? opts = null)
    public static ApiKey get(String name, Output<String> id, ApiKeyState 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:
    Expiration string
    Key string
    Name string
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Role string
    SecondsToLive int
    Expiration string
    Key string
    Name string
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Role string
    SecondsToLive int
    expiration String
    key String
    name String
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role String
    secondsToLive Integer
    expiration string
    key string
    name string
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role string
    secondsToLive number
    expiration str
    key str
    name str
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role str
    seconds_to_live int
    expiration String
    key String
    name String
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role String
    secondsToLive Number

    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