published on Thursday, Jul 23, 2026 by Aten Security
published on Thursday, Jul 23, 2026 by Aten Security
Create FleetApiKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FleetApiKey(name: string, args: FleetApiKeyArgs, opts?: CustomResourceOptions);@overload
def FleetApiKey(resource_name: str,
args: FleetApiKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FleetApiKey(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 NewFleetApiKey(ctx *Context, name string, args FleetApiKeyArgs, opts ...ResourceOption) (*FleetApiKey, error)public FleetApiKey(string name, FleetApiKeyArgs args, CustomResourceOptions? opts = null)
public FleetApiKey(String name, FleetApiKeyArgs args)
public FleetApiKey(String name, FleetApiKeyArgs args, CustomResourceOptions options)
type: thoth:access:FleetApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "thoth_access_fleet_api_key" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args FleetApiKeyArgs
- 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 FleetApiKeyArgs
- 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 FleetApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FleetApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FleetApiKeyArgs
- 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 fleetApiKeyResource = new Thoth.Access.FleetApiKey("fleetApiKeyResource", new()
{
Permissions = new[]
{
"string",
},
ScopeTargetId = "string",
JitReason = "string",
Name = "string",
TtlSeconds = 0,
});
example, err := access.NewFleetApiKey(ctx, "fleetApiKeyResource", &access.FleetApiKeyArgs{
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_fleet_api_key" "fleetApiKeyResource" {
lifecycle {
create_before_destroy = true
}
permissions = ["string"]
scope_target_id = "string"
jit_reason = "string"
name = "string"
ttl_seconds = 0
}
var fleetApiKeyResource = new FleetApiKey("fleetApiKeyResource", FleetApiKeyArgs.builder()
.permissions("string")
.scopeTargetId("string")
.jitReason("string")
.name("string")
.ttlSeconds(0)
.build());
fleet_api_key_resource = thoth.access.FleetApiKey("fleetApiKeyResource",
permissions=["string"],
scope_target_id="string",
jit_reason="string",
name="string",
ttl_seconds=0)
const fleetApiKeyResource = new thoth.access.FleetApiKey("fleetApiKeyResource", {
permissions: ["string"],
scopeTargetId: "string",
jitReason: "string",
name: "string",
ttlSeconds: 0,
});
type: thoth:access:FleetApiKey
properties:
jitReason: string
name: string
permissions:
- string
scopeTargetId: string
ttlSeconds: 0
FleetApiKey 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 FleetApiKey resource accepts the following input properties:
- Permissions List<string>
- Allowed permissions: read, write, execute.
- Scope
Target stringId - Fleet 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 int - TTL in seconds for key expiry.
- Permissions []string
- Allowed permissions: read, write, execute.
- Scope
Target stringId - Fleet 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 int - TTL in seconds for key expiry.
- permissions list(string)
- Allowed permissions: read, write, execute.
- scope_
target_ stringid - Fleet 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.
- scope
Target StringId - Fleet 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 Integer - TTL in seconds for key expiry.
- permissions string[]
- Allowed permissions: read, write, execute.
- scope
Target stringId - Fleet 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 Sequence[str]
- Allowed permissions: read, write, execute.
- scope_
target_ strid - Fleet 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.
- scope
Target StringId - Fleet 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the FleetApiKey resource produces the following output properties:
- 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 stringAt - 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 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 stringAt - 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 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_ stringat - 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.
- 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 StringAt - 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.
- 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 stringAt - 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 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_ strat - 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.
- 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 StringAt - 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.
Look up Existing FleetApiKey Resource
Get an existing FleetApiKey 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?: FleetApiKeyState, opts?: CustomResourceOptions): FleetApiKey@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) -> FleetApiKeyfunc GetFleetApiKey(ctx *Context, name string, id IDInput, state *FleetApiKeyState, opts ...ResourceOption) (*FleetApiKey, error)public static FleetApiKey Get(string name, Input<string> id, FleetApiKeyState? state, CustomResourceOptions? opts = null)public static FleetApiKey get(String name, Output<String> id, FleetApiKeyState state, CustomResourceOptions options)resources: _: type: thoth:access:FleetApiKey get: id: ${id}import {
to = thoth_access_fleet_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.
- 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 stringAt - 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 stringId - Fleet ID targeted by this API key scope.
- Tenant
Id string - Tenant ID from provider configuration.
- Ttl
Seconds 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 stringAt - 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.
- Scope
Level string - Fixed scope for this resource type.
- Scope
Target stringId - Fleet ID targeted by this API key scope.
- Tenant
Id string - Tenant ID from provider configuration.
- Ttl
Seconds 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_ stringat - 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_ stringid - Fleet 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.
- 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 StringAt - 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 StringId - Fleet ID targeted by this API key scope.
- tenant
Id String - Tenant ID from provider configuration.
- ttl
Seconds Integer - TTL in seconds for key expiry.
- active boolean
- 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 stringAt - 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.
- scope
Level string - Fixed scope for this resource type.
- scope
Target stringId - Fleet 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 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_ strat - 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_ strid - Fleet 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.
- 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 StringAt - 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 StringId - Fleet ID targeted by this API key scope.
- tenant
Id String - Tenant ID from provider configuration.
- ttl
Seconds 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
thothTerraform Provider.
published on Thursday, Jul 23, 2026 by Aten Security