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

rediscloud.getSubscriptionPeerings

Explore with Pulumi AI

The Subscription Peerings data source allows access to a list of VPC peerings for a particular subscription.

Example Usage

The following example returns a list of all VPC peering within a Subscription.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rediscloud = Pulumi.Rediscloud;

return await Deployment.RunAsync(() => 
{
    var example = Rediscloud.GetSubscriptionPeerings.Invoke(new()
    {
        SubscriptionId = "1234",
    });

    return new Dictionary<string, object?>
    {
        ["rediscloudSubscriptionPeerings"] = example.Apply(getSubscriptionPeeringsResult => getSubscriptionPeeringsResult.Peerings),
    };
});
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.GetSubscriptionPeerings(ctx, &rediscloud.GetSubscriptionPeeringsArgs{
			SubscriptionId: "1234",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("rediscloudSubscriptionPeerings", example.Peerings)
		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.GetSubscriptionPeeringsArgs;
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.getSubscriptionPeerings(GetSubscriptionPeeringsArgs.builder()
            .subscriptionId("1234")
            .build());

        ctx.export("rediscloudSubscriptionPeerings", example.applyValue(getSubscriptionPeeringsResult -> getSubscriptionPeeringsResult.peerings()));
    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as rediscloud from "@pulumi/rediscloud";

const example = rediscloud.getSubscriptionPeerings({
    subscriptionId: "1234",
});
export const rediscloudSubscriptionPeerings = example.then(example => example.peerings);
Copy
import pulumi
import pulumi_rediscloud as rediscloud

example = rediscloud.get_subscription_peerings(subscription_id="1234")
pulumi.export("rediscloudSubscriptionPeerings", example.peerings)
Copy
variables:
  example:
    fn::invoke:
      Function: rediscloud:getSubscriptionPeerings
      Arguments:
        subscriptionId: '1234'
outputs:
  rediscloudSubscriptionPeerings: ${example.peerings}
Copy

Using getSubscriptionPeerings

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 getSubscriptionPeerings(args: GetSubscriptionPeeringsArgs, opts?: InvokeOptions): Promise<GetSubscriptionPeeringsResult>
function getSubscriptionPeeringsOutput(args: GetSubscriptionPeeringsOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionPeeringsResult>
Copy
def get_subscription_peerings(status: Optional[str] = None,
                              subscription_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetSubscriptionPeeringsResult
def get_subscription_peerings_output(status: Optional[pulumi.Input[str]] = None,
                              subscription_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionPeeringsResult]
Copy
func GetSubscriptionPeerings(ctx *Context, args *GetSubscriptionPeeringsArgs, opts ...InvokeOption) (*GetSubscriptionPeeringsResult, error)
func GetSubscriptionPeeringsOutput(ctx *Context, args *GetSubscriptionPeeringsOutputArgs, opts ...InvokeOption) GetSubscriptionPeeringsResultOutput
Copy

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

public static class GetSubscriptionPeerings 
{
    public static Task<GetSubscriptionPeeringsResult> InvokeAsync(GetSubscriptionPeeringsArgs args, InvokeOptions? opts = null)
    public static Output<GetSubscriptionPeeringsResult> Invoke(GetSubscriptionPeeringsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSubscriptionPeeringsResult> getSubscriptionPeerings(GetSubscriptionPeeringsArgs args, InvokeOptions options)
public static Output<GetSubscriptionPeeringsResult> getSubscriptionPeerings(GetSubscriptionPeeringsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: rediscloud:index/getSubscriptionPeerings:getSubscriptionPeerings
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

SubscriptionId This property is required. string
ID of the subscription that the peerings belongs to
Status string
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
SubscriptionId This property is required. string
ID of the subscription that the peerings belongs to
Status string
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
subscriptionId This property is required. String
ID of the subscription that the peerings belongs to
status String
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
subscriptionId This property is required. string
ID of the subscription that the peerings belongs to
status string
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
subscription_id This property is required. str
ID of the subscription that the peerings belongs to
status str
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
subscriptionId This property is required. String
ID of the subscription that the peerings belongs to
status String
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.

getSubscriptionPeerings Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Peerings List<RedisLabs.Rediscloud.Outputs.GetSubscriptionPeeringsPeering>
A list of subscription peerings.
SubscriptionId string
Status string
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
Id string
The provider-assigned unique ID for this managed resource.
Peerings []GetSubscriptionPeeringsPeering
A list of subscription peerings.
SubscriptionId string
Status string
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
id String
The provider-assigned unique ID for this managed resource.
peerings List<GetSubscriptionPeeringsPeering>
A list of subscription peerings.
subscriptionId String
status String
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
id string
The provider-assigned unique ID for this managed resource.
peerings GetSubscriptionPeeringsPeering[]
A list of subscription peerings.
subscriptionId string
status string
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
id str
The provider-assigned unique ID for this managed resource.
peerings Sequence[GetSubscriptionPeeringsPeering]
A list of subscription peerings.
subscription_id str
status str
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
id String
The provider-assigned unique ID for this managed resource.
peerings List<Property Map>
A list of subscription peerings.
subscriptionId String
status String
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.

Supporting Types

GetSubscriptionPeeringsPeering

AwsAccountId This property is required. string
AWS account id that the VPC to be peered lives in
AwsPeeringId This property is required. string
Identifier of the AWS cloud peering
GcpNetworkName This property is required. string
The name of the network to be peered
GcpPeeringId This property is required. string
Identifier of the cloud peering
GcpProjectId This property is required. string
GCP project ID that the VPC to be peered lives in
GcpRedisNetworkName This property is required. string
The name of the Redis Enterprise Cloud network to be peered
GcpRedisProjectId This property is required. string
Identifier of the Redis Enterprise Cloud GCP project to be peered
PeeringId This property is required. int
ID of the subscription peering
ProviderName This property is required. string
The name of the cloud provider. (either AWS or GCP)
Region This property is required. string
AWS Region that the VPC to be peered lives in
Status This property is required. string
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
VpcCidr This property is required. string
CIDR range of the VPC to be peered
VpcId This property is required. string
Identifier of the VPC to be peered
AwsAccountId This property is required. string
AWS account id that the VPC to be peered lives in
AwsPeeringId This property is required. string
Identifier of the AWS cloud peering
GcpNetworkName This property is required. string
The name of the network to be peered
GcpPeeringId This property is required. string
Identifier of the cloud peering
GcpProjectId This property is required. string
GCP project ID that the VPC to be peered lives in
GcpRedisNetworkName This property is required. string
The name of the Redis Enterprise Cloud network to be peered
GcpRedisProjectId This property is required. string
Identifier of the Redis Enterprise Cloud GCP project to be peered
PeeringId This property is required. int
ID of the subscription peering
ProviderName This property is required. string
The name of the cloud provider. (either AWS or GCP)
Region This property is required. string
AWS Region that the VPC to be peered lives in
Status This property is required. string
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
VpcCidr This property is required. string
CIDR range of the VPC to be peered
VpcId This property is required. string
Identifier of the VPC to be peered
awsAccountId This property is required. String
AWS account id that the VPC to be peered lives in
awsPeeringId This property is required. String
Identifier of the AWS cloud peering
gcpNetworkName This property is required. String
The name of the network to be peered
gcpPeeringId This property is required. String
Identifier of the cloud peering
gcpProjectId This property is required. String
GCP project ID that the VPC to be peered lives in
gcpRedisNetworkName This property is required. String
The name of the Redis Enterprise Cloud network to be peered
gcpRedisProjectId This property is required. String
Identifier of the Redis Enterprise Cloud GCP project to be peered
peeringId This property is required. Integer
ID of the subscription peering
providerName This property is required. String
The name of the cloud provider. (either AWS or GCP)
region This property is required. String
AWS Region that the VPC to be peered lives in
status This property is required. String
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
vpcCidr This property is required. String
CIDR range of the VPC to be peered
vpcId This property is required. String
Identifier of the VPC to be peered
awsAccountId This property is required. string
AWS account id that the VPC to be peered lives in
awsPeeringId This property is required. string
Identifier of the AWS cloud peering
gcpNetworkName This property is required. string
The name of the network to be peered
gcpPeeringId This property is required. string
Identifier of the cloud peering
gcpProjectId This property is required. string
GCP project ID that the VPC to be peered lives in
gcpRedisNetworkName This property is required. string
The name of the Redis Enterprise Cloud network to be peered
gcpRedisProjectId This property is required. string
Identifier of the Redis Enterprise Cloud GCP project to be peered
peeringId This property is required. number
ID of the subscription peering
providerName This property is required. string
The name of the cloud provider. (either AWS or GCP)
region This property is required. string
AWS Region that the VPC to be peered lives in
status This property is required. string
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
vpcCidr This property is required. string
CIDR range of the VPC to be peered
vpcId This property is required. string
Identifier of the VPC to be peered
aws_account_id This property is required. str
AWS account id that the VPC to be peered lives in
aws_peering_id This property is required. str
Identifier of the AWS cloud peering
gcp_network_name This property is required. str
The name of the network to be peered
gcp_peering_id This property is required. str
Identifier of the cloud peering
gcp_project_id This property is required. str
GCP project ID that the VPC to be peered lives in
gcp_redis_network_name This property is required. str
The name of the Redis Enterprise Cloud network to be peered
gcp_redis_project_id This property is required. str
Identifier of the Redis Enterprise Cloud GCP project to be peered
peering_id This property is required. int
ID of the subscription peering
provider_name This property is required. str
The name of the cloud provider. (either AWS or GCP)
region This property is required. str
AWS Region that the VPC to be peered lives in
status This property is required. str
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
vpc_cidr This property is required. str
CIDR range of the VPC to be peered
vpc_id This property is required. str
Identifier of the VPC to be peered
awsAccountId This property is required. String
AWS account id that the VPC to be peered lives in
awsPeeringId This property is required. String
Identifier of the AWS cloud peering
gcpNetworkName This property is required. String
The name of the network to be peered
gcpPeeringId This property is required. String
Identifier of the cloud peering
gcpProjectId This property is required. String
GCP project ID that the VPC to be peered lives in
gcpRedisNetworkName This property is required. String
The name of the Redis Enterprise Cloud network to be peered
gcpRedisProjectId This property is required. String
Identifier of the Redis Enterprise Cloud GCP project to be peered
peeringId This property is required. Number
ID of the subscription peering
providerName This property is required. String
The name of the cloud provider. (either AWS or GCP)
region This property is required. String
AWS Region that the VPC to be peered lives in
status This property is required. String
Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
vpcCidr This property is required. String
CIDR range of the VPC to be peered
vpcId This property is required. String
Identifier of the VPC to be peered

Package Details

Repository
rediscloud RedisLabs/pulumi-rediscloud
License
Apache-2.0
Notes
This Pulumi package is based on the rediscloud Terraform Provider.