1. Packages
  2. RedisCloud
  3. API Docs
  4. getSubscription
Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs

rediscloud.getSubscription

Explore with Pulumi AI

rediscloud logo
Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs

    The Subscription data source allows access to the details of an existing subscription within your Redis Enterprise Cloud account.

    Example Usage

    The following example shows how to use the name attribute to locate a subscription within your Redis Enterprise Cloud account.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rediscloud = Pulumi.Rediscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Rediscloud.GetSubscription.Invoke(new()
        {
            Name = "My Example Subscription",
        });
    
        return new Dictionary<string, object?>
        {
            ["rediscloudSubscription"] = example.Apply(getSubscriptionResult => getSubscriptionResult.Id),
        };
    });
    
    package main
    
    import (
    	"github.com/RedisLabs/pulumi-rediscloud/sdk/go/rediscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := rediscloud.LookupSubscription(ctx, &rediscloud.LookupSubscriptionArgs{
    			Name: pulumi.StringRef("My Example Subscription"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("rediscloudSubscription", example.Id)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rediscloud.RediscloudFunctions;
    import com.pulumi.rediscloud.inputs.GetSubscriptionArgs;
    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 example = RediscloudFunctions.getSubscription(GetSubscriptionArgs.builder()
                .name("My Example Subscription")
                .build());
    
            ctx.export("rediscloudSubscription", example.applyValue(getSubscriptionResult -> getSubscriptionResult.id()));
        }
    }
    
    import pulumi
    import pulumi_rediscloud as rediscloud
    
    example = rediscloud.get_subscription(name="My Example Subscription")
    pulumi.export("rediscloudSubscription", example.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as rediscloud from "@pulumi/rediscloud";
    
    const example = rediscloud.getSubscription({
        name: "My Example Subscription",
    });
    export const rediscloudSubscription = example.then(example => example.id);
    
    variables:
      example:
        fn::invoke:
          Function: rediscloud:getSubscription
          Arguments:
            name: My Example Subscription
    outputs:
      rediscloudSubscription: ${example.id}
    

    Using getSubscription

    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 getSubscription(args: GetSubscriptionArgs, opts?: InvokeOptions): Promise<GetSubscriptionResult>
    function getSubscriptionOutput(args: GetSubscriptionOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionResult>
    def get_subscription(name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetSubscriptionResult
    def get_subscription_output(name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionResult]
    func LookupSubscription(ctx *Context, args *LookupSubscriptionArgs, opts ...InvokeOption) (*LookupSubscriptionResult, error)
    func LookupSubscriptionOutput(ctx *Context, args *LookupSubscriptionOutputArgs, opts ...InvokeOption) LookupSubscriptionResultOutput

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

    public static class GetSubscription 
    {
        public static Task<GetSubscriptionResult> InvokeAsync(GetSubscriptionArgs args, InvokeOptions? opts = null)
        public static Output<GetSubscriptionResult> Invoke(GetSubscriptionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSubscriptionResult> getSubscription(GetSubscriptionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: rediscloud:index/getSubscription:getSubscription
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the subscription to filter returned subscriptions
    Name string
    The name of the subscription to filter returned subscriptions
    name String
    The name of the subscription to filter returned subscriptions
    name string
    The name of the subscription to filter returned subscriptions
    name str
    The name of the subscription to filter returned subscriptions
    name String
    The name of the subscription to filter returned subscriptions

    getSubscription Result

    The following output properties are available:

    CloudProviders List<RedisLabs.Rediscloud.Outputs.GetSubscriptionCloudProvider>
    A cloud provider object, documented below
    Id string
    The provider-assigned unique ID for this managed resource.
    MemoryStorage string
    Memory storage preference: either ‘ram’ or a combination of 'ram-and-flash’
    Name string
    NumberOfDatabases int
    The number of databases that are linked to this subscription.
    PaymentMethod string
    PaymentMethodId string
    A valid payment method pre-defined in the current account
    Status string
    Current status of the subscription
    CloudProviders []GetSubscriptionCloudProvider
    A cloud provider object, documented below
    Id string
    The provider-assigned unique ID for this managed resource.
    MemoryStorage string
    Memory storage preference: either ‘ram’ or a combination of 'ram-and-flash’
    Name string
    NumberOfDatabases int
    The number of databases that are linked to this subscription.
    PaymentMethod string
    PaymentMethodId string
    A valid payment method pre-defined in the current account
    Status string
    Current status of the subscription
    cloudProviders List<GetSubscriptionCloudProvider>
    A cloud provider object, documented below
    id String
    The provider-assigned unique ID for this managed resource.
    memoryStorage String
    Memory storage preference: either ‘ram’ or a combination of 'ram-and-flash’
    name String
    numberOfDatabases Integer
    The number of databases that are linked to this subscription.
    paymentMethod String
    paymentMethodId String
    A valid payment method pre-defined in the current account
    status String
    Current status of the subscription
    cloudProviders GetSubscriptionCloudProvider[]
    A cloud provider object, documented below
    id string
    The provider-assigned unique ID for this managed resource.
    memoryStorage string
    Memory storage preference: either ‘ram’ or a combination of 'ram-and-flash’
    name string
    numberOfDatabases number
    The number of databases that are linked to this subscription.
    paymentMethod string
    paymentMethodId string
    A valid payment method pre-defined in the current account
    status string
    Current status of the subscription
    cloud_providers Sequence[GetSubscriptionCloudProvider]
    A cloud provider object, documented below
    id str
    The provider-assigned unique ID for this managed resource.
    memory_storage str
    Memory storage preference: either ‘ram’ or a combination of 'ram-and-flash’
    name str
    number_of_databases int
    The number of databases that are linked to this subscription.
    payment_method str
    payment_method_id str
    A valid payment method pre-defined in the current account
    status str
    Current status of the subscription
    cloudProviders List<Property Map>
    A cloud provider object, documented below
    id String
    The provider-assigned unique ID for this managed resource.
    memoryStorage String
    Memory storage preference: either ‘ram’ or a combination of 'ram-and-flash’
    name String
    numberOfDatabases Number
    The number of databases that are linked to this subscription.
    paymentMethod String
    paymentMethodId String
    A valid payment method pre-defined in the current account
    status String
    Current status of the subscription

    Supporting Types

    GetSubscriptionCloudProvider

    CloudAccountId string
    Cloud account identifier, (A Cloud Account Id = 1 implies using Redis Labs internal cloud account)
    Provider string
    The cloud provider to use with the subscription, (either AWS or GCP)
    Regions List<RedisLabs.Rediscloud.Inputs.GetSubscriptionCloudProviderRegion>
    Deployment region as defined by cloud provider
    CloudAccountId string
    Cloud account identifier, (A Cloud Account Id = 1 implies using Redis Labs internal cloud account)
    Provider string
    The cloud provider to use with the subscription, (either AWS or GCP)
    Regions []GetSubscriptionCloudProviderRegion
    Deployment region as defined by cloud provider
    cloudAccountId String
    Cloud account identifier, (A Cloud Account Id = 1 implies using Redis Labs internal cloud account)
    provider String
    The cloud provider to use with the subscription, (either AWS or GCP)
    regions List<GetSubscriptionCloudProviderRegion>
    Deployment region as defined by cloud provider
    cloudAccountId string
    Cloud account identifier, (A Cloud Account Id = 1 implies using Redis Labs internal cloud account)
    provider string
    The cloud provider to use with the subscription, (either AWS or GCP)
    regions GetSubscriptionCloudProviderRegion[]
    Deployment region as defined by cloud provider
    cloud_account_id str
    Cloud account identifier, (A Cloud Account Id = 1 implies using Redis Labs internal cloud account)
    provider str
    The cloud provider to use with the subscription, (either AWS or GCP)
    regions Sequence[GetSubscriptionCloudProviderRegion]
    Deployment region as defined by cloud provider
    cloudAccountId String
    Cloud account identifier, (A Cloud Account Id = 1 implies using Redis Labs internal cloud account)
    provider String
    The cloud provider to use with the subscription, (either AWS or GCP)
    regions List<Property Map>
    Deployment region as defined by cloud provider

    GetSubscriptionCloudProviderRegion

    MultipleAvailabilityZones bool
    Support deployment on multiple availability zones within the selected region
    NetworkingVpcId string
    VPC id for the generated network
    Networks List<RedisLabs.Rediscloud.Inputs.GetSubscriptionCloudProviderRegionNetwork>
    List of generated network configuration
    PreferredAvailabilityZones List<string>
    List of availability zones used
    Region string
    Deployment region as defined by cloud provider
    MultipleAvailabilityZones bool
    Support deployment on multiple availability zones within the selected region
    NetworkingVpcId string
    VPC id for the generated network
    Networks []GetSubscriptionCloudProviderRegionNetwork
    List of generated network configuration
    PreferredAvailabilityZones []string
    List of availability zones used
    Region string
    Deployment region as defined by cloud provider
    multipleAvailabilityZones Boolean
    Support deployment on multiple availability zones within the selected region
    networkingVpcId String
    VPC id for the generated network
    networks List<GetSubscriptionCloudProviderRegionNetwork>
    List of generated network configuration
    preferredAvailabilityZones List<String>
    List of availability zones used
    region String
    Deployment region as defined by cloud provider
    multipleAvailabilityZones boolean
    Support deployment on multiple availability zones within the selected region
    networkingVpcId string
    VPC id for the generated network
    networks GetSubscriptionCloudProviderRegionNetwork[]
    List of generated network configuration
    preferredAvailabilityZones string[]
    List of availability zones used
    region string
    Deployment region as defined by cloud provider
    multiple_availability_zones bool
    Support deployment on multiple availability zones within the selected region
    networking_vpc_id str
    VPC id for the generated network
    networks Sequence[GetSubscriptionCloudProviderRegionNetwork]
    List of generated network configuration
    preferred_availability_zones Sequence[str]
    List of availability zones used
    region str
    Deployment region as defined by cloud provider
    multipleAvailabilityZones Boolean
    Support deployment on multiple availability zones within the selected region
    networkingVpcId String
    VPC id for the generated network
    networks List<Property Map>
    List of generated network configuration
    preferredAvailabilityZones List<String>
    List of availability zones used
    region String
    Deployment region as defined by cloud provider

    GetSubscriptionCloudProviderRegionNetwork

    NetworkingDeploymentCidr string
    Deployment CIDR mask for the generated
    NetworkingSubnetId string
    The subnet that the subscription deploys into
    NetworkingVpcId string
    VPC id for the generated network
    NetworkingDeploymentCidr string
    Deployment CIDR mask for the generated
    NetworkingSubnetId string
    The subnet that the subscription deploys into
    NetworkingVpcId string
    VPC id for the generated network
    networkingDeploymentCidr String
    Deployment CIDR mask for the generated
    networkingSubnetId String
    The subnet that the subscription deploys into
    networkingVpcId String
    VPC id for the generated network
    networkingDeploymentCidr string
    Deployment CIDR mask for the generated
    networkingSubnetId string
    The subnet that the subscription deploys into
    networkingVpcId string
    VPC id for the generated network
    networking_deployment_cidr str
    Deployment CIDR mask for the generated
    networking_subnet_id str
    The subnet that the subscription deploys into
    networking_vpc_id str
    VPC id for the generated network
    networkingDeploymentCidr String
    Deployment CIDR mask for the generated
    networkingSubnetId String
    The subnet that the subscription deploys into
    networkingVpcId String
    VPC id for the generated network

    Package Details

    Repository
    rediscloud RedisLabs/pulumi-rediscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rediscloud Terraform Provider.
    rediscloud logo
    Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs