1. Packages
  2. Packages
  3. Akeyless Provider
  4. API Docs
  5. PolicyKeys
Viewing docs for akeyless 2.0.1
published on Monday, Apr 27, 2026 by akeyless-community
Viewing docs for akeyless 2.0.1
published on Monday, Apr 27, 2026 by akeyless-community

    Policy Keys Resource

    Create PolicyKeys Resource

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

    Constructor syntax

    new PolicyKeys(name: string, args: PolicyKeysArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyKeys(resource_name: str,
                   args: PolicyKeysArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def PolicyKeys(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   path: Optional[str] = None,
                   allowed_algorithms: Optional[Sequence[str]] = None,
                   allowed_key_names: Optional[Sequence[str]] = None,
                   allowed_key_types: Optional[Sequence[str]] = None,
                   max_rotation_interval_days: Optional[float] = None,
                   object_types: Optional[Sequence[str]] = None,
                   policy_keys_id: Optional[str] = None)
    func NewPolicyKeys(ctx *Context, name string, args PolicyKeysArgs, opts ...ResourceOption) (*PolicyKeys, error)
    public PolicyKeys(string name, PolicyKeysArgs args, CustomResourceOptions? opts = null)
    public PolicyKeys(String name, PolicyKeysArgs args)
    public PolicyKeys(String name, PolicyKeysArgs args, CustomResourceOptions options)
    
    type: akeyless:PolicyKeys
    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 PolicyKeysArgs
    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 PolicyKeysArgs
    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 PolicyKeysArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyKeysArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyKeysArgs
    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 policyKeysResource = new Akeyless.PolicyKeys("policyKeysResource", new()
    {
        Path = "string",
        AllowedAlgorithms = new[]
        {
            "string",
        },
        AllowedKeyNames = new[]
        {
            "string",
        },
        AllowedKeyTypes = new[]
        {
            "string",
        },
        MaxRotationIntervalDays = 0,
        ObjectTypes = new[]
        {
            "string",
        },
        PolicyKeysId = "string",
    });
    
    example, err := akeyless.NewPolicyKeys(ctx, "policyKeysResource", &akeyless.PolicyKeysArgs{
    	Path: pulumi.String("string"),
    	AllowedAlgorithms: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AllowedKeyNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AllowedKeyTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	MaxRotationIntervalDays: pulumi.Float64(0),
    	ObjectTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PolicyKeysId: pulumi.String("string"),
    })
    
    var policyKeysResource = new PolicyKeys("policyKeysResource", PolicyKeysArgs.builder()
        .path("string")
        .allowedAlgorithms("string")
        .allowedKeyNames("string")
        .allowedKeyTypes("string")
        .maxRotationIntervalDays(0.0)
        .objectTypes("string")
        .policyKeysId("string")
        .build());
    
    policy_keys_resource = akeyless.PolicyKeys("policyKeysResource",
        path="string",
        allowed_algorithms=["string"],
        allowed_key_names=["string"],
        allowed_key_types=["string"],
        max_rotation_interval_days=float(0),
        object_types=["string"],
        policy_keys_id="string")
    
    const policyKeysResource = new akeyless.PolicyKeys("policyKeysResource", {
        path: "string",
        allowedAlgorithms: ["string"],
        allowedKeyNames: ["string"],
        allowedKeyTypes: ["string"],
        maxRotationIntervalDays: 0,
        objectTypes: ["string"],
        policyKeysId: "string",
    });
    
    type: akeyless:PolicyKeys
    properties:
        allowedAlgorithms:
            - string
        allowedKeyNames:
            - string
        allowedKeyTypes:
            - string
        maxRotationIntervalDays: 0
        objectTypes:
            - string
        path: string
        policyKeysId: string
    

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

    Path string
    The path the policy refers to
    AllowedAlgorithms List<string>
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    AllowedKeyNames List<string>
    Specify allowed protection key names
    AllowedKeyTypes List<string>
    Specify allowed key protection types (dfc, classic-key)
    MaxRotationIntervalDays double
    Set the maximum rotation interval for automatic key rotation
    ObjectTypes List<string>
    The object types this policy will apply to (items, targets)
    PolicyKeysId string
    The ID of this resource.
    Path string
    The path the policy refers to
    AllowedAlgorithms []string
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    AllowedKeyNames []string
    Specify allowed protection key names
    AllowedKeyTypes []string
    Specify allowed key protection types (dfc, classic-key)
    MaxRotationIntervalDays float64
    Set the maximum rotation interval for automatic key rotation
    ObjectTypes []string
    The object types this policy will apply to (items, targets)
    PolicyKeysId string
    The ID of this resource.
    path String
    The path the policy refers to
    allowedAlgorithms List<String>
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    allowedKeyNames List<String>
    Specify allowed protection key names
    allowedKeyTypes List<String>
    Specify allowed key protection types (dfc, classic-key)
    maxRotationIntervalDays Double
    Set the maximum rotation interval for automatic key rotation
    objectTypes List<String>
    The object types this policy will apply to (items, targets)
    policyKeysId String
    The ID of this resource.
    path string
    The path the policy refers to
    allowedAlgorithms string[]
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    allowedKeyNames string[]
    Specify allowed protection key names
    allowedKeyTypes string[]
    Specify allowed key protection types (dfc, classic-key)
    maxRotationIntervalDays number
    Set the maximum rotation interval for automatic key rotation
    objectTypes string[]
    The object types this policy will apply to (items, targets)
    policyKeysId string
    The ID of this resource.
    path str
    The path the policy refers to
    allowed_algorithms Sequence[str]
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    allowed_key_names Sequence[str]
    Specify allowed protection key names
    allowed_key_types Sequence[str]
    Specify allowed key protection types (dfc, classic-key)
    max_rotation_interval_days float
    Set the maximum rotation interval for automatic key rotation
    object_types Sequence[str]
    The object types this policy will apply to (items, targets)
    policy_keys_id str
    The ID of this resource.
    path String
    The path the policy refers to
    allowedAlgorithms List<String>
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    allowedKeyNames List<String>
    Specify allowed protection key names
    allowedKeyTypes List<String>
    Specify allowed key protection types (dfc, classic-key)
    maxRotationIntervalDays Number
    Set the maximum rotation interval for automatic key rotation
    objectTypes List<String>
    The object types this policy will apply to (items, targets)
    policyKeysId String
    The ID of this resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PolicyKeys 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 PolicyKeys Resource

    Get an existing PolicyKeys 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?: PolicyKeysState, opts?: CustomResourceOptions): PolicyKeys
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allowed_algorithms: Optional[Sequence[str]] = None,
            allowed_key_names: Optional[Sequence[str]] = None,
            allowed_key_types: Optional[Sequence[str]] = None,
            max_rotation_interval_days: Optional[float] = None,
            object_types: Optional[Sequence[str]] = None,
            path: Optional[str] = None,
            policy_keys_id: Optional[str] = None) -> PolicyKeys
    func GetPolicyKeys(ctx *Context, name string, id IDInput, state *PolicyKeysState, opts ...ResourceOption) (*PolicyKeys, error)
    public static PolicyKeys Get(string name, Input<string> id, PolicyKeysState? state, CustomResourceOptions? opts = null)
    public static PolicyKeys get(String name, Output<String> id, PolicyKeysState state, CustomResourceOptions options)
    resources:  _:    type: akeyless:PolicyKeys    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.
    The following state arguments are supported:
    AllowedAlgorithms List<string>
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    AllowedKeyNames List<string>
    Specify allowed protection key names
    AllowedKeyTypes List<string>
    Specify allowed key protection types (dfc, classic-key)
    MaxRotationIntervalDays double
    Set the maximum rotation interval for automatic key rotation
    ObjectTypes List<string>
    The object types this policy will apply to (items, targets)
    Path string
    The path the policy refers to
    PolicyKeysId string
    The ID of this resource.
    AllowedAlgorithms []string
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    AllowedKeyNames []string
    Specify allowed protection key names
    AllowedKeyTypes []string
    Specify allowed key protection types (dfc, classic-key)
    MaxRotationIntervalDays float64
    Set the maximum rotation interval for automatic key rotation
    ObjectTypes []string
    The object types this policy will apply to (items, targets)
    Path string
    The path the policy refers to
    PolicyKeysId string
    The ID of this resource.
    allowedAlgorithms List<String>
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    allowedKeyNames List<String>
    Specify allowed protection key names
    allowedKeyTypes List<String>
    Specify allowed key protection types (dfc, classic-key)
    maxRotationIntervalDays Double
    Set the maximum rotation interval for automatic key rotation
    objectTypes List<String>
    The object types this policy will apply to (items, targets)
    path String
    The path the policy refers to
    policyKeysId String
    The ID of this resource.
    allowedAlgorithms string[]
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    allowedKeyNames string[]
    Specify allowed protection key names
    allowedKeyTypes string[]
    Specify allowed key protection types (dfc, classic-key)
    maxRotationIntervalDays number
    Set the maximum rotation interval for automatic key rotation
    objectTypes string[]
    The object types this policy will apply to (items, targets)
    path string
    The path the policy refers to
    policyKeysId string
    The ID of this resource.
    allowed_algorithms Sequence[str]
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    allowed_key_names Sequence[str]
    Specify allowed protection key names
    allowed_key_types Sequence[str]
    Specify allowed key protection types (dfc, classic-key)
    max_rotation_interval_days float
    Set the maximum rotation interval for automatic key rotation
    object_types Sequence[str]
    The object types this policy will apply to (items, targets)
    path str
    The path the policy refers to
    policy_keys_id str
    The ID of this resource.
    allowedAlgorithms List<String>
    Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
    allowedKeyNames List<String>
    Specify allowed protection key names
    allowedKeyTypes List<String>
    Specify allowed key protection types (dfc, classic-key)
    maxRotationIntervalDays Number
    Set the maximum rotation interval for automatic key rotation
    objectTypes List<String>
    The object types this policy will apply to (items, targets)
    path String
    The path the policy refers to
    policyKeysId String
    The ID of this resource.

    Package Details

    Repository
    akeyless akeyless-community/terraform-provider-akeyless
    License
    Notes
    This Pulumi package is based on the akeyless Terraform Provider.
    Viewing docs for akeyless 2.0.1
    published on Monday, Apr 27, 2026 by akeyless-community
      Try Pulumi Cloud free. Your team will thank you.