1. Packages
  2. Avi Provider
  3. API Docs
  4. getRetentionpolicy
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

avi.getRetentionpolicy

Explore with Pulumi AI

avi logo
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

    <!–

    Copyright 2021 VMware, Inc.
    SPDX-License-Identifier: Mozilla Public License 2.0
    

    –>

    layout: “avi”

    page_title: “AVI: avi.Retentionpolicy” sidebar_current: “docs-avi-datasource-retentionpolicy” description: |- Get information of Avi RetentionPolicy.

    avi.Retentionpolicy

    This data source is used to to get avi.Retentionpolicy objects.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as avi from "@pulumi/avi";
    
    const fooRetentionpolicy = avi.getRetentionpolicy({
        name: "foo",
        uuid: "retentionpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
    });
    
    import pulumi
    import pulumi_avi as avi
    
    foo_retentionpolicy = avi.get_retentionpolicy(name="foo",
        uuid="retentionpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/avi/v31/avi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := avi.LookupRetentionpolicy(ctx, &avi.LookupRetentionpolicyArgs{
    			Name: pulumi.StringRef("foo"),
    			Uuid: pulumi.StringRef("retentionpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Avi = Pulumi.Avi;
    
    return await Deployment.RunAsync(() => 
    {
        var fooRetentionpolicy = Avi.GetRetentionpolicy.Invoke(new()
        {
            Name = "foo",
            Uuid = "retentionpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.avi.AviFunctions;
    import com.pulumi.avi.inputs.GetRetentionpolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var fooRetentionpolicy = AviFunctions.getRetentionpolicy(GetRetentionpolicyArgs.builder()
                .name("foo")
                .uuid("retentionpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
                .build());
    
        }
    }
    
    variables:
      fooRetentionpolicy:
        fn::invoke:
          function: avi:getRetentionpolicy
          arguments:
            name: foo
            uuid: retentionpolicy-f9cf6b3e-a411-436f-95e2-2982ba2b217b
    

    Using getRetentionpolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getRetentionpolicy(args: GetRetentionpolicyArgs, opts?: InvokeOptions): Promise<GetRetentionpolicyResult>
    function getRetentionpolicyOutput(args: GetRetentionpolicyOutputArgs, opts?: InvokeOptions): Output<GetRetentionpolicyResult>
    def get_retentionpolicy(id: Optional[str] = None,
                            name: Optional[str] = None,
                            tenant_ref: Optional[str] = None,
                            uuid: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetRetentionpolicyResult
    def get_retentionpolicy_output(id: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            tenant_ref: Optional[pulumi.Input[str]] = None,
                            uuid: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetRetentionpolicyResult]
    func LookupRetentionpolicy(ctx *Context, args *LookupRetentionpolicyArgs, opts ...InvokeOption) (*LookupRetentionpolicyResult, error)
    func LookupRetentionpolicyOutput(ctx *Context, args *LookupRetentionpolicyOutputArgs, opts ...InvokeOption) LookupRetentionpolicyResultOutput

    > Note: This function is named LookupRetentionpolicy in the Go SDK.

    public static class GetRetentionpolicy 
    {
        public static Task<GetRetentionpolicyResult> InvokeAsync(GetRetentionpolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetRetentionpolicyResult> Invoke(GetRetentionpolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRetentionpolicyResult> getRetentionpolicy(GetRetentionpolicyArgs args, InvokeOptions options)
    public static Output<GetRetentionpolicyResult> getRetentionpolicy(GetRetentionpolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: avi:index/getRetentionpolicy:getRetentionpolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Name string
    Search RetentionPolicy by name.
    TenantRef string
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Uuid string
    Search RetentionPolicy by uuid.
    Id string
    Name string
    Search RetentionPolicy by name.
    TenantRef string
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Uuid string
    Search RetentionPolicy by uuid.
    id String
    name String
    Search RetentionPolicy by name.
    tenantRef String
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    uuid String
    Search RetentionPolicy by uuid.
    id string
    name string
    Search RetentionPolicy by name.
    tenantRef string
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    uuid string
    Search RetentionPolicy by uuid.
    id str
    name str
    Search RetentionPolicy by name.
    tenant_ref str
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    uuid str
    Search RetentionPolicy by uuid.
    id String
    name String
    Search RetentionPolicy by name.
    tenantRef String
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    uuid String
    Search RetentionPolicy by uuid.

    getRetentionpolicy Result

    The following output properties are available:

    Enabled string
    Enables the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Histories List<GetRetentionpolicyHistory>
    History of previous runs. Field introduced in 31.1.1. Maximum of 10 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Id string
    Name string
    Name of the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Policies List<GetRetentionpolicyPolicy>
    Policy specification. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Summaries List<GetRetentionpolicySummary>
    Details of most recent run. Field introduced in 31.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    TenantRef string
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Uuid string
    Uuid identifier for the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Enabled string
    Enables the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Histories []GetRetentionpolicyHistory
    History of previous runs. Field introduced in 31.1.1. Maximum of 10 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Id string
    Name string
    Name of the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Policies []GetRetentionpolicyPolicy
    Policy specification. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Summaries []GetRetentionpolicySummary
    Details of most recent run. Field introduced in 31.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    TenantRef string
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    Uuid string
    Uuid identifier for the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    enabled String
    Enables the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    histories List<GetRetentionpolicyHistory>
    History of previous runs. Field introduced in 31.1.1. Maximum of 10 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id String
    name String
    Name of the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    policies List<GetRetentionpolicyPolicy>
    Policy specification. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    summaries List<GetRetentionpolicySummary>
    Details of most recent run. Field introduced in 31.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenantRef String
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    uuid String
    Uuid identifier for the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    enabled string
    Enables the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    histories GetRetentionpolicyHistory[]
    History of previous runs. Field introduced in 31.1.1. Maximum of 10 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id string
    name string
    Name of the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    policies GetRetentionpolicyPolicy[]
    Policy specification. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    summaries GetRetentionpolicySummary[]
    Details of most recent run. Field introduced in 31.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenantRef string
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    uuid string
    Uuid identifier for the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    enabled str
    Enables the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    histories Sequence[GetRetentionpolicyHistory]
    History of previous runs. Field introduced in 31.1.1. Maximum of 10 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id str
    name str
    Name of the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    policies Sequence[GetRetentionpolicyPolicy]
    Policy specification. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    summaries Sequence[GetRetentionpolicySummary]
    Details of most recent run. Field introduced in 31.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenant_ref str
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    uuid str
    Uuid identifier for the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    enabled String
    Enables the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    histories List<Property Map>
    History of previous runs. Field introduced in 31.1.1. Maximum of 10 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id String
    name String
    Name of the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    policies List<Property Map>
    Policy specification. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    summaries List<Property Map>
    Details of most recent run. Field introduced in 31.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenantRef String
    Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    uuid String
    Uuid identifier for the policy. Field introduced in 31.1.1. Allowed with any value in enterprise, enterprise with cloud services edition.

    Supporting Types

    GetRetentionpolicyHistory

    Duration string
    EndTime string
    Messages List<string>
    StartTime string
    Status string
    Duration string
    EndTime string
    Messages []string
    StartTime string
    Status string
    duration String
    endTime String
    messages List<String>
    startTime String
    status String
    duration string
    endTime string
    messages string[]
    startTime string
    status string
    duration str
    end_time str
    messages Sequence[str]
    start_time str
    status str
    duration String
    endTime String
    messages List<String>
    startTime String
    status String

    GetRetentionpolicyPolicy

    GetRetentionpolicyPolicyDisk

    GetRetentionpolicyPolicyDiskAction

    GetRetentionpolicyPolicyDiskActionArg

    Name string
    Search RetentionPolicy by name.
    Value string
    Name string
    Search RetentionPolicy by name.
    Value string
    name String
    Search RetentionPolicy by name.
    value String
    name string
    Search RetentionPolicy by name.
    value string
    name str
    Search RetentionPolicy by name.
    value str
    name String
    Search RetentionPolicy by name.
    value String

    GetRetentionpolicyPolicyObject

    GetRetentionpolicyPolicyObjectAction

    GetRetentionpolicyPolicyObjectActionArg

    Name string
    Search RetentionPolicy by name.
    Value string
    Name string
    Search RetentionPolicy by name.
    Value string
    name String
    Search RetentionPolicy by name.
    value String
    name string
    Search RetentionPolicy by name.
    value string
    name str
    Search RetentionPolicy by name.
    value str
    name String
    Search RetentionPolicy by name.
    value String

    GetRetentionpolicyPolicyPeriodic

    GetRetentionpolicyPolicyPeriodicAction

    GetRetentionpolicyPolicyPeriodicActionArg

    Name string
    Search RetentionPolicy by name.
    Value string
    Name string
    Search RetentionPolicy by name.
    Value string
    name String
    Search RetentionPolicy by name.
    value String
    name string
    Search RetentionPolicy by name.
    value string
    name str
    Search RetentionPolicy by name.
    value str
    name String
    Search RetentionPolicy by name.
    value String

    GetRetentionpolicySummary

    Duration string
    EndTime string
    Messages List<string>
    StartTime string
    Status string
    Duration string
    EndTime string
    Messages []string
    StartTime string
    Status string
    duration String
    endTime String
    messages List<String>
    startTime String
    status String
    duration string
    endTime string
    messages string[]
    startTime string
    status string
    duration str
    end_time str
    messages Sequence[str]
    start_time str
    status str
    duration String
    endTime String
    messages List<String>
    startTime String
    status String

    Package Details

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