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

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),
    };
});
Copy
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
	})
}
Copy
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()));
    }
}
Copy
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);
Copy
import pulumi
import pulumi_rediscloud as rediscloud

example = rediscloud.get_subscription(name="My Example Subscription")
pulumi.export("rediscloudSubscription", example.id)
Copy
variables:
  example:
    fn::invoke:
      Function: rediscloud:getSubscription
      Arguments:
        name: My Example Subscription
outputs:
  rediscloudSubscription: ${example.id}
Copy

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>
Copy
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]
Copy
func LookupSubscription(ctx *Context, args *LookupSubscriptionArgs, opts ...InvokeOption) (*LookupSubscriptionResult, error)
func LookupSubscriptionOutput(ctx *Context, args *LookupSubscriptionOutputArgs, opts ...InvokeOption) LookupSubscriptionResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSubscriptionResult> getSubscription(GetSubscriptionArgs args, InvokeOptions options)
public static Output<GetSubscriptionResult> getSubscription(GetSubscriptionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: rediscloud:index/getSubscription:getSubscription
  arguments:
    # arguments dictionary
Copy

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

GetSubscriptionCloudProviderRegion

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

GetSubscriptionCloudProviderRegionNetwork

NetworkingDeploymentCidr This property is required. string
Deployment CIDR mask for the generated
NetworkingSubnetId This property is required. string
The subnet that the subscription deploys into
NetworkingVpcId This property is required. string
VPC id for the generated network
NetworkingDeploymentCidr This property is required. string
Deployment CIDR mask for the generated
NetworkingSubnetId This property is required. string
The subnet that the subscription deploys into
NetworkingVpcId This property is required. string
VPC id for the generated network
networkingDeploymentCidr This property is required. String
Deployment CIDR mask for the generated
networkingSubnetId This property is required. String
The subnet that the subscription deploys into
networkingVpcId This property is required. String
VPC id for the generated network
networkingDeploymentCidr This property is required. string
Deployment CIDR mask for the generated
networkingSubnetId This property is required. string
The subnet that the subscription deploys into
networkingVpcId This property is required. string
VPC id for the generated network
networking_deployment_cidr This property is required. str
Deployment CIDR mask for the generated
networking_subnet_id This property is required. str
The subnet that the subscription deploys into
networking_vpc_id This property is required. str
VPC id for the generated network
networkingDeploymentCidr This property is required. String
Deployment CIDR mask for the generated
networkingSubnetId This property is required. String
The subnet that the subscription deploys into
networkingVpcId This property is required. 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.
Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs