oci.Core.getVolumeBackupPolicyAssignments
Explore with Pulumi AI
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: testVolume.id,
});
import pulumi
import pulumi_oci as oci
test_volume_backup_policy_assignments = oci.Core.get_volume_backup_policy_assignments(asset_id=test_volume["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/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: testVolume.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 = testVolume.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(testVolume.id())
            .build());
    }
}
variables:
  testVolumeBackupPolicyAssignments:
    fn::invoke:
      function: oci:Core:getVolumeBackupPolicyAssignments
      arguments:
        assetId: ${testVolume.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[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[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)
public static Output<GetVolumeBackupPolicyAssignmentsResult> getVolumeBackupPolicyAssignments(GetVolumeBackupPolicyAssignmentsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Core/getVolumeBackupPolicyAssignments:getVolumeBackupPolicyAssignments
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AssetId string
- The OCID of an asset (e.g. a volume).
- Filters
List<GetVolume Backup Policy Assignments Filter> 
- AssetId string
- The OCID of an asset (e.g. a volume).
- Filters
[]GetVolume Backup Policy Assignments Filter 
- assetId String
- The OCID of an asset (e.g. a volume).
- filters
List<GetVolume Backup Policy Assignments Filter> 
- assetId string
- The OCID of an asset (e.g. a volume).
- filters
GetVolume Backup Policy Assignments Filter[] 
- asset_id str
- The OCID of an asset (e.g. a volume).
- filters
Sequence[GetVolume Backup Policy Assignments Filter] 
- 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.
- VolumeBackup List<GetPolicy Assignments Volume Backup Policy Assignments Volume Backup Policy Assignment> 
- The list of volume_backup_policy_assignments.
- Filters
List<GetVolume Backup Policy Assignments Filter> 
- AssetId string
- The OCID of the volume the policy has been assigned to.
- Id string
- The provider-assigned unique ID for this managed resource.
- VolumeBackup []GetPolicy Assignments Volume Backup Policy Assignments Volume Backup Policy Assignment 
- The list of volume_backup_policy_assignments.
- Filters
[]GetVolume Backup Policy Assignments Filter 
- assetId String
- The OCID of the volume the policy has been assigned to.
- id String
- The provider-assigned unique ID for this managed resource.
- volumeBackup List<GetPolicy Assignments Volume Backup Policy Assignments Volume Backup Policy Assignment> 
- The list of volume_backup_policy_assignments.
- filters
List<GetVolume Backup Policy Assignments Filter> 
- assetId string
- The OCID of the volume the policy has been assigned to.
- id string
- The provider-assigned unique ID for this managed resource.
- volumeBackup GetPolicy Assignments Volume Backup Policy Assignments Volume Backup Policy Assignment[] 
- The list of volume_backup_policy_assignments.
- filters
GetVolume Backup Policy Assignments Filter[] 
- 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_ Sequence[Getpolicy_ assignments Volume Backup Policy Assignments Volume Backup Policy Assignment] 
- The list of volume_backup_policy_assignments.
- filters
Sequence[GetVolume Backup Policy Assignments Filter] 
- assetId String
- The OCID of the volume the policy has been assigned to.
- id String
- The provider-assigned unique ID for this managed resource.
- volumeBackup List<Property Map>Policy Assignments 
- The list of volume_backup_policy_assignments.
- filters List<Property Map>
Supporting Types
GetVolumeBackupPolicyAssignmentsFilter     
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.
- XrcKms stringKey Id 
- The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. For more information about the Vault service and encryption keys, see Overview of Vault service and Using Keys.
- 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.
- XrcKms stringKey Id 
- The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. For more information about the Vault service and encryption keys, see Overview of Vault service and Using Keys.
- 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.
- xrcKms StringKey Id 
- The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. For more information about the Vault service and encryption keys, see Overview of Vault service and Using Keys.
- 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.
- xrcKms stringKey Id 
- The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. For more information about the Vault service and encryption keys, see Overview of Vault service and Using Keys.
- 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.
- xrc_kms_ strkey_ id 
- The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. For more information about the Vault service and encryption keys, see Overview of Vault service and Using Keys.
- 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.
- xrcKms StringKey Id 
- The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. For more information about the Vault service and encryption keys, see Overview of Vault service and Using Keys.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.