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[_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:
- Asset
Id string - The OCID of an asset (e.g. a volume).
- Filters
List<Get
Volume Backup Policy Assignments Filter>
- Asset
Id string - The OCID of an asset (e.g. a volume).
- Filters
[]Get
Volume Backup Policy Assignments Filter
- asset
Id String - The OCID of an asset (e.g. a volume).
- filters
List<Get
Volume Backup Policy Assignments Filter>
- asset
Id string - The OCID of an asset (e.g. a volume).
- filters
Get
Volume Backup Policy Assignments Filter[]
- asset_
id str - The OCID of an asset (e.g. a volume).
- filters
Sequence[core.
Get Volume Backup Policy Assignments Filter]
- asset
Id String - The OCID of an asset (e.g. a volume).
- filters List<Property Map>
getVolumeBackupPolicyAssignments Result
The following output properties are available:
- Asset
Id string - The OCID of the volume the policy has been assigned to.
- Id string
- The provider-assigned unique ID for this managed resource.
- Volume
Backup List<GetPolicy Assignments Volume Backup Policy Assignments Volume Backup Policy Assignment> - The list of volume_backup_policy_assignments.
- Filters
List<Get
Volume Backup Policy Assignments Filter>
- Asset
Id string - The OCID of the volume the policy has been assigned to.
- Id string
- The provider-assigned unique ID for this managed resource.
- Volume
Backup []GetPolicy Assignments Volume Backup Policy Assignments Volume Backup Policy Assignment - The list of volume_backup_policy_assignments.
- Filters
[]Get
Volume Backup Policy Assignments Filter
- asset
Id String - The OCID of the volume the policy has been assigned to.
- id String
- The provider-assigned unique ID for this managed resource.
- volume
Backup List<GetPolicy Assignments Volume Backup Policy Assignments Volume Backup Policy Assignment> - The list of volume_backup_policy_assignments.
- filters
List<Get
Volume Backup Policy Assignments Filter>
- asset
Id string - The OCID of the volume the policy has been assigned to.
- id string
- The provider-assigned unique ID for this managed resource.
- volume
Backup GetPolicy Assignments Volume Backup Policy Assignments Volume Backup Policy Assignment[] - The list of volume_backup_policy_assignments.
- filters
Get
Volume 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[core.policy_ assignments Get Volume Backup Policy Assignments Volume Backup Policy Assignment] - The list of volume_backup_policy_assignments.
- filters
Sequence[core.
Get Volume Backup Policy Assignments Filter]
- asset
Id String - The OCID of the volume the policy has been assigned to.
- id String
- The provider-assigned unique ID for this managed resource.
- volume
Backup List<Property Map>Policy Assignments - The list of volume_backup_policy_assignments.
- filters List<Property Map>
Supporting Types
GetVolumeBackupPolicyAssignmentsFilter
GetVolumeBackupPolicyAssignmentsVolumeBackupPolicyAssignment
- Asset
Id string - The OCID of an asset (e.g. a volume).
- Id string
- The OCID of the volume backup policy assignment.
- Policy
Id string - The OCID of the volume backup policy that has been assigned to the volume.
- Time
Created string - The date and time the volume backup policy was assigned to the volume. The format is defined by RFC3339.
- Asset
Id string - The OCID of an asset (e.g. a volume).
- Id string
- The OCID of the volume backup policy assignment.
- Policy
Id string - The OCID of the volume backup policy that has been assigned to the volume.
- Time
Created string - The date and time the volume backup policy was assigned to the volume. The format is defined by RFC3339.
- asset
Id String - The OCID of an asset (e.g. a volume).
- id String
- The OCID of the volume backup policy assignment.
- policy
Id String - The OCID of the volume backup policy that has been assigned to the volume.
- time
Created String - The date and time the volume backup policy was assigned to the volume. The format is defined by RFC3339.
- asset
Id string - The OCID of an asset (e.g. a volume).
- id string
- The OCID of the volume backup policy assignment.
- policy
Id string - The OCID of the volume backup policy that has been assigned to the volume.
- time
Created 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.
- asset
Id String - The OCID of an asset (e.g. a volume).
- id String
- The OCID of the volume backup policy assignment.
- policy
Id String - The OCID of the volume backup policy that has been assigned to the volume.
- time
Created 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.