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

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

    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),
        };
    });
    
    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
    	})
    }
    
    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()));
        }
    }
    
    import pulumi
    import pulumi_rediscloud as rediscloud
    
    example = rediscloud.get_subscription_peerings(subscription_id="1234")
    pulumi.export("rediscloudSubscriptionPeerings", example.peerings)
    
    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);
    
    variables:
      example:
        fn::invoke:
          Function: rediscloud:getSubscriptionPeerings
          Arguments:
            subscriptionId: '1234'
    outputs:
      rediscloudSubscriptionPeerings: ${example.peerings}
    

    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>
    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]
    func GetSubscriptionPeerings(ctx *Context, args *GetSubscriptionPeeringsArgs, opts ...InvokeOption) (*GetSubscriptionPeeringsResult, error)
    func GetSubscriptionPeeringsOutput(ctx *Context, args *GetSubscriptionPeeringsOutputArgs, opts ...InvokeOption) GetSubscriptionPeeringsResultOutput

    > 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)
    }
    public static CompletableFuture<GetSubscriptionPeeringsResult> getSubscriptionPeerings(GetSubscriptionPeeringsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: rediscloud:index/getSubscriptionPeerings:getSubscriptionPeerings
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SubscriptionId 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 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 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 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 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 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 string
    AWS account id that the VPC to be peered lives in
    AwsPeeringId string
    Identifier of the AWS cloud peering
    GcpNetworkName string
    The name of the network to be peered
    GcpPeeringId string
    Identifier of the cloud peering
    GcpProjectId string
    GCP project ID that the VPC to be peered lives in
    GcpRedisNetworkName string
    The name of the Redis Enterprise Cloud network to be peered
    GcpRedisProjectId string
    Identifier of the Redis Enterprise Cloud GCP project to be peered
    PeeringId int
    ID of the subscription peering
    ProviderName string
    The name of the cloud provider. (either AWS or GCP)
    Region string
    AWS Region that the VPC to be peered lives in
    Status string
    Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
    VpcCidr string
    CIDR range of the VPC to be peered
    VpcId string
    Identifier of the VPC to be peered
    AwsAccountId string
    AWS account id that the VPC to be peered lives in
    AwsPeeringId string
    Identifier of the AWS cloud peering
    GcpNetworkName string
    The name of the network to be peered
    GcpPeeringId string
    Identifier of the cloud peering
    GcpProjectId string
    GCP project ID that the VPC to be peered lives in
    GcpRedisNetworkName string
    The name of the Redis Enterprise Cloud network to be peered
    GcpRedisProjectId string
    Identifier of the Redis Enterprise Cloud GCP project to be peered
    PeeringId int
    ID of the subscription peering
    ProviderName string
    The name of the cloud provider. (either AWS or GCP)
    Region string
    AWS Region that the VPC to be peered lives in
    Status string
    Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
    VpcCidr string
    CIDR range of the VPC to be peered
    VpcId string
    Identifier of the VPC to be peered
    awsAccountId String
    AWS account id that the VPC to be peered lives in
    awsPeeringId String
    Identifier of the AWS cloud peering
    gcpNetworkName String
    The name of the network to be peered
    gcpPeeringId String
    Identifier of the cloud peering
    gcpProjectId String
    GCP project ID that the VPC to be peered lives in
    gcpRedisNetworkName String
    The name of the Redis Enterprise Cloud network to be peered
    gcpRedisProjectId String
    Identifier of the Redis Enterprise Cloud GCP project to be peered
    peeringId Integer
    ID of the subscription peering
    providerName String
    The name of the cloud provider. (either AWS or GCP)
    region String
    AWS Region that the VPC to be peered lives in
    status String
    Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
    vpcCidr String
    CIDR range of the VPC to be peered
    vpcId String
    Identifier of the VPC to be peered
    awsAccountId string
    AWS account id that the VPC to be peered lives in
    awsPeeringId string
    Identifier of the AWS cloud peering
    gcpNetworkName string
    The name of the network to be peered
    gcpPeeringId string
    Identifier of the cloud peering
    gcpProjectId string
    GCP project ID that the VPC to be peered lives in
    gcpRedisNetworkName string
    The name of the Redis Enterprise Cloud network to be peered
    gcpRedisProjectId string
    Identifier of the Redis Enterprise Cloud GCP project to be peered
    peeringId number
    ID of the subscription peering
    providerName string
    The name of the cloud provider. (either AWS or GCP)
    region string
    AWS Region that the VPC to be peered lives in
    status string
    Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
    vpcCidr string
    CIDR range of the VPC to be peered
    vpcId string
    Identifier of the VPC to be peered
    aws_account_id str
    AWS account id that the VPC to be peered lives in
    aws_peering_id str
    Identifier of the AWS cloud peering
    gcp_network_name str
    The name of the network to be peered
    gcp_peering_id str
    Identifier of the cloud peering
    gcp_project_id str
    GCP project ID that the VPC to be peered lives in
    gcp_redis_network_name str
    The name of the Redis Enterprise Cloud network to be peered
    gcp_redis_project_id str
    Identifier of the Redis Enterprise Cloud GCP project to be peered
    peering_id int
    ID of the subscription peering
    provider_name str
    The name of the cloud provider. (either AWS or GCP)
    region str
    AWS Region that the VPC to be peered lives in
    status str
    Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
    vpc_cidr str
    CIDR range of the VPC to be peered
    vpc_id str
    Identifier of the VPC to be peered
    awsAccountId String
    AWS account id that the VPC to be peered lives in
    awsPeeringId String
    Identifier of the AWS cloud peering
    gcpNetworkName String
    The name of the network to be peered
    gcpPeeringId String
    Identifier of the cloud peering
    gcpProjectId String
    GCP project ID that the VPC to be peered lives in
    gcpRedisNetworkName String
    The name of the Redis Enterprise Cloud network to be peered
    gcpRedisProjectId String
    Identifier of the Redis Enterprise Cloud GCP project to be peered
    peeringId Number
    ID of the subscription peering
    providerName String
    The name of the cloud provider. (either AWS or GCP)
    region String
    AWS Region that the VPC to be peered lives in
    status String
    Current status of the peering - initiating-request, pending-acceptance, active, inactive or failed.
    vpcCidr String
    CIDR range of the VPC to be peered
    vpcId 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.
    rediscloud logo
    Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs