Manages a policy.
For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.
Create Policy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);@overload
def Policy(resource_name: str,
args: PolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Policy(resource_name: str,
opts: Optional[ResourceOptions] = None,
document: Optional[str] = None,
policy_name: Optional[str] = None,
description: Optional[str] = None,
path: Optional[str] = None,
timeouts: Optional[PolicyTimeoutsArgs] = None)func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
public Policy(String name, PolicyArgs args)
public Policy(String name, PolicyArgs args, CustomResourceOptions options)
type: outscale:Policy
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 PolicyArgs
- 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 PolicyArgs
- 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 PolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyArgs
- 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 policyResource = new Outscale.Policy("policyResource", new()
{
Document = "string",
PolicyName = "string",
Description = "string",
Path = "string",
Timeouts = new Outscale.Inputs.PolicyTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
},
});
example, err := outscale.NewPolicy(ctx, "policyResource", &outscale.PolicyArgs{
Document: pulumi.String("string"),
PolicyName: pulumi.String("string"),
Description: pulumi.String("string"),
Path: pulumi.String("string"),
Timeouts: &outscale.PolicyTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
},
})
var policyResource = new Policy("policyResource", PolicyArgs.builder()
.document("string")
.policyName("string")
.description("string")
.path("string")
.timeouts(PolicyTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.build())
.build());
policy_resource = outscale.Policy("policyResource",
document="string",
policy_name="string",
description="string",
path="string",
timeouts={
"create": "string",
"delete": "string",
"read": "string",
})
const policyResource = new outscale.Policy("policyResource", {
document: "string",
policyName: "string",
description: "string",
path: "string",
timeouts: {
create: "string",
"delete": "string",
read: "string",
},
});
type: outscale:Policy
properties:
description: string
document: string
path: string
policyName: string
timeouts:
create: string
delete: string
read: string
Policy 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 Policy resource accepts the following input properties:
- Document string
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- Policy
Name string - The name of the policy.
- Description string
- A description for the policy.
- Path string
- The path of the policy.
- Timeouts
Policy
Timeouts
- Document string
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- Policy
Name string - The name of the policy.
- Description string
- A description for the policy.
- Path string
- The path of the policy.
- Timeouts
Policy
Timeouts Args
- document String
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- policy
Name String - The name of the policy.
- description String
- A description for the policy.
- path String
- The path of the policy.
- timeouts
Policy
Timeouts
- document string
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- policy
Name string - The name of the policy.
- description string
- A description for the policy.
- path string
- The path of the policy.
- timeouts
Policy
Timeouts
- document str
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- policy_
name str - The name of the policy.
- description str
- A description for the policy.
- path str
- The path of the policy.
- timeouts
Policy
Timeouts Args
- document String
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- policy
Name String - The name of the policy.
- description String
- A description for the policy.
- path String
- The path of the policy.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
- Creation
Date string - The date and time (UTC) at which the policy was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Linkable bool - Indicates whether the policy can be linked to a group or an EIM user.
- Last
Modification stringDate - The date and time (UTC) at which the policy was last modified.
- Orn string
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- Policy
Default stringVersion Id - The ID of the policy default version.
- Policy
Id string - The ID of the policy.
- Resources
Count double - The number of resources attached to the policy.
- Creation
Date string - The date and time (UTC) at which the policy was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Linkable bool - Indicates whether the policy can be linked to a group or an EIM user.
- Last
Modification stringDate - The date and time (UTC) at which the policy was last modified.
- Orn string
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- Policy
Default stringVersion Id - The ID of the policy default version.
- Policy
Id string - The ID of the policy.
- Resources
Count float64 - The number of resources attached to the policy.
- creation
Date String - The date and time (UTC) at which the policy was created.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Linkable Boolean - Indicates whether the policy can be linked to a group or an EIM user.
- last
Modification StringDate - The date and time (UTC) at which the policy was last modified.
- orn String
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- policy
Default StringVersion Id - The ID of the policy default version.
- policy
Id String - The ID of the policy.
- resources
Count Double - The number of resources attached to the policy.
- creation
Date string - The date and time (UTC) at which the policy was created.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Linkable boolean - Indicates whether the policy can be linked to a group or an EIM user.
- last
Modification stringDate - The date and time (UTC) at which the policy was last modified.
- orn string
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- policy
Default stringVersion Id - The ID of the policy default version.
- policy
Id string - The ID of the policy.
- resources
Count number - The number of resources attached to the policy.
- creation_
date str - The date and time (UTC) at which the policy was created.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
linkable bool - Indicates whether the policy can be linked to a group or an EIM user.
- last_
modification_ strdate - The date and time (UTC) at which the policy was last modified.
- orn str
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- policy_
default_ strversion_ id - The ID of the policy default version.
- policy_
id str - The ID of the policy.
- resources_
count float - The number of resources attached to the policy.
- creation
Date String - The date and time (UTC) at which the policy was created.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Linkable Boolean - Indicates whether the policy can be linked to a group or an EIM user.
- last
Modification StringDate - The date and time (UTC) at which the policy was last modified.
- orn String
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- policy
Default StringVersion Id - The ID of the policy default version.
- policy
Id String - The ID of the policy.
- resources
Count Number - The number of resources attached to the policy.
Look up Existing Policy Resource
Get an existing Policy 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?: PolicyState, opts?: CustomResourceOptions): Policy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
creation_date: Optional[str] = None,
description: Optional[str] = None,
document: Optional[str] = None,
is_linkable: Optional[bool] = None,
last_modification_date: Optional[str] = None,
orn: Optional[str] = None,
path: Optional[str] = None,
policy_default_version_id: Optional[str] = None,
policy_id: Optional[str] = None,
policy_name: Optional[str] = None,
resources_count: Optional[float] = None,
timeouts: Optional[PolicyTimeoutsArgs] = None) -> Policyfunc GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)public static Policy get(String name, Output<String> id, PolicyState state, CustomResourceOptions options)resources: _: type: outscale:Policy 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.
- Creation
Date string - The date and time (UTC) at which the policy was created.
- Description string
- A description for the policy.
- Document string
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- Is
Linkable bool - Indicates whether the policy can be linked to a group or an EIM user.
- Last
Modification stringDate - The date and time (UTC) at which the policy was last modified.
- Orn string
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- Path string
- The path of the policy.
- Policy
Default stringVersion Id - The ID of the policy default version.
- Policy
Id string - The ID of the policy.
- Policy
Name string - The name of the policy.
- Resources
Count double - The number of resources attached to the policy.
- Timeouts
Policy
Timeouts
- Creation
Date string - The date and time (UTC) at which the policy was created.
- Description string
- A description for the policy.
- Document string
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- Is
Linkable bool - Indicates whether the policy can be linked to a group or an EIM user.
- Last
Modification stringDate - The date and time (UTC) at which the policy was last modified.
- Orn string
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- Path string
- The path of the policy.
- Policy
Default stringVersion Id - The ID of the policy default version.
- Policy
Id string - The ID of the policy.
- Policy
Name string - The name of the policy.
- Resources
Count float64 - The number of resources attached to the policy.
- Timeouts
Policy
Timeouts Args
- creation
Date String - The date and time (UTC) at which the policy was created.
- description String
- A description for the policy.
- document String
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- is
Linkable Boolean - Indicates whether the policy can be linked to a group or an EIM user.
- last
Modification StringDate - The date and time (UTC) at which the policy was last modified.
- orn String
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- path String
- The path of the policy.
- policy
Default StringVersion Id - The ID of the policy default version.
- policy
Id String - The ID of the policy.
- policy
Name String - The name of the policy.
- resources
Count Double - The number of resources attached to the policy.
- timeouts
Policy
Timeouts
- creation
Date string - The date and time (UTC) at which the policy was created.
- description string
- A description for the policy.
- document string
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- is
Linkable boolean - Indicates whether the policy can be linked to a group or an EIM user.
- last
Modification stringDate - The date and time (UTC) at which the policy was last modified.
- orn string
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- path string
- The path of the policy.
- policy
Default stringVersion Id - The ID of the policy default version.
- policy
Id string - The ID of the policy.
- policy
Name string - The name of the policy.
- resources
Count number - The number of resources attached to the policy.
- timeouts
Policy
Timeouts
- creation_
date str - The date and time (UTC) at which the policy was created.
- description str
- A description for the policy.
- document str
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- is_
linkable bool - Indicates whether the policy can be linked to a group or an EIM user.
- last_
modification_ strdate - The date and time (UTC) at which the policy was last modified.
- orn str
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- path str
- The path of the policy.
- policy_
default_ strversion_ id - The ID of the policy default version.
- policy_
id str - The ID of the policy.
- policy_
name str - The name of the policy.
- resources_
count float - The number of resources attached to the policy.
- timeouts
Policy
Timeouts Args
- creation
Date String - The date and time (UTC) at which the policy was created.
- description String
- A description for the policy.
- document String
- The policy document, corresponding to a JSON string that contains the policy. This policy document can contain a maximum of 5120 non-whitespace characters. For more information, see EIM Reference Information and EIM Policy Generator.
- is
Linkable Boolean - Indicates whether the policy can be linked to a group or an EIM user.
- last
Modification StringDate - The date and time (UTC) at which the policy was last modified.
- orn String
- The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
- path String
- The path of the policy.
- policy
Default StringVersion Id - The ID of the policy default version.
- policy
Id String - The ID of the policy.
- policy
Name String - The name of the policy.
- resources
Count Number - The number of resources attached to the policy.
- timeouts Property Map
Supporting Types
PolicyTimeouts, PolicyTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Import
A policy can be imported using its ORN. For example:
console
$ pulumi import outscale:index/policy:Policy policy1 orn
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- outscale outscale/terraform-provider-outscale
- License
- Notes
- This Pulumi package is based on the
outscaleTerraform Provider.
