ionoscloud.getS3Key
Explore with Pulumi AI
The IONOS Object Storage key data source can be used to search for and return an existing IONOS Object Storage key. You can provide a string id which will be compared with provisioned IONOS Object Storage keys. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getS3Key({
id: "key_id",
userId: "user-uuid",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_s3_key(id="key_id",
user_id="user-uuid")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupS3Key(ctx, &ionoscloud.LookupS3KeyArgs{
Id: pulumi.StringRef("key_id"),
UserId: "user-uuid",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetS3Key.Invoke(new()
{
Id = "key_id",
UserId = "user-uuid",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetS3KeyArgs;
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 = IonoscloudFunctions.getS3Key(GetS3KeyArgs.builder()
.id("key_id")
.userId("user-uuid")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getS3Key
arguments:
id: key_id
userId: user-uuid
Using getS3Key
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 getS3Key(args: GetS3KeyArgs, opts?: InvokeOptions): Promise<GetS3KeyResult>
function getS3KeyOutput(args: GetS3KeyOutputArgs, opts?: InvokeOptions): Output<GetS3KeyResult>
def get_s3_key(id: Optional[str] = None,
timeouts: Optional[GetS3KeyTimeouts] = None,
user_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetS3KeyResult
def get_s3_key_output(id: Optional[pulumi.Input[str]] = None,
timeouts: Optional[pulumi.Input[GetS3KeyTimeoutsArgs]] = None,
user_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetS3KeyResult]
func LookupS3Key(ctx *Context, args *LookupS3KeyArgs, opts ...InvokeOption) (*LookupS3KeyResult, error)
func LookupS3KeyOutput(ctx *Context, args *LookupS3KeyOutputArgs, opts ...InvokeOption) LookupS3KeyResultOutput
> Note: This function is named LookupS3Key
in the Go SDK.
public static class GetS3Key
{
public static Task<GetS3KeyResult> InvokeAsync(GetS3KeyArgs args, InvokeOptions? opts = null)
public static Output<GetS3KeyResult> Invoke(GetS3KeyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetS3KeyResult> getS3Key(GetS3KeyArgs args, InvokeOptions options)
public static Output<GetS3KeyResult> getS3Key(GetS3KeyArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:index/getS3Key:getS3Key
arguments:
# arguments dictionary
The following arguments are supported:
- User
Id string - [string] The UUID of the user owning the IONOS Object Storage Key.
- Id string
- ID of the IONOS Object Storage key you want to search for.
- Timeouts
Get
S3Key Timeouts
- User
Id string - [string] The UUID of the user owning the IONOS Object Storage Key.
- Id string
- ID of the IONOS Object Storage key you want to search for.
- Timeouts
Get
S3Key Timeouts
- user
Id String - [string] The UUID of the user owning the IONOS Object Storage Key.
- id String
- ID of the IONOS Object Storage key you want to search for.
- timeouts
Get
S3Key Timeouts
- user
Id string - [string] The UUID of the user owning the IONOS Object Storage Key.
- id string
- ID of the IONOS Object Storage key you want to search for.
- timeouts
Get
S3Key Timeouts
- user_
id str - [string] The UUID of the user owning the IONOS Object Storage Key.
- id str
- ID of the IONOS Object Storage key you want to search for.
- timeouts
Get
S3Key Timeouts
- user
Id String - [string] The UUID of the user owning the IONOS Object Storage Key.
- id String
- ID of the IONOS Object Storage key you want to search for.
- timeouts Property Map
getS3Key Result
The following output properties are available:
- active bool
- The state of the IONOS Object Storage key
- id str
- The id of the IONOS Object Storage key
- secret_
key str - (Computed)The IONOS Object Storage Secret key.
- user_
id str - The ID of the user that owns the key
- timeouts
Get
S3Key Timeouts
Supporting Types
GetS3KeyTimeouts
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.