1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Kms
  5. getVaultUsage
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Kms.getVaultUsage

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides details about a specific Vault Usage resource in Oracle Cloud Infrastructure Kms service.

Gets the count of keys and key versions in the specified vault to calculate usage against service limits.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testVaultUsage = oci.Kms.getVaultUsage({
    vaultId: testVault.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_vault_usage = oci.Kms.get_vault_usage(vault_id=test_vault["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/kms"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kms.GetVaultUsage(ctx, &kms.GetVaultUsageArgs{
			VaultId: testVault.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testVaultUsage = Oci.Kms.GetVaultUsage.Invoke(new()
    {
        VaultId = testVault.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Kms.KmsFunctions;
import com.pulumi.oci.Kms.inputs.GetVaultUsageArgs;
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 testVaultUsage = KmsFunctions.getVaultUsage(GetVaultUsageArgs.builder()
            .vaultId(testVault.id())
            .build());

    }
}
Copy
variables:
  testVaultUsage:
    fn::invoke:
      function: oci:Kms:getVaultUsage
      arguments:
        vaultId: ${testVault.id}
Copy

Using getVaultUsage

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 getVaultUsage(args: GetVaultUsageArgs, opts?: InvokeOptions): Promise<GetVaultUsageResult>
function getVaultUsageOutput(args: GetVaultUsageOutputArgs, opts?: InvokeOptions): Output<GetVaultUsageResult>
Copy
def get_vault_usage(vault_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetVaultUsageResult
def get_vault_usage_output(vault_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetVaultUsageResult]
Copy
func GetVaultUsage(ctx *Context, args *GetVaultUsageArgs, opts ...InvokeOption) (*GetVaultUsageResult, error)
func GetVaultUsageOutput(ctx *Context, args *GetVaultUsageOutputArgs, opts ...InvokeOption) GetVaultUsageResultOutput
Copy

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

public static class GetVaultUsage 
{
    public static Task<GetVaultUsageResult> InvokeAsync(GetVaultUsageArgs args, InvokeOptions? opts = null)
    public static Output<GetVaultUsageResult> Invoke(GetVaultUsageInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetVaultUsageResult> getVaultUsage(GetVaultUsageArgs args, InvokeOptions options)
public static Output<GetVaultUsageResult> getVaultUsage(GetVaultUsageArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Kms/getVaultUsage:getVaultUsage
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

VaultId This property is required. string
The OCID of the vault.
VaultId This property is required. string
The OCID of the vault.
vaultId This property is required. String
The OCID of the vault.
vaultId This property is required. string
The OCID of the vault.
vault_id This property is required. str
The OCID of the vault.
vaultId This property is required. String
The OCID of the vault.

getVaultUsage Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
KeyCount int
The number of keys in this vault, across all compartments, excluding keys in a DELETED state.
KeyVersionCount int
The number of key versions in this vault, across all compartments, excluding key versions in a DELETED state.
SoftwareKeyCount int
The number of keys in this vault that persist on the server, across all compartments, excluding keys in a DELETED state.
SoftwareKeyVersionCount int
The number of key versions in this vault that persist on the server, across all compartments, excluding key versions in a DELETED state.
VaultId string
Id string
The provider-assigned unique ID for this managed resource.
KeyCount int
The number of keys in this vault, across all compartments, excluding keys in a DELETED state.
KeyVersionCount int
The number of key versions in this vault, across all compartments, excluding key versions in a DELETED state.
SoftwareKeyCount int
The number of keys in this vault that persist on the server, across all compartments, excluding keys in a DELETED state.
SoftwareKeyVersionCount int
The number of key versions in this vault that persist on the server, across all compartments, excluding key versions in a DELETED state.
VaultId string
id String
The provider-assigned unique ID for this managed resource.
keyCount Integer
The number of keys in this vault, across all compartments, excluding keys in a DELETED state.
keyVersionCount Integer
The number of key versions in this vault, across all compartments, excluding key versions in a DELETED state.
softwareKeyCount Integer
The number of keys in this vault that persist on the server, across all compartments, excluding keys in a DELETED state.
softwareKeyVersionCount Integer
The number of key versions in this vault that persist on the server, across all compartments, excluding key versions in a DELETED state.
vaultId String
id string
The provider-assigned unique ID for this managed resource.
keyCount number
The number of keys in this vault, across all compartments, excluding keys in a DELETED state.
keyVersionCount number
The number of key versions in this vault, across all compartments, excluding key versions in a DELETED state.
softwareKeyCount number
The number of keys in this vault that persist on the server, across all compartments, excluding keys in a DELETED state.
softwareKeyVersionCount number
The number of key versions in this vault that persist on the server, across all compartments, excluding key versions in a DELETED state.
vaultId string
id str
The provider-assigned unique ID for this managed resource.
key_count int
The number of keys in this vault, across all compartments, excluding keys in a DELETED state.
key_version_count int
The number of key versions in this vault, across all compartments, excluding key versions in a DELETED state.
software_key_count int
The number of keys in this vault that persist on the server, across all compartments, excluding keys in a DELETED state.
software_key_version_count int
The number of key versions in this vault that persist on the server, across all compartments, excluding key versions in a DELETED state.
vault_id str
id String
The provider-assigned unique ID for this managed resource.
keyCount Number
The number of keys in this vault, across all compartments, excluding keys in a DELETED state.
keyVersionCount Number
The number of key versions in this vault, across all compartments, excluding key versions in a DELETED state.
softwareKeyCount Number
The number of keys in this vault that persist on the server, across all compartments, excluding keys in a DELETED state.
softwareKeyVersionCount Number
The number of key versions in this vault that persist on the server, across all compartments, excluding key versions in a DELETED state.
vaultId String

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi