1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Kms
  5. getVaultUsage
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Kms.getVaultUsage

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 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,
    });
    
    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/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:

    VaultId string
    The OCID of the vault.
    VaultId string
    The OCID of the vault.
    vaultId String
    The OCID of the vault.
    vaultId string
    The OCID of the vault.
    vault_id str
    The OCID of the vault.
    vaultId 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.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi