Class LifecyclePolicyPolicyDetailsArgs.Builder

    • Method Detail

      • action

        public LifecyclePolicyPolicyDetailsArgs.Builder action​(@Nullable
                                                               com.pulumi.core.Output<LifecyclePolicyPolicyDetailsActionArgs> action)
        Parameters:
        action - The actions to be performed when the event-based policy is triggered. You can specify only one action per policy. This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter. See the `action` configuration block.
        Returns:
        builder
      • action

        public LifecyclePolicyPolicyDetailsArgs.Builder action​(LifecyclePolicyPolicyDetailsActionArgs action)
        Parameters:
        action - The actions to be performed when the event-based policy is triggered. You can specify only one action per policy. This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter. See the `action` configuration block.
        Returns:
        builder
      • createInterval

        public LifecyclePolicyPolicyDetailsArgs.Builder createInterval​(@Nullable
                                                                       com.pulumi.core.Output<java.lang.Integer> createInterval)
        Parameters:
        createInterval - How often the policy should run and create snapshots or AMIs. valid values range from `1` to `7`. Default value is `1`.
        Returns:
        builder
      • createInterval

        public LifecyclePolicyPolicyDetailsArgs.Builder createInterval​(java.lang.Integer createInterval)
        Parameters:
        createInterval - How often the policy should run and create snapshots or AMIs. valid values range from `1` to `7`. Default value is `1`.
        Returns:
        builder
      • eventSource

        public LifecyclePolicyPolicyDetailsArgs.Builder eventSource​(@Nullable
                                                                    com.pulumi.core.Output<LifecyclePolicyPolicyDetailsEventSourceArgs> eventSource)
        Parameters:
        eventSource - The event that triggers the event-based policy. This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter. See the `eventSource` configuration block.
        Returns:
        builder
      • extendDeletion

        public LifecyclePolicyPolicyDetailsArgs.Builder extendDeletion​(@Nullable
                                                                       com.pulumi.core.Output<java.lang.Boolean> extendDeletion)
        Parameters:
        extendDeletion - snapshot or AMI retention behavior for the policy if the source volume or instance is deleted, or if the policy enters the error, disabled, or deleted state. Default value is `false`.
        Returns:
        builder
      • extendDeletion

        public LifecyclePolicyPolicyDetailsArgs.Builder extendDeletion​(java.lang.Boolean extendDeletion)
        Parameters:
        extendDeletion - snapshot or AMI retention behavior for the policy if the source volume or instance is deleted, or if the policy enters the error, disabled, or deleted state. Default value is `false`.
        Returns:
        builder
      • policyLanguage

        public LifecyclePolicyPolicyDetailsArgs.Builder policyLanguage​(@Nullable
                                                                       com.pulumi.core.Output<java.lang.String> policyLanguage)
        Parameters:
        policyLanguage - Type of policy to create. `SIMPLIFIED` To create a default policy. `STANDARD` To create a custom policy.
        Returns:
        builder
      • policyLanguage

        public LifecyclePolicyPolicyDetailsArgs.Builder policyLanguage​(java.lang.String policyLanguage)
        Parameters:
        policyLanguage - Type of policy to create. `SIMPLIFIED` To create a default policy. `STANDARD` To create a custom policy.
        Returns:
        builder
      • policyType

        public LifecyclePolicyPolicyDetailsArgs.Builder policyType​(@Nullable
                                                                   com.pulumi.core.Output<java.lang.String> policyType)
        Parameters:
        policyType - The valid target resource types and actions a policy can manage. Specify `EBS_SNAPSHOT_MANAGEMENT` to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify `IMAGE_MANAGEMENT` to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify `EVENT_BASED_POLICY` to create an event-based policy that performs specific actions when a defined event occurs in your AWS account. Default value is `EBS_SNAPSHOT_MANAGEMENT`.
        Returns:
        builder
      • policyType

        public LifecyclePolicyPolicyDetailsArgs.Builder policyType​(java.lang.String policyType)
        Parameters:
        policyType - The valid target resource types and actions a policy can manage. Specify `EBS_SNAPSHOT_MANAGEMENT` to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify `IMAGE_MANAGEMENT` to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify `EVENT_BASED_POLICY` to create an event-based policy that performs specific actions when a defined event occurs in your AWS account. Default value is `EBS_SNAPSHOT_MANAGEMENT`.
        Returns:
        builder
      • resourceLocations

        public LifecyclePolicyPolicyDetailsArgs.Builder resourceLocations​(@Nullable
                                                                          com.pulumi.core.Output<java.lang.String> resourceLocations)
        Parameters:
        resourceLocations - The location of the resources to backup. If the source resources are located in an AWS Region, specify `CLOUD`. If the source resources are located on an Outpost in your account, specify `OUTPOST`. If the source resources are located in a Local Zone, specify `LOCAL_ZONE`. Valid values are `CLOUD`, `LOCAL_ZONE`, and `OUTPOST`.
        Returns:
        builder
      • resourceLocations

        public LifecyclePolicyPolicyDetailsArgs.Builder resourceLocations​(java.lang.String resourceLocations)
        Parameters:
        resourceLocations - The location of the resources to backup. If the source resources are located in an AWS Region, specify `CLOUD`. If the source resources are located on an Outpost in your account, specify `OUTPOST`. If the source resources are located in a Local Zone, specify `LOCAL_ZONE`. Valid values are `CLOUD`, `LOCAL_ZONE`, and `OUTPOST`.
        Returns:
        builder
      • resourceType

        public LifecyclePolicyPolicyDetailsArgs.Builder resourceType​(@Nullable
                                                                     com.pulumi.core.Output<java.lang.String> resourceType)
        Parameters:
        resourceType - Type of default policy to create. Valid values are `VOLUME` and `INSTANCE`.
        Returns:
        builder
      • resourceType

        public LifecyclePolicyPolicyDetailsArgs.Builder resourceType​(java.lang.String resourceType)
        Parameters:
        resourceType - Type of default policy to create. Valid values are `VOLUME` and `INSTANCE`.
        Returns:
        builder
      • resourceTypes

        public LifecyclePolicyPolicyDetailsArgs.Builder resourceTypes​(@Nullable
                                                                      com.pulumi.core.Output<java.util.List<java.lang.String>> resourceTypes)
        Parameters:
        resourceTypes - A list of resource types that should be targeted by the lifecycle policy. Valid values are `VOLUME` and `INSTANCE`.
        Returns:
        builder
      • resourceTypes

        public LifecyclePolicyPolicyDetailsArgs.Builder resourceTypes​(java.util.List<java.lang.String> resourceTypes)
        Parameters:
        resourceTypes - A list of resource types that should be targeted by the lifecycle policy. Valid values are `VOLUME` and `INSTANCE`.
        Returns:
        builder
      • resourceTypes

        public LifecyclePolicyPolicyDetailsArgs.Builder resourceTypes​(java.lang.String... resourceTypes)
        Parameters:
        resourceTypes - A list of resource types that should be targeted by the lifecycle policy. Valid values are `VOLUME` and `INSTANCE`.
        Returns:
        builder
      • retainInterval

        public LifecyclePolicyPolicyDetailsArgs.Builder retainInterval​(@Nullable
                                                                       com.pulumi.core.Output<java.lang.Integer> retainInterval)
        Parameters:
        retainInterval - Specifies how long the policy should retain snapshots or AMIs before deleting them. valid values range from `2` to `14`. Default value is `7`.
        Returns:
        builder
      • retainInterval

        public LifecyclePolicyPolicyDetailsArgs.Builder retainInterval​(java.lang.Integer retainInterval)
        Parameters:
        retainInterval - Specifies how long the policy should retain snapshots or AMIs before deleting them. valid values range from `2` to `14`. Default value is `7`.
        Returns:
        builder
      • targetTags

        public LifecyclePolicyPolicyDetailsArgs.Builder targetTags​(@Nullable
                                                                   com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> targetTags)
        Parameters:
        targetTags - A map of tag keys and their values. Any resources that match the `resourceTypes` and are tagged with _any_ of these tags will be targeted. Required when `policyType` is `EBS_SNAPSHOT_MANAGEMENT` or `IMAGE_MANAGEMENT`. Must not be specified when `policyType` is `EVENT_BASED_POLICY`. > Note: You cannot have overlapping lifecycle policies that share the same `targetTags`. Pulumi is unable to detect this at plan time but it will fail during apply.
        Returns:
        builder
      • targetTags

        public LifecyclePolicyPolicyDetailsArgs.Builder targetTags​(java.util.Map<java.lang.String,​java.lang.String> targetTags)
        Parameters:
        targetTags - A map of tag keys and their values. Any resources that match the `resourceTypes` and are tagged with _any_ of these tags will be targeted. Required when `policyType` is `EBS_SNAPSHOT_MANAGEMENT` or `IMAGE_MANAGEMENT`. Must not be specified when `policyType` is `EVENT_BASED_POLICY`. > Note: You cannot have overlapping lifecycle policies that share the same `targetTags`. Pulumi is unable to detect this at plan time but it will fail during apply.
        Returns:
        builder