1. Packages
  2. Packages
  3. Thoth
  4. API Docs
  5. access
  6. EndpointApiKey
Viewing docs for Thoth v0.1.15
published on Thursday, Jul 23, 2026 by Aten Security
thoth logo
Viewing docs for Thoth v0.1.15
published on Thursday, Jul 23, 2026 by Aten Security

    Create EndpointApiKey Resource

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

    Constructor syntax

    new EndpointApiKey(name: string, args: EndpointApiKeyArgs, opts?: CustomResourceOptions);
    @overload
    def EndpointApiKey(resource_name: str,
                       args: EndpointApiKeyArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def EndpointApiKey(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       permissions: Optional[Sequence[str]] = None,
                       scope_target_id: Optional[str] = None,
                       jit_reason: Optional[str] = None,
                       name: Optional[str] = None,
                       ttl_seconds: Optional[int] = None)
    func NewEndpointApiKey(ctx *Context, name string, args EndpointApiKeyArgs, opts ...ResourceOption) (*EndpointApiKey, error)
    public EndpointApiKey(string name, EndpointApiKeyArgs args, CustomResourceOptions? opts = null)
    public EndpointApiKey(String name, EndpointApiKeyArgs args)
    public EndpointApiKey(String name, EndpointApiKeyArgs args, CustomResourceOptions options)
    
    type: thoth:access:EndpointApiKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "thoth_access_endpoint_api_key" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args EndpointApiKeyArgs
    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 EndpointApiKeyArgs
    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 EndpointApiKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EndpointApiKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EndpointApiKeyArgs
    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 endpointApiKeyResource = new Thoth.Access.EndpointApiKey("endpointApiKeyResource", new()
    {
        Permissions = new[]
        {
            "string",
        },
        ScopeTargetId = "string",
        JitReason = "string",
        Name = "string",
        TtlSeconds = 0,
    });
    
    example, err := access.NewEndpointApiKey(ctx, "endpointApiKeyResource", &access.EndpointApiKeyArgs{
    	Permissions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ScopeTargetId: pulumi.String("string"),
    	JitReason:     pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	TtlSeconds:    pulumi.Int(0),
    })
    
    resource "thoth_access_endpoint_api_key" "endpointApiKeyResource" {
      lifecycle {
        create_before_destroy = true
      }
      permissions     = ["string"]
      scope_target_id = "string"
      jit_reason      = "string"
      name            = "string"
      ttl_seconds     = 0
    }
    
    var endpointApiKeyResource = new EndpointApiKey("endpointApiKeyResource", EndpointApiKeyArgs.builder()
        .permissions("string")
        .scopeTargetId("string")
        .jitReason("string")
        .name("string")
        .ttlSeconds(0)
        .build());
    
    endpoint_api_key_resource = thoth.access.EndpointApiKey("endpointApiKeyResource",
        permissions=["string"],
        scope_target_id="string",
        jit_reason="string",
        name="string",
        ttl_seconds=0)
    
    const endpointApiKeyResource = new thoth.access.EndpointApiKey("endpointApiKeyResource", {
        permissions: ["string"],
        scopeTargetId: "string",
        jitReason: "string",
        name: "string",
        ttlSeconds: 0,
    });
    
    type: thoth:access:EndpointApiKey
    properties:
        jitReason: string
        name: string
        permissions:
            - string
        scopeTargetId: string
        ttlSeconds: 0
    

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

    Permissions List<string>
    Allowed permissions: read, write, execute.
    ScopeTargetId string
    Endpoint ID targeted by this API key scope.
    JitReason string
    Audit reason for just-in-time issuance.
    Name string
    Display name for the API key.
    TtlSeconds int
    TTL in seconds for key expiry.
    Permissions []string
    Allowed permissions: read, write, execute.
    ScopeTargetId string
    Endpoint ID targeted by this API key scope.
    JitReason string
    Audit reason for just-in-time issuance.
    Name string
    Display name for the API key.
    TtlSeconds int
    TTL in seconds for key expiry.
    permissions list(string)
    Allowed permissions: read, write, execute.
    scope_target_id string
    Endpoint ID targeted by this API key scope.
    jit_reason string
    Audit reason for just-in-time issuance.
    name string
    Display name for the API key.
    ttl_seconds number
    TTL in seconds for key expiry.
    permissions List<String>
    Allowed permissions: read, write, execute.
    scopeTargetId String
    Endpoint ID targeted by this API key scope.
    jitReason String
    Audit reason for just-in-time issuance.
    name String
    Display name for the API key.
    ttlSeconds Integer
    TTL in seconds for key expiry.
    permissions string[]
    Allowed permissions: read, write, execute.
    scopeTargetId string
    Endpoint ID targeted by this API key scope.
    jitReason string
    Audit reason for just-in-time issuance.
    name string
    Display name for the API key.
    ttlSeconds number
    TTL in seconds for key expiry.
    permissions Sequence[str]
    Allowed permissions: read, write, execute.
    scope_target_id str
    Endpoint ID targeted by this API key scope.
    jit_reason str
    Audit reason for just-in-time issuance.
    name str
    Display name for the API key.
    ttl_seconds int
    TTL in seconds for key expiry.
    permissions List<String>
    Allowed permissions: read, write, execute.
    scopeTargetId String
    Endpoint ID targeted by this API key scope.
    jitReason String
    Audit reason for just-in-time issuance.
    name String
    Display name for the API key.
    ttlSeconds Number
    TTL in seconds for key expiry.

    Outputs

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

    Active bool
    Whether key is currently active and not expired/revoked.
    ApiKey string
    One-time plaintext API key (returned only on create).
    CreatedAt string
    Creation timestamp.
    ExpiresAt string
    Expiry timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyId string
    GovAPI key identifier.
    LastUsedAt string
    Last authorization timestamp.
    Prefix string
    Key prefix for operator identification.
    ScopeLevel string
    Fixed scope for this resource type.
    TenantId string
    Tenant ID from provider configuration.
    Active bool
    Whether key is currently active and not expired/revoked.
    ApiKey string
    One-time plaintext API key (returned only on create).
    CreatedAt string
    Creation timestamp.
    ExpiresAt string
    Expiry timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyId string
    GovAPI key identifier.
    LastUsedAt string
    Last authorization timestamp.
    Prefix string
    Key prefix for operator identification.
    ScopeLevel string
    Fixed scope for this resource type.
    TenantId string
    Tenant ID from provider configuration.
    active bool
    Whether key is currently active and not expired/revoked.
    api_key string
    One-time plaintext API key (returned only on create).
    created_at string
    Creation timestamp.
    expires_at string
    Expiry timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    key_id string
    GovAPI key identifier.
    last_used_at string
    Last authorization timestamp.
    prefix string
    Key prefix for operator identification.
    scope_level string
    Fixed scope for this resource type.
    tenant_id string
    Tenant ID from provider configuration.
    active Boolean
    Whether key is currently active and not expired/revoked.
    apiKey String
    One-time plaintext API key (returned only on create).
    createdAt String
    Creation timestamp.
    expiresAt String
    Expiry timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    keyId String
    GovAPI key identifier.
    lastUsedAt String
    Last authorization timestamp.
    prefix String
    Key prefix for operator identification.
    scopeLevel String
    Fixed scope for this resource type.
    tenantId String
    Tenant ID from provider configuration.
    active boolean
    Whether key is currently active and not expired/revoked.
    apiKey string
    One-time plaintext API key (returned only on create).
    createdAt string
    Creation timestamp.
    expiresAt string
    Expiry timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    keyId string
    GovAPI key identifier.
    lastUsedAt string
    Last authorization timestamp.
    prefix string
    Key prefix for operator identification.
    scopeLevel string
    Fixed scope for this resource type.
    tenantId string
    Tenant ID from provider configuration.
    active bool
    Whether key is currently active and not expired/revoked.
    api_key str
    One-time plaintext API key (returned only on create).
    created_at str
    Creation timestamp.
    expires_at str
    Expiry timestamp.
    id str
    The provider-assigned unique ID for this managed resource.
    key_id str
    GovAPI key identifier.
    last_used_at str
    Last authorization timestamp.
    prefix str
    Key prefix for operator identification.
    scope_level str
    Fixed scope for this resource type.
    tenant_id str
    Tenant ID from provider configuration.
    active Boolean
    Whether key is currently active and not expired/revoked.
    apiKey String
    One-time plaintext API key (returned only on create).
    createdAt String
    Creation timestamp.
    expiresAt String
    Expiry timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    keyId String
    GovAPI key identifier.
    lastUsedAt String
    Last authorization timestamp.
    prefix String
    Key prefix for operator identification.
    scopeLevel String
    Fixed scope for this resource type.
    tenantId String
    Tenant ID from provider configuration.

    Look up Existing EndpointApiKey Resource

    Get an existing EndpointApiKey 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?: EndpointApiKeyState, opts?: CustomResourceOptions): EndpointApiKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            active: Optional[bool] = None,
            api_key: Optional[str] = None,
            created_at: Optional[str] = None,
            expires_at: Optional[str] = None,
            jit_reason: Optional[str] = None,
            key_id: Optional[str] = None,
            last_used_at: Optional[str] = None,
            name: Optional[str] = None,
            permissions: Optional[Sequence[str]] = None,
            prefix: Optional[str] = None,
            scope_level: Optional[str] = None,
            scope_target_id: Optional[str] = None,
            tenant_id: Optional[str] = None,
            ttl_seconds: Optional[int] = None) -> EndpointApiKey
    func GetEndpointApiKey(ctx *Context, name string, id IDInput, state *EndpointApiKeyState, opts ...ResourceOption) (*EndpointApiKey, error)
    public static EndpointApiKey Get(string name, Input<string> id, EndpointApiKeyState? state, CustomResourceOptions? opts = null)
    public static EndpointApiKey get(String name, Output<String> id, EndpointApiKeyState state, CustomResourceOptions options)
    resources:  _:    type: thoth:access:EndpointApiKey    get:      id: ${id}
    import {
      to = thoth_access_endpoint_api_key.example
      id = "${id}"
    }
    
    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:
    Active bool
    Whether key is currently active and not expired/revoked.
    ApiKey string
    One-time plaintext API key (returned only on create).
    CreatedAt string
    Creation timestamp.
    ExpiresAt string
    Expiry timestamp.
    JitReason string
    Audit reason for just-in-time issuance.
    KeyId string
    GovAPI key identifier.
    LastUsedAt string
    Last authorization timestamp.
    Name string
    Display name for the API key.
    Permissions List<string>
    Allowed permissions: read, write, execute.
    Prefix string
    Key prefix for operator identification.
    ScopeLevel string
    Fixed scope for this resource type.
    ScopeTargetId string
    Endpoint ID targeted by this API key scope.
    TenantId string
    Tenant ID from provider configuration.
    TtlSeconds int
    TTL in seconds for key expiry.
    Active bool
    Whether key is currently active and not expired/revoked.
    ApiKey string
    One-time plaintext API key (returned only on create).
    CreatedAt string
    Creation timestamp.
    ExpiresAt string
    Expiry timestamp.
    JitReason string
    Audit reason for just-in-time issuance.
    KeyId string
    GovAPI key identifier.
    LastUsedAt string
    Last authorization timestamp.
    Name string
    Display name for the API key.
    Permissions []string
    Allowed permissions: read, write, execute.
    Prefix string
    Key prefix for operator identification.
    ScopeLevel string
    Fixed scope for this resource type.
    ScopeTargetId string
    Endpoint ID targeted by this API key scope.
    TenantId string
    Tenant ID from provider configuration.
    TtlSeconds int
    TTL in seconds for key expiry.
    active bool
    Whether key is currently active and not expired/revoked.
    api_key string
    One-time plaintext API key (returned only on create).
    created_at string
    Creation timestamp.
    expires_at string
    Expiry timestamp.
    jit_reason string
    Audit reason for just-in-time issuance.
    key_id string
    GovAPI key identifier.
    last_used_at string
    Last authorization timestamp.
    name string
    Display name for the API key.
    permissions list(string)
    Allowed permissions: read, write, execute.
    prefix string
    Key prefix for operator identification.
    scope_level string
    Fixed scope for this resource type.
    scope_target_id string
    Endpoint ID targeted by this API key scope.
    tenant_id string
    Tenant ID from provider configuration.
    ttl_seconds number
    TTL in seconds for key expiry.
    active Boolean
    Whether key is currently active and not expired/revoked.
    apiKey String
    One-time plaintext API key (returned only on create).
    createdAt String
    Creation timestamp.
    expiresAt String
    Expiry timestamp.
    jitReason String
    Audit reason for just-in-time issuance.
    keyId String
    GovAPI key identifier.
    lastUsedAt String
    Last authorization timestamp.
    name String
    Display name for the API key.
    permissions List<String>
    Allowed permissions: read, write, execute.
    prefix String
    Key prefix for operator identification.
    scopeLevel String
    Fixed scope for this resource type.
    scopeTargetId String
    Endpoint ID targeted by this API key scope.
    tenantId String
    Tenant ID from provider configuration.
    ttlSeconds Integer
    TTL in seconds for key expiry.
    active boolean
    Whether key is currently active and not expired/revoked.
    apiKey string
    One-time plaintext API key (returned only on create).
    createdAt string
    Creation timestamp.
    expiresAt string
    Expiry timestamp.
    jitReason string
    Audit reason for just-in-time issuance.
    keyId string
    GovAPI key identifier.
    lastUsedAt string
    Last authorization timestamp.
    name string
    Display name for the API key.
    permissions string[]
    Allowed permissions: read, write, execute.
    prefix string
    Key prefix for operator identification.
    scopeLevel string
    Fixed scope for this resource type.
    scopeTargetId string
    Endpoint ID targeted by this API key scope.
    tenantId string
    Tenant ID from provider configuration.
    ttlSeconds number
    TTL in seconds for key expiry.
    active bool
    Whether key is currently active and not expired/revoked.
    api_key str
    One-time plaintext API key (returned only on create).
    created_at str
    Creation timestamp.
    expires_at str
    Expiry timestamp.
    jit_reason str
    Audit reason for just-in-time issuance.
    key_id str
    GovAPI key identifier.
    last_used_at str
    Last authorization timestamp.
    name str
    Display name for the API key.
    permissions Sequence[str]
    Allowed permissions: read, write, execute.
    prefix str
    Key prefix for operator identification.
    scope_level str
    Fixed scope for this resource type.
    scope_target_id str
    Endpoint ID targeted by this API key scope.
    tenant_id str
    Tenant ID from provider configuration.
    ttl_seconds int
    TTL in seconds for key expiry.
    active Boolean
    Whether key is currently active and not expired/revoked.
    apiKey String
    One-time plaintext API key (returned only on create).
    createdAt String
    Creation timestamp.
    expiresAt String
    Expiry timestamp.
    jitReason String
    Audit reason for just-in-time issuance.
    keyId String
    GovAPI key identifier.
    lastUsedAt String
    Last authorization timestamp.
    name String
    Display name for the API key.
    permissions List<String>
    Allowed permissions: read, write, execute.
    prefix String
    Key prefix for operator identification.
    scopeLevel String
    Fixed scope for this resource type.
    scopeTargetId String
    Endpoint ID targeted by this API key scope.
    tenantId String
    Tenant ID from provider configuration.
    ttlSeconds Number
    TTL in seconds for key expiry.

    Package Details

    Repository
    thoth atensecurity/pulumi-thoth
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the thoth Terraform Provider.
    thoth logo
    Viewing docs for Thoth v0.1.15
    published on Thursday, Jul 23, 2026 by Aten Security

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial