1. Packages
  2. Vultr
  3. API Docs
  4. getObjectStorage
Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien

vultr.getObjectStorage

Explore with Pulumi AI

vultr logo
Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien

    Get information about an Object Storage subscription on Vultr.

    Example Usage

    Get the information for an object storage subscription by

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = Pulumi.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var s3 = Vultr.GetObjectStorage.Invoke(new()
        {
            Filters = new[]
            {
                new Vultr.Inputs.GetObjectStorageFilterInputArgs
                {
                    Name = "label",
                    Values = new[]
                    {
                        "my-s3",
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vultr.LookupObjectStorage(ctx, &vultr.LookupObjectStorageArgs{
    			Filters: []vultr.GetObjectStorageFilter{
    				{
    					Name: "label",
    					Values: []string{
    						"my-s3",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.VultrFunctions;
    import com.pulumi.vultr.inputs.GetObjectStorageArgs;
    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 s3 = VultrFunctions.getObjectStorage(GetObjectStorageArgs.builder()
                .filters(GetObjectStorageFilterArgs.builder()
                    .name("label")
                    .values("my-s3")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vultr as vultr
    
    s3 = vultr.get_object_storage(filters=[vultr.GetObjectStorageFilterArgs(
        name="label",
        values=["my-s3"],
    )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@pulumi/vultr";
    
    const s3 = vultr.getObjectStorage({
        filters: [{
            name: "label",
            values: ["my-s3"],
        }],
    });
    
    variables:
      s3:
        fn::invoke:
          Function: vultr:getObjectStorage
          Arguments:
            filters:
              - name: label
                values:
                  - my-s3
    

    Using getObjectStorage

    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 getObjectStorage(args: GetObjectStorageArgs, opts?: InvokeOptions): Promise<GetObjectStorageResult>
    function getObjectStorageOutput(args: GetObjectStorageOutputArgs, opts?: InvokeOptions): Output<GetObjectStorageResult>
    def get_object_storage(filters: Optional[Sequence[GetObjectStorageFilter]] = None,
                           opts: Optional[InvokeOptions] = None) -> GetObjectStorageResult
    def get_object_storage_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetObjectStorageFilterArgs]]]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetObjectStorageResult]
    func LookupObjectStorage(ctx *Context, args *LookupObjectStorageArgs, opts ...InvokeOption) (*LookupObjectStorageResult, error)
    func LookupObjectStorageOutput(ctx *Context, args *LookupObjectStorageOutputArgs, opts ...InvokeOption) LookupObjectStorageResultOutput

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

    public static class GetObjectStorage 
    {
        public static Task<GetObjectStorageResult> InvokeAsync(GetObjectStorageArgs args, InvokeOptions? opts = null)
        public static Output<GetObjectStorageResult> Invoke(GetObjectStorageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetObjectStorageResult> getObjectStorage(GetObjectStorageArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vultr:index/getObjectStorage:getObjectStorage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<ediri.Vultr.Inputs.GetObjectStorageFilter>
    Query parameters for finding operating systems.
    Filters []GetObjectStorageFilter
    Query parameters for finding operating systems.
    filters List<GetObjectStorageFilter>
    Query parameters for finding operating systems.
    filters GetObjectStorageFilter[]
    Query parameters for finding operating systems.
    filters Sequence[GetObjectStorageFilter]
    Query parameters for finding operating systems.
    filters List<Property Map>
    Query parameters for finding operating systems.

    getObjectStorage Result

    The following output properties are available:

    ClusterId int
    The identifying cluster ID.
    DateCreated string
    Date of creation for the object storage subscription.
    Id string
    The provider-assigned unique ID for this managed resource.
    Label string
    The label of the object storage subscription.
    Location string
    The location which this subscription resides in.
    Region string
    The region ID of the object storage subscription.
    S3AccessKey string
    Your access key.
    S3Hostname string
    The hostname for this subscription.
    S3SecretKey string
    Your secret key.
    Status string
    Current status of this object storage subscription.
    Filters List<ediri.Vultr.Outputs.GetObjectStorageFilter>
    ClusterId int
    The identifying cluster ID.
    DateCreated string
    Date of creation for the object storage subscription.
    Id string
    The provider-assigned unique ID for this managed resource.
    Label string
    The label of the object storage subscription.
    Location string
    The location which this subscription resides in.
    Region string
    The region ID of the object storage subscription.
    S3AccessKey string
    Your access key.
    S3Hostname string
    The hostname for this subscription.
    S3SecretKey string
    Your secret key.
    Status string
    Current status of this object storage subscription.
    Filters []GetObjectStorageFilter
    clusterId Integer
    The identifying cluster ID.
    dateCreated String
    Date of creation for the object storage subscription.
    id String
    The provider-assigned unique ID for this managed resource.
    label String
    The label of the object storage subscription.
    location String
    The location which this subscription resides in.
    region String
    The region ID of the object storage subscription.
    s3AccessKey String
    Your access key.
    s3Hostname String
    The hostname for this subscription.
    s3SecretKey String
    Your secret key.
    status String
    Current status of this object storage subscription.
    filters List<GetObjectStorageFilter>
    clusterId number
    The identifying cluster ID.
    dateCreated string
    Date of creation for the object storage subscription.
    id string
    The provider-assigned unique ID for this managed resource.
    label string
    The label of the object storage subscription.
    location string
    The location which this subscription resides in.
    region string
    The region ID of the object storage subscription.
    s3AccessKey string
    Your access key.
    s3Hostname string
    The hostname for this subscription.
    s3SecretKey string
    Your secret key.
    status string
    Current status of this object storage subscription.
    filters GetObjectStorageFilter[]
    cluster_id int
    The identifying cluster ID.
    date_created str
    Date of creation for the object storage subscription.
    id str
    The provider-assigned unique ID for this managed resource.
    label str
    The label of the object storage subscription.
    location str
    The location which this subscription resides in.
    region str
    The region ID of the object storage subscription.
    s3_access_key str
    Your access key.
    s3_hostname str
    The hostname for this subscription.
    s3_secret_key str
    Your secret key.
    status str
    Current status of this object storage subscription.
    filters Sequence[GetObjectStorageFilter]
    clusterId Number
    The identifying cluster ID.
    dateCreated String
    Date of creation for the object storage subscription.
    id String
    The provider-assigned unique ID for this managed resource.
    label String
    The label of the object storage subscription.
    location String
    The location which this subscription resides in.
    region String
    The region ID of the object storage subscription.
    s3AccessKey String
    Your access key.
    s3Hostname String
    The hostname for this subscription.
    s3SecretKey String
    Your secret key.
    status String
    Current status of this object storage subscription.
    filters List<Property Map>

    Supporting Types

    GetObjectStorageFilter

    Name string
    Attribute name to filter with.
    Values List<string>
    One or more values filter with.
    Name string
    Attribute name to filter with.
    Values []string
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.
    name string
    Attribute name to filter with.
    values string[]
    One or more values filter with.
    name str
    Attribute name to filter with.
    values Sequence[str]
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vultr Terraform Provider.
    vultr logo
    Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien