1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getVolumeBackupPolicyAssignments
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

oci.Core.getVolumeBackupPolicyAssignments

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

    This data source provides the list of Volume Backup Policy Assignments in Oracle Cloud Infrastructure Core service.

    Gets the volume backup policy assignment for the specified volume. The assetId query parameter is required, and the returned list will contain at most one item, since volume can only have one volume backup policy assigned at a time.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testVolumeBackupPolicyAssignments = oci.Core.getVolumeBackupPolicyAssignments({
        assetId: oci_core_volume.test_volume.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_volume_backup_policy_assignments = oci.Core.get_volume_backup_policy_assignments(asset_id=oci_core_volume["test_volume"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.GetVolumeBackupPolicyAssignments(ctx, &core.GetVolumeBackupPolicyAssignmentsArgs{
    			AssetId: oci_core_volume.Test_volume.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testVolumeBackupPolicyAssignments = Oci.Core.GetVolumeBackupPolicyAssignments.Invoke(new()
        {
            AssetId = oci_core_volume.Test_volume.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Core.CoreFunctions;
    import com.pulumi.oci.Core.inputs.GetVolumeBackupPolicyAssignmentsArgs;
    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 testVolumeBackupPolicyAssignments = CoreFunctions.getVolumeBackupPolicyAssignments(GetVolumeBackupPolicyAssignmentsArgs.builder()
                .assetId(oci_core_volume.test_volume().id())
                .build());
    
        }
    }
    
    variables:
      testVolumeBackupPolicyAssignments:
        fn::invoke:
          Function: oci:Core:getVolumeBackupPolicyAssignments
          Arguments:
            assetId: ${oci_core_volume.test_volume.id}
    

    Using getVolumeBackupPolicyAssignments

    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 getVolumeBackupPolicyAssignments(args: GetVolumeBackupPolicyAssignmentsArgs, opts?: InvokeOptions): Promise<GetVolumeBackupPolicyAssignmentsResult>
    function getVolumeBackupPolicyAssignmentsOutput(args: GetVolumeBackupPolicyAssignmentsOutputArgs, opts?: InvokeOptions): Output<GetVolumeBackupPolicyAssignmentsResult>
    def get_volume_backup_policy_assignments(asset_id: Optional[str] = None,
                                             filters: Optional[Sequence[_core.GetVolumeBackupPolicyAssignmentsFilter]] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetVolumeBackupPolicyAssignmentsResult
    def get_volume_backup_policy_assignments_output(asset_id: Optional[pulumi.Input[str]] = None,
                                             filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetVolumeBackupPolicyAssignmentsFilterArgs]]]] = None,
                                             opts: Optional[InvokeOptions] = None) -> Output[GetVolumeBackupPolicyAssignmentsResult]
    func GetVolumeBackupPolicyAssignments(ctx *Context, args *GetVolumeBackupPolicyAssignmentsArgs, opts ...InvokeOption) (*GetVolumeBackupPolicyAssignmentsResult, error)
    func GetVolumeBackupPolicyAssignmentsOutput(ctx *Context, args *GetVolumeBackupPolicyAssignmentsOutputArgs, opts ...InvokeOption) GetVolumeBackupPolicyAssignmentsResultOutput

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

    public static class GetVolumeBackupPolicyAssignments 
    {
        public static Task<GetVolumeBackupPolicyAssignmentsResult> InvokeAsync(GetVolumeBackupPolicyAssignmentsArgs args, InvokeOptions? opts = null)
        public static Output<GetVolumeBackupPolicyAssignmentsResult> Invoke(GetVolumeBackupPolicyAssignmentsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVolumeBackupPolicyAssignmentsResult> getVolumeBackupPolicyAssignments(GetVolumeBackupPolicyAssignmentsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Core/getVolumeBackupPolicyAssignments:getVolumeBackupPolicyAssignments
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AssetId string
    The OCID of an asset (e.g. a volume).
    Filters List<GetVolumeBackupPolicyAssignmentsFilter>
    AssetId string
    The OCID of an asset (e.g. a volume).
    Filters []GetVolumeBackupPolicyAssignmentsFilter
    assetId String
    The OCID of an asset (e.g. a volume).
    filters List<GetVolumeBackupPolicyAssignmentsFilter>
    assetId string
    The OCID of an asset (e.g. a volume).
    filters GetVolumeBackupPolicyAssignmentsFilter[]
    asset_id str
    The OCID of an asset (e.g. a volume).
    filters GetVolumeBackupPolicyAssignmentsFilter]
    assetId String
    The OCID of an asset (e.g. a volume).
    filters List<Property Map>

    getVolumeBackupPolicyAssignments Result

    The following output properties are available:

    AssetId string
    The OCID of the volume the policy has been assigned to.
    Id string
    The provider-assigned unique ID for this managed resource.
    VolumeBackupPolicyAssignments List<GetVolumeBackupPolicyAssignmentsVolumeBackupPolicyAssignment>
    The list of volume_backup_policy_assignments.
    Filters List<GetVolumeBackupPolicyAssignmentsFilter>
    AssetId string
    The OCID of the volume the policy has been assigned to.
    Id string
    The provider-assigned unique ID for this managed resource.
    VolumeBackupPolicyAssignments []GetVolumeBackupPolicyAssignmentsVolumeBackupPolicyAssignment
    The list of volume_backup_policy_assignments.
    Filters []GetVolumeBackupPolicyAssignmentsFilter
    assetId String
    The OCID of the volume the policy has been assigned to.
    id String
    The provider-assigned unique ID for this managed resource.
    volumeBackupPolicyAssignments List<GetVolumeBackupPolicyAssignmentsVolumeBackupPolicyAssignment>
    The list of volume_backup_policy_assignments.
    filters List<GetVolumeBackupPolicyAssignmentsFilter>
    assetId string
    The OCID of the volume the policy has been assigned to.
    id string
    The provider-assigned unique ID for this managed resource.
    volumeBackupPolicyAssignments GetVolumeBackupPolicyAssignmentsVolumeBackupPolicyAssignment[]
    The list of volume_backup_policy_assignments.
    filters GetVolumeBackupPolicyAssignmentsFilter[]
    asset_id str
    The OCID of the volume the policy has been assigned to.
    id str
    The provider-assigned unique ID for this managed resource.
    volume_backup_policy_assignments GetVolumeBackupPolicyAssignmentsVolumeBackupPolicyAssignment]
    The list of volume_backup_policy_assignments.
    filters GetVolumeBackupPolicyAssignmentsFilter]
    assetId String
    The OCID of the volume the policy has been assigned to.
    id String
    The provider-assigned unique ID for this managed resource.
    volumeBackupPolicyAssignments List<Property Map>
    The list of volume_backup_policy_assignments.
    filters List<Property Map>

    Supporting Types

    GetVolumeBackupPolicyAssignmentsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetVolumeBackupPolicyAssignmentsVolumeBackupPolicyAssignment

    AssetId string
    The OCID of an asset (e.g. a volume).
    Id string
    The OCID of the volume backup policy assignment.
    PolicyId string
    The OCID of the volume backup policy that has been assigned to the volume.
    TimeCreated string
    The date and time the volume backup policy was assigned to the volume. The format is defined by RFC3339.
    AssetId string
    The OCID of an asset (e.g. a volume).
    Id string
    The OCID of the volume backup policy assignment.
    PolicyId string
    The OCID of the volume backup policy that has been assigned to the volume.
    TimeCreated string
    The date and time the volume backup policy was assigned to the volume. The format is defined by RFC3339.
    assetId String
    The OCID of an asset (e.g. a volume).
    id String
    The OCID of the volume backup policy assignment.
    policyId String
    The OCID of the volume backup policy that has been assigned to the volume.
    timeCreated String
    The date and time the volume backup policy was assigned to the volume. The format is defined by RFC3339.
    assetId string
    The OCID of an asset (e.g. a volume).
    id string
    The OCID of the volume backup policy assignment.
    policyId string
    The OCID of the volume backup policy that has been assigned to the volume.
    timeCreated string
    The date and time the volume backup policy was assigned to the volume. The format is defined by RFC3339.
    asset_id str
    The OCID of an asset (e.g. a volume).
    id str
    The OCID of the volume backup policy assignment.
    policy_id str
    The OCID of the volume backup policy that has been assigned to the volume.
    time_created str
    The date and time the volume backup policy was assigned to the volume. The format is defined by RFC3339.
    assetId String
    The OCID of an asset (e.g. a volume).
    id String
    The OCID of the volume backup policy assignment.
    policyId String
    The OCID of the volume backup policy that has been assigned to the volume.
    timeCreated String
    The date and time the volume backup policy was assigned to the volume. The format is defined by RFC3339.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi