Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.Kms.getVaultUsage
Explore with Pulumi AI
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,
});
import pulumi
import pulumi_oci as oci
test_vault_usage = oci.Kms.get_vault_usage(vault_id=test_vault["id"])
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
})
}
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,
});
});
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());
}
}
variables:
testVaultUsage:
fn::invoke:
Function: oci:Kms:getVaultUsage
Arguments:
vaultId: ${testVault.id}
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>
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]
func GetVaultUsage(ctx *Context, args *GetVaultUsageArgs, opts ...InvokeOption) (*GetVaultUsageResult, error)
func GetVaultUsageOutput(ctx *Context, args *GetVaultUsageOutputArgs, opts ...InvokeOption) GetVaultUsageResultOutput
> 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)
}
public static CompletableFuture<GetVaultUsageResult> getVaultUsage(GetVaultUsageArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Kms/getVaultUsage:getVaultUsage
arguments:
# arguments dictionary
The following arguments are supported:
- Vault
Id string - The OCID of the vault.
- Vault
Id string - The OCID of the vault.
- vault
Id String - The OCID of the vault.
- vault
Id string - The OCID of the vault.
- vault_
id str - The OCID of the vault.
- vault
Id 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.
- Key
Count int - The number of keys in this vault, across all compartments, excluding keys in a
DELETED
state. - Key
Version intCount - The number of key versions in this vault, across all compartments, excluding key versions in a
DELETED
state. - Software
Key intCount - The number of keys in this vault that persist on the server, across all compartments, excluding keys in a
DELETED
state. - Software
Key intVersion Count - 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 string
- Id string
- 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 intCount - The number of key versions in this vault, across all compartments, excluding key versions in a
DELETED
state. - Software
Key intCount - The number of keys in this vault that persist on the server, across all compartments, excluding keys in a
DELETED
state. - Software
Key intVersion Count - 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 string
- id String
- The provider-assigned unique ID for this managed resource.
- key
Count Integer - The number of keys in this vault, across all compartments, excluding keys in a
DELETED
state. - key
Version IntegerCount - The number of key versions in this vault, across all compartments, excluding key versions in a
DELETED
state. - software
Key IntegerCount - The number of keys in this vault that persist on the server, across all compartments, excluding keys in a
DELETED
state. - software
Key IntegerVersion Count - 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 String
- id string
- The provider-assigned unique ID for this managed resource.
- key
Count number - The number of keys in this vault, across all compartments, excluding keys in a
DELETED
state. - key
Version numberCount - The number of key versions in this vault, across all compartments, excluding key versions in a
DELETED
state. - software
Key numberCount - The number of keys in this vault that persist on the server, across all compartments, excluding keys in a
DELETED
state. - software
Key numberVersion Count - 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 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_ intcount - The number of key versions in this vault, across all compartments, excluding key versions in a
DELETED
state. - software_
key_ intcount - The number of keys in this vault that persist on the server, across all compartments, excluding keys in a
DELETED
state. - software_
key_ intversion_ count - 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.
- key
Count Number - The number of keys in this vault, across all compartments, excluding keys in a
DELETED
state. - key
Version NumberCount - The number of key versions in this vault, across all compartments, excluding key versions in a
DELETED
state. - software
Key NumberCount - The number of keys in this vault that persist on the server, across all compartments, excluding keys in a
DELETED
state. - software
Key NumberVersion Count - 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 String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.