Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs
rediscloud.getCloudAccount
Explore with Pulumi AI
The Cloud Account data source allows access to the ID of a Cloud Account configuration. This ID can be used when creating Subscription resources.
Example Usage
The following example excludes the Redis Labs internal cloud account and returns only AWS related accounts.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rediscloud = Pulumi.Rediscloud;
return await Deployment.RunAsync(() =>
{
var example = Rediscloud.GetCloudAccount.Invoke(new()
{
ExcludeInternalAccount = true,
ProviderType = "AWS",
});
});
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 {
_, err := rediscloud.LookupCloudAccount(ctx, &rediscloud.LookupCloudAccountArgs{
ExcludeInternalAccount: pulumi.BoolRef(true),
ProviderType: pulumi.StringRef("AWS"),
}, 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.rediscloud.RediscloudFunctions;
import com.pulumi.rediscloud.inputs.GetCloudAccountArgs;
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.getCloudAccount(GetCloudAccountArgs.builder()
.excludeInternalAccount(true)
.providerType("AWS")
.build());
}
}
import pulumi
import pulumi_rediscloud as rediscloud
example = rediscloud.get_cloud_account(exclude_internal_account=True,
provider_type="AWS")
import * as pulumi from "@pulumi/pulumi";
import * as rediscloud from "@pulumi/rediscloud";
const example = rediscloud.getCloudAccount({
excludeInternalAccount: true,
providerType: "AWS",
});
variables:
example:
fn::invoke:
Function: rediscloud:getCloudAccount
Arguments:
excludeInternalAccount: true
providerType: AWS
and returns the cloud account ID and access key ID.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rediscloud = Pulumi.Rediscloud;
return await Deployment.RunAsync(() =>
{
var example = Rediscloud.GetCloudAccount.Invoke(new()
{
ExcludeInternalAccount = true,
ProviderType = "AWS",
Name = "test",
});
return new Dictionary<string, object?>
{
["cloudAccountId"] = example.Apply(getCloudAccountResult => getCloudAccountResult.Id),
["cloudAccountAccessKeyId"] = example.Apply(getCloudAccountResult => getCloudAccountResult.AccessKeyId),
};
});
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.LookupCloudAccount(ctx, &rediscloud.LookupCloudAccountArgs{
ExcludeInternalAccount: pulumi.BoolRef(true),
ProviderType: pulumi.StringRef("AWS"),
Name: pulumi.StringRef("test"),
}, nil)
if err != nil {
return err
}
ctx.Export("cloudAccountId", example.Id)
ctx.Export("cloudAccountAccessKeyId", example.AccessKeyId)
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.GetCloudAccountArgs;
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.getCloudAccount(GetCloudAccountArgs.builder()
.excludeInternalAccount(true)
.providerType("AWS")
.name("test")
.build());
ctx.export("cloudAccountId", example.applyValue(getCloudAccountResult -> getCloudAccountResult.id()));
ctx.export("cloudAccountAccessKeyId", example.applyValue(getCloudAccountResult -> getCloudAccountResult.accessKeyId()));
}
}
import pulumi
import pulumi_rediscloud as rediscloud
example = rediscloud.get_cloud_account(exclude_internal_account=True,
provider_type="AWS",
name="test")
pulumi.export("cloudAccountId", example.id)
pulumi.export("cloudAccountAccessKeyId", example.access_key_id)
import * as pulumi from "@pulumi/pulumi";
import * as rediscloud from "@pulumi/rediscloud";
const example = rediscloud.getCloudAccount({
excludeInternalAccount: true,
providerType: "AWS",
name: "test",
});
export const cloudAccountId = example.then(example => example.id);
export const cloudAccountAccessKeyId = example.then(example => example.accessKeyId);
variables:
example:
fn::invoke:
Function: rediscloud:getCloudAccount
Arguments:
excludeInternalAccount: true
providerType: AWS
name: test
outputs:
cloudAccountId: ${example.id}
cloudAccountAccessKeyId: ${example.accessKeyId}
Using getCloudAccount
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 getCloudAccount(args: GetCloudAccountArgs, opts?: InvokeOptions): Promise<GetCloudAccountResult>
function getCloudAccountOutput(args: GetCloudAccountOutputArgs, opts?: InvokeOptions): Output<GetCloudAccountResult>
def get_cloud_account(exclude_internal_account: Optional[bool] = None,
name: Optional[str] = None,
provider_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudAccountResult
def get_cloud_account_output(exclude_internal_account: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
provider_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudAccountResult]
func LookupCloudAccount(ctx *Context, args *LookupCloudAccountArgs, opts ...InvokeOption) (*LookupCloudAccountResult, error)
func LookupCloudAccountOutput(ctx *Context, args *LookupCloudAccountOutputArgs, opts ...InvokeOption) LookupCloudAccountResultOutput
> Note: This function is named LookupCloudAccount
in the Go SDK.
public static class GetCloudAccount
{
public static Task<GetCloudAccountResult> InvokeAsync(GetCloudAccountArgs args, InvokeOptions? opts = null)
public static Output<GetCloudAccountResult> Invoke(GetCloudAccountInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudAccountResult> getCloudAccount(GetCloudAccountArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: rediscloud:index/getCloudAccount:getCloudAccount
arguments:
# arguments dictionary
The following arguments are supported:
- Exclude
Internal boolAccount - Whether to exclude the Redis Labs internal cloud account.
- Name string
- A meaningful name to identify the cloud account
- Provider
Type string - The cloud provider of the cloud account, (either
AWS
orGCP
)
- Exclude
Internal boolAccount - Whether to exclude the Redis Labs internal cloud account.
- Name string
- A meaningful name to identify the cloud account
- Provider
Type string - The cloud provider of the cloud account, (either
AWS
orGCP
)
- exclude
Internal BooleanAccount - Whether to exclude the Redis Labs internal cloud account.
- name String
- A meaningful name to identify the cloud account
- provider
Type String - The cloud provider of the cloud account, (either
AWS
orGCP
)
- exclude
Internal booleanAccount - Whether to exclude the Redis Labs internal cloud account.
- name string
- A meaningful name to identify the cloud account
- provider
Type string - The cloud provider of the cloud account, (either
AWS
orGCP
)
- exclude_
internal_ boolaccount - Whether to exclude the Redis Labs internal cloud account.
- name str
- A meaningful name to identify the cloud account
- provider_
type str - The cloud provider of the cloud account, (either
AWS
orGCP
)
- exclude
Internal BooleanAccount - Whether to exclude the Redis Labs internal cloud account.
- name String
- A meaningful name to identify the cloud account
- provider
Type String - The cloud provider of the cloud account, (either
AWS
orGCP
)
getCloudAccount Result
The following output properties are available:
- Access
Key stringId - The access key ID associated with the cloud account
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Provider
Type string - Exclude
Internal boolAccount
- Access
Key stringId - The access key ID associated with the cloud account
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Provider
Type string - Exclude
Internal boolAccount
- access
Key StringId - The access key ID associated with the cloud account
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- provider
Type String - exclude
Internal BooleanAccount
- access
Key stringId - The access key ID associated with the cloud account
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- provider
Type string - exclude
Internal booleanAccount
- access_
key_ strid - The access key ID associated with the cloud account
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- provider_
type str - exclude_
internal_ boolaccount
- access
Key StringId - The access key ID associated with the cloud account
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- provider
Type String - exclude
Internal BooleanAccount
Package Details
- Repository
- rediscloud RedisLabs/pulumi-rediscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rediscloud
Terraform Provider.