1. Packages
  2. Powerstore Provider
  3. API Docs
  4. Protectionpolicy
powerstore 1.2.0 published on Monday, Apr 14, 2025 by dell

powerstore.Protectionpolicy

Explore with Pulumi AI

powerstore logo
powerstore 1.2.0 published on Monday, Apr 14, 2025 by dell

    Import

    #Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.

    #Licensed under the Mozilla Public License Version 2.0 (the “License”);

    #you may not use this file except in compliance with the License.

    #You may obtain a copy of the License at

    http://mozilla.org/MPL/2.0/

    #Unless required by applicable law or agreed to in writing, software

    #distributed under the License is distributed on an “AS IS” BASIS,

    #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

    #See the License for the specific language governing permissions and

    #limitations under the License.

    Below are the steps to import protection policy :

    Step 1 - To import a protection policy , we need the id of that protection policy

    Step 2 - To check the id of the protection policy we can make Get request to protection policy endpoint. eg. https://10.0.0.1/api/rest/policy which will return list of all protection policy ids.

    Step 3 - Add empty resource block in tf file.

    eg.

    resource “powerstore_protectionpolicy” “resource_block_name” {

    (resource arguments)

    }

    $ pulumi import powerstore:index/protectionpolicy:Protectionpolicy Step 4 - Execute the command: "powerstore_protectionpolicy.resource_block_name" "id_of_the_protection_policy" (resource_block_name must be taken from step 3 and id must be taken from step 2)
    

    Step 5 - After successful execution of the command , check the state file

    Create Protectionpolicy Resource

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

    Constructor syntax

    new Protectionpolicy(name: string, args?: ProtectionpolicyArgs, opts?: CustomResourceOptions);
    @overload
    def Protectionpolicy(resource_name: str,
                         args: Optional[ProtectionpolicyArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def Protectionpolicy(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         description: Optional[str] = None,
                         name: Optional[str] = None,
                         replication_rule_ids: Optional[Sequence[str]] = None,
                         replication_rule_names: Optional[Sequence[str]] = None,
                         snapshot_rule_ids: Optional[Sequence[str]] = None,
                         snapshot_rule_names: Optional[Sequence[str]] = None)
    func NewProtectionpolicy(ctx *Context, name string, args *ProtectionpolicyArgs, opts ...ResourceOption) (*Protectionpolicy, error)
    public Protectionpolicy(string name, ProtectionpolicyArgs? args = null, CustomResourceOptions? opts = null)
    public Protectionpolicy(String name, ProtectionpolicyArgs args)
    public Protectionpolicy(String name, ProtectionpolicyArgs args, CustomResourceOptions options)
    
    type: powerstore:Protectionpolicy
    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 ProtectionpolicyArgs
    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 ProtectionpolicyArgs
    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 ProtectionpolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProtectionpolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProtectionpolicyArgs
    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 protectionpolicyResource = new Powerstore.Protectionpolicy("protectionpolicyResource", new()
    {
        Description = "string",
        Name = "string",
        ReplicationRuleIds = new[]
        {
            "string",
        },
        ReplicationRuleNames = new[]
        {
            "string",
        },
        SnapshotRuleIds = new[]
        {
            "string",
        },
        SnapshotRuleNames = new[]
        {
            "string",
        },
    });
    
    example, err := powerstore.NewProtectionpolicy(ctx, "protectionpolicyResource", &powerstore.ProtectionpolicyArgs{
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	ReplicationRuleIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ReplicationRuleNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SnapshotRuleIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SnapshotRuleNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var protectionpolicyResource = new Protectionpolicy("protectionpolicyResource", ProtectionpolicyArgs.builder()
        .description("string")
        .name("string")
        .replicationRuleIds("string")
        .replicationRuleNames("string")
        .snapshotRuleIds("string")
        .snapshotRuleNames("string")
        .build());
    
    protectionpolicy_resource = powerstore.Protectionpolicy("protectionpolicyResource",
        description="string",
        name="string",
        replication_rule_ids=["string"],
        replication_rule_names=["string"],
        snapshot_rule_ids=["string"],
        snapshot_rule_names=["string"])
    
    const protectionpolicyResource = new powerstore.Protectionpolicy("protectionpolicyResource", {
        description: "string",
        name: "string",
        replicationRuleIds: ["string"],
        replicationRuleNames: ["string"],
        snapshotRuleIds: ["string"],
        snapshotRuleNames: ["string"],
    });
    
    type: powerstore:Protectionpolicy
    properties:
        description: string
        name: string
        replicationRuleIds:
            - string
        replicationRuleNames:
            - string
        snapshotRuleIds:
            - string
        snapshotRuleNames:
            - string
    

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

    Description string
    The description of the protection policy.
    Name string
    The name of the protection policy.
    ReplicationRuleIds List<string>
    List of the replication rule IDs that are associated with this policy.
    ReplicationRuleNames List<string>
    List of the replication rule names that are associated with this policy.
    SnapshotRuleIds List<string>
    List of the snapshot rule IDs that are associated with this policy.
    SnapshotRuleNames List<string>
    List of the snapshot rule names that are associated with this policy.
    Description string
    The description of the protection policy.
    Name string
    The name of the protection policy.
    ReplicationRuleIds []string
    List of the replication rule IDs that are associated with this policy.
    ReplicationRuleNames []string
    List of the replication rule names that are associated with this policy.
    SnapshotRuleIds []string
    List of the snapshot rule IDs that are associated with this policy.
    SnapshotRuleNames []string
    List of the snapshot rule names that are associated with this policy.
    description String
    The description of the protection policy.
    name String
    The name of the protection policy.
    replicationRuleIds List<String>
    List of the replication rule IDs that are associated with this policy.
    replicationRuleNames List<String>
    List of the replication rule names that are associated with this policy.
    snapshotRuleIds List<String>
    List of the snapshot rule IDs that are associated with this policy.
    snapshotRuleNames List<String>
    List of the snapshot rule names that are associated with this policy.
    description string
    The description of the protection policy.
    name string
    The name of the protection policy.
    replicationRuleIds string[]
    List of the replication rule IDs that are associated with this policy.
    replicationRuleNames string[]
    List of the replication rule names that are associated with this policy.
    snapshotRuleIds string[]
    List of the snapshot rule IDs that are associated with this policy.
    snapshotRuleNames string[]
    List of the snapshot rule names that are associated with this policy.
    description str
    The description of the protection policy.
    name str
    The name of the protection policy.
    replication_rule_ids Sequence[str]
    List of the replication rule IDs that are associated with this policy.
    replication_rule_names Sequence[str]
    List of the replication rule names that are associated with this policy.
    snapshot_rule_ids Sequence[str]
    List of the snapshot rule IDs that are associated with this policy.
    snapshot_rule_names Sequence[str]
    List of the snapshot rule names that are associated with this policy.
    description String
    The description of the protection policy.
    name String
    The name of the protection policy.
    replicationRuleIds List<String>
    List of the replication rule IDs that are associated with this policy.
    replicationRuleNames List<String>
    List of the replication rule names that are associated with this policy.
    snapshotRuleIds List<String>
    List of the snapshot rule IDs that are associated with this policy.
    snapshotRuleNames List<String>
    List of the snapshot rule names that are associated with this policy.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Protectionpolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    IsReadOnly bool
    Indicates whether this policy can be modified.
    Type string
    The type of the protection policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsReadOnly bool
    Indicates whether this policy can be modified.
    Type string
    The type of the protection policy.
    id String
    The provider-assigned unique ID for this managed resource.
    isReadOnly Boolean
    Indicates whether this policy can be modified.
    type String
    The type of the protection policy.
    id string
    The provider-assigned unique ID for this managed resource.
    isReadOnly boolean
    Indicates whether this policy can be modified.
    type string
    The type of the protection policy.
    id str
    The provider-assigned unique ID for this managed resource.
    is_read_only bool
    Indicates whether this policy can be modified.
    type str
    The type of the protection policy.
    id String
    The provider-assigned unique ID for this managed resource.
    isReadOnly Boolean
    Indicates whether this policy can be modified.
    type String
    The type of the protection policy.

    Look up Existing Protectionpolicy Resource

    Get an existing Protectionpolicy 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?: ProtectionpolicyState, opts?: CustomResourceOptions): Protectionpolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            is_read_only: Optional[bool] = None,
            name: Optional[str] = None,
            replication_rule_ids: Optional[Sequence[str]] = None,
            replication_rule_names: Optional[Sequence[str]] = None,
            snapshot_rule_ids: Optional[Sequence[str]] = None,
            snapshot_rule_names: Optional[Sequence[str]] = None,
            type: Optional[str] = None) -> Protectionpolicy
    func GetProtectionpolicy(ctx *Context, name string, id IDInput, state *ProtectionpolicyState, opts ...ResourceOption) (*Protectionpolicy, error)
    public static Protectionpolicy Get(string name, Input<string> id, ProtectionpolicyState? state, CustomResourceOptions? opts = null)
    public static Protectionpolicy get(String name, Output<String> id, ProtectionpolicyState state, CustomResourceOptions options)
    resources:  _:    type: powerstore:Protectionpolicy    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:
    Description string
    The description of the protection policy.
    IsReadOnly bool
    Indicates whether this policy can be modified.
    Name string
    The name of the protection policy.
    ReplicationRuleIds List<string>
    List of the replication rule IDs that are associated with this policy.
    ReplicationRuleNames List<string>
    List of the replication rule names that are associated with this policy.
    SnapshotRuleIds List<string>
    List of the snapshot rule IDs that are associated with this policy.
    SnapshotRuleNames List<string>
    List of the snapshot rule names that are associated with this policy.
    Type string
    The type of the protection policy.
    Description string
    The description of the protection policy.
    IsReadOnly bool
    Indicates whether this policy can be modified.
    Name string
    The name of the protection policy.
    ReplicationRuleIds []string
    List of the replication rule IDs that are associated with this policy.
    ReplicationRuleNames []string
    List of the replication rule names that are associated with this policy.
    SnapshotRuleIds []string
    List of the snapshot rule IDs that are associated with this policy.
    SnapshotRuleNames []string
    List of the snapshot rule names that are associated with this policy.
    Type string
    The type of the protection policy.
    description String
    The description of the protection policy.
    isReadOnly Boolean
    Indicates whether this policy can be modified.
    name String
    The name of the protection policy.
    replicationRuleIds List<String>
    List of the replication rule IDs that are associated with this policy.
    replicationRuleNames List<String>
    List of the replication rule names that are associated with this policy.
    snapshotRuleIds List<String>
    List of the snapshot rule IDs that are associated with this policy.
    snapshotRuleNames List<String>
    List of the snapshot rule names that are associated with this policy.
    type String
    The type of the protection policy.
    description string
    The description of the protection policy.
    isReadOnly boolean
    Indicates whether this policy can be modified.
    name string
    The name of the protection policy.
    replicationRuleIds string[]
    List of the replication rule IDs that are associated with this policy.
    replicationRuleNames string[]
    List of the replication rule names that are associated with this policy.
    snapshotRuleIds string[]
    List of the snapshot rule IDs that are associated with this policy.
    snapshotRuleNames string[]
    List of the snapshot rule names that are associated with this policy.
    type string
    The type of the protection policy.
    description str
    The description of the protection policy.
    is_read_only bool
    Indicates whether this policy can be modified.
    name str
    The name of the protection policy.
    replication_rule_ids Sequence[str]
    List of the replication rule IDs that are associated with this policy.
    replication_rule_names Sequence[str]
    List of the replication rule names that are associated with this policy.
    snapshot_rule_ids Sequence[str]
    List of the snapshot rule IDs that are associated with this policy.
    snapshot_rule_names Sequence[str]
    List of the snapshot rule names that are associated with this policy.
    type str
    The type of the protection policy.
    description String
    The description of the protection policy.
    isReadOnly Boolean
    Indicates whether this policy can be modified.
    name String
    The name of the protection policy.
    replicationRuleIds List<String>
    List of the replication rule IDs that are associated with this policy.
    replicationRuleNames List<String>
    List of the replication rule names that are associated with this policy.
    snapshotRuleIds List<String>
    List of the snapshot rule IDs that are associated with this policy.
    snapshotRuleNames List<String>
    List of the snapshot rule names that are associated with this policy.
    type String
    The type of the protection policy.

    Package Details

    Repository
    powerstore dell/terraform-provider-powerstore
    License
    Notes
    This Pulumi package is based on the powerstore Terraform Provider.
    powerstore logo
    powerstore 1.2.0 published on Monday, Apr 14, 2025 by dell