published on Monday, Apr 27, 2026 by akeyless-community
published on Monday, Apr 27, 2026 by akeyless-community
AWS Target resource
Create TargetAws Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TargetAws(name: string, args: TargetAwsArgs, opts?: CustomResourceOptions);@overload
def TargetAws(resource_name: str,
args: TargetAwsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TargetAws(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_key_id: Optional[str] = None,
max_versions: Optional[str] = None,
description: Optional[str] = None,
generate_external_id: Optional[bool] = None,
keep_prev_version: Optional[str] = None,
key: Optional[str] = None,
access_key: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
role_arn: Optional[str] = None,
session_token: Optional[str] = None,
target_aws_id: Optional[str] = None,
use_gw_cloud_identity: Optional[bool] = None)func NewTargetAws(ctx *Context, name string, args TargetAwsArgs, opts ...ResourceOption) (*TargetAws, error)public TargetAws(string name, TargetAwsArgs args, CustomResourceOptions? opts = null)
public TargetAws(String name, TargetAwsArgs args)
public TargetAws(String name, TargetAwsArgs args, CustomResourceOptions options)
type: akeyless:TargetAws
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 TargetAwsArgs
- 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 TargetAwsArgs
- 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 TargetAwsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TargetAwsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TargetAwsArgs
- 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 targetAwsResource = new Akeyless.TargetAws("targetAwsResource", new()
{
AccessKeyId = "string",
MaxVersions = "string",
Description = "string",
GenerateExternalId = false,
KeepPrevVersion = "string",
Key = "string",
AccessKey = "string",
Name = "string",
Region = "string",
RoleArn = "string",
SessionToken = "string",
TargetAwsId = "string",
UseGwCloudIdentity = false,
});
example, err := akeyless.NewTargetAws(ctx, "targetAwsResource", &akeyless.TargetAwsArgs{
AccessKeyId: pulumi.String("string"),
MaxVersions: pulumi.String("string"),
Description: pulumi.String("string"),
GenerateExternalId: pulumi.Bool(false),
KeepPrevVersion: pulumi.String("string"),
Key: pulumi.String("string"),
AccessKey: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
RoleArn: pulumi.String("string"),
SessionToken: pulumi.String("string"),
TargetAwsId: pulumi.String("string"),
UseGwCloudIdentity: pulumi.Bool(false),
})
var targetAwsResource = new TargetAws("targetAwsResource", TargetAwsArgs.builder()
.accessKeyId("string")
.maxVersions("string")
.description("string")
.generateExternalId(false)
.keepPrevVersion("string")
.key("string")
.accessKey("string")
.name("string")
.region("string")
.roleArn("string")
.sessionToken("string")
.targetAwsId("string")
.useGwCloudIdentity(false)
.build());
target_aws_resource = akeyless.TargetAws("targetAwsResource",
access_key_id="string",
max_versions="string",
description="string",
generate_external_id=False,
keep_prev_version="string",
key="string",
access_key="string",
name="string",
region="string",
role_arn="string",
session_token="string",
target_aws_id="string",
use_gw_cloud_identity=False)
const targetAwsResource = new akeyless.TargetAws("targetAwsResource", {
accessKeyId: "string",
maxVersions: "string",
description: "string",
generateExternalId: false,
keepPrevVersion: "string",
key: "string",
accessKey: "string",
name: "string",
region: "string",
roleArn: "string",
sessionToken: "string",
targetAwsId: "string",
useGwCloudIdentity: false,
});
type: akeyless:TargetAws
properties:
accessKey: string
accessKeyId: string
description: string
generateExternalId: false
keepPrevVersion: string
key: string
maxVersions: string
name: string
region: string
roleArn: string
sessionToken: string
targetAwsId: string
useGwCloudIdentity: false
TargetAws 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 TargetAws resource accepts the following input properties:
- Access
Key stringId - AWS access key ID
- Access
Key string - AWS secret access key
- Description string
- Description of the object
- Generate
External boolId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Name string
- Target name
- Region string
- AWS region
- Role
Arn string - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- Session
Token string - Required only for temporary security credentials retrieved using STS
- Target
Aws stringId - The ID of this resource.
- Use
Gw boolCloud Identity - Use the GW's Cloud IAM
- Access
Key stringId - AWS access key ID
- Access
Key string - AWS secret access key
- Description string
- Description of the object
- Generate
External boolId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Name string
- Target name
- Region string
- AWS region
- Role
Arn string - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- Session
Token string - Required only for temporary security credentials retrieved using STS
- Target
Aws stringId - The ID of this resource.
- Use
Gw boolCloud Identity - Use the GW's Cloud IAM
- access
Key StringId - AWS access key ID
- access
Key String - AWS secret access key
- description String
- Description of the object
- generate
External BooleanId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- name String
- Target name
- region String
- AWS region
- role
Arn String - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- session
Token String - Required only for temporary security credentials retrieved using STS
- target
Aws StringId - The ID of this resource.
- use
Gw BooleanCloud Identity - Use the GW's Cloud IAM
- access
Key stringId - AWS access key ID
- access
Key string - AWS secret access key
- description string
- Description of the object
- generate
External booleanId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- name string
- Target name
- region string
- AWS region
- role
Arn string - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- session
Token string - Required only for temporary security credentials retrieved using STS
- target
Aws stringId - The ID of this resource.
- use
Gw booleanCloud Identity - Use the GW's Cloud IAM
- access_
key_ strid - AWS access key ID
- access_
key str - AWS secret access key
- description str
- Description of the object
- generate_
external_ boolid - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- keep_
prev_ strversion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key str
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max_
versions str - Set the maximum number of versions, limited by the account settings defaults.
- name str
- Target name
- region str
- AWS region
- role_
arn str - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- session_
token str - Required only for temporary security credentials retrieved using STS
- target_
aws_ strid - The ID of this resource.
- use_
gw_ boolcloud_ identity - Use the GW's Cloud IAM
- access
Key StringId - AWS access key ID
- access
Key String - AWS secret access key
- description String
- Description of the object
- generate
External BooleanId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- name String
- Target name
- region String
- AWS region
- role
Arn String - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- session
Token String - Required only for temporary security credentials retrieved using STS
- target
Aws StringId - The ID of this resource.
- use
Gw BooleanCloud Identity - Use the GW's Cloud IAM
Outputs
All input properties are implicitly available as output properties. Additionally, the TargetAws resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TargetAws Resource
Get an existing TargetAws 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?: TargetAwsState, opts?: CustomResourceOptions): TargetAws@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key: Optional[str] = None,
access_key_id: Optional[str] = None,
description: Optional[str] = None,
generate_external_id: Optional[bool] = None,
keep_prev_version: Optional[str] = None,
key: Optional[str] = None,
max_versions: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
role_arn: Optional[str] = None,
session_token: Optional[str] = None,
target_aws_id: Optional[str] = None,
use_gw_cloud_identity: Optional[bool] = None) -> TargetAwsfunc GetTargetAws(ctx *Context, name string, id IDInput, state *TargetAwsState, opts ...ResourceOption) (*TargetAws, error)public static TargetAws Get(string name, Input<string> id, TargetAwsState? state, CustomResourceOptions? opts = null)public static TargetAws get(String name, Output<String> id, TargetAwsState state, CustomResourceOptions options)resources: _: type: akeyless:TargetAws get: 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.
- Access
Key string - AWS secret access key
- Access
Key stringId - AWS access key ID
- Description string
- Description of the object
- Generate
External boolId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Name string
- Target name
- Region string
- AWS region
- Role
Arn string - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- Session
Token string - Required only for temporary security credentials retrieved using STS
- Target
Aws stringId - The ID of this resource.
- Use
Gw boolCloud Identity - Use the GW's Cloud IAM
- Access
Key string - AWS secret access key
- Access
Key stringId - AWS access key ID
- Description string
- Description of the object
- Generate
External boolId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Name string
- Target name
- Region string
- AWS region
- Role
Arn string - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- Session
Token string - Required only for temporary security credentials retrieved using STS
- Target
Aws stringId - The ID of this resource.
- Use
Gw boolCloud Identity - Use the GW's Cloud IAM
- access
Key String - AWS secret access key
- access
Key StringId - AWS access key ID
- description String
- Description of the object
- generate
External BooleanId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- name String
- Target name
- region String
- AWS region
- role
Arn String - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- session
Token String - Required only for temporary security credentials retrieved using STS
- target
Aws StringId - The ID of this resource.
- use
Gw BooleanCloud Identity - Use the GW's Cloud IAM
- access
Key string - AWS secret access key
- access
Key stringId - AWS access key ID
- description string
- Description of the object
- generate
External booleanId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- name string
- Target name
- region string
- AWS region
- role
Arn string - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- session
Token string - Required only for temporary security credentials retrieved using STS
- target
Aws stringId - The ID of this resource.
- use
Gw booleanCloud Identity - Use the GW's Cloud IAM
- access_
key str - AWS secret access key
- access_
key_ strid - AWS access key ID
- description str
- Description of the object
- generate_
external_ boolid - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- keep_
prev_ strversion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key str
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max_
versions str - Set the maximum number of versions, limited by the account settings defaults.
- name str
- Target name
- region str
- AWS region
- role_
arn str - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- session_
token str - Required only for temporary security credentials retrieved using STS
- target_
aws_ strid - The ID of this resource.
- use_
gw_ boolcloud_ identity - Use the GW's Cloud IAM
- access
Key String - AWS secret access key
- access
Key StringId - AWS access key ID
- description String
- Description of the object
- generate
External BooleanId - A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- name String
- Target name
- region String
- AWS region
- role
Arn String - AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
- session
Token String - Required only for temporary security credentials retrieved using STS
- target
Aws StringId - The ID of this resource.
- use
Gw BooleanCloud Identity - Use the GW's Cloud IAM
Package Details
- Repository
- akeyless akeyless-community/terraform-provider-akeyless
- License
- Notes
- This Pulumi package is based on the
akeylessTerraform Provider.
published on Monday, Apr 27, 2026 by akeyless-community
