1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getUserS3Credentials
OVHCloud v2.1.0 published on Friday, Mar 28, 2025 by OVHcloud

ovh.CloudProject.getUserS3Credentials

Explore with Pulumi AI

OVHCloud v2.1.0 published on Friday, Mar 28, 2025 by OVHcloud

Use this data source to retrieve the list of all the S3 access_key_id associated with a public cloud project’s user.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const myS3Credentials = ovh.CloudProject.getUserS3Credentials({
    serviceName: "XXXXXX",
    userId: "1234",
});
export const accessKeyIds = myS3Credentials.then(myS3Credentials => myS3Credentials.accessKeyIds);
Copy
import pulumi
import pulumi_ovh as ovh

my_s3_credentials = ovh.CloudProject.get_user_s3_credentials(service_name="XXXXXX",
    user_id="1234")
pulumi.export("accessKeyIds", my_s3_credentials.access_key_ids)
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myS3Credentials, err := cloudproject.GetUserS3Credentials(ctx, &cloudproject.GetUserS3CredentialsArgs{
			ServiceName: "XXXXXX",
			UserId:      "1234",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("accessKeyIds", myS3Credentials.AccessKeyIds)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var myS3Credentials = Ovh.CloudProject.GetUserS3Credentials.Invoke(new()
    {
        ServiceName = "XXXXXX",
        UserId = "1234",
    });

    return new Dictionary<string, object?>
    {
        ["accessKeyIds"] = myS3Credentials.Apply(getUserS3CredentialsResult => getUserS3CredentialsResult.AccessKeyIds),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
import com.pulumi.ovh.CloudProject.inputs.GetUserS3CredentialsArgs;
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 myS3Credentials = CloudProjectFunctions.getUserS3Credentials(GetUserS3CredentialsArgs.builder()
            .serviceName("XXXXXX")
            .userId("1234")
            .build());

        ctx.export("accessKeyIds", myS3Credentials.applyValue(getUserS3CredentialsResult -> getUserS3CredentialsResult.accessKeyIds()));
    }
}
Copy
variables:
  myS3Credentials:
    fn::invoke:
      function: ovh:CloudProject:getUserS3Credentials
      arguments:
        serviceName: XXXXXX
        userId: '1234'
outputs:
  accessKeyIds: ${myS3Credentials.accessKeyIds}
Copy

Using getUserS3Credentials

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 getUserS3Credentials(args: GetUserS3CredentialsArgs, opts?: InvokeOptions): Promise<GetUserS3CredentialsResult>
function getUserS3CredentialsOutput(args: GetUserS3CredentialsOutputArgs, opts?: InvokeOptions): Output<GetUserS3CredentialsResult>
Copy
def get_user_s3_credentials(service_name: Optional[str] = None,
                            user_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetUserS3CredentialsResult
def get_user_s3_credentials_output(service_name: Optional[pulumi.Input[str]] = None,
                            user_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetUserS3CredentialsResult]
Copy
func GetUserS3Credentials(ctx *Context, args *GetUserS3CredentialsArgs, opts ...InvokeOption) (*GetUserS3CredentialsResult, error)
func GetUserS3CredentialsOutput(ctx *Context, args *GetUserS3CredentialsOutputArgs, opts ...InvokeOption) GetUserS3CredentialsResultOutput
Copy

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

public static class GetUserS3Credentials 
{
    public static Task<GetUserS3CredentialsResult> InvokeAsync(GetUserS3CredentialsArgs args, InvokeOptions? opts = null)
    public static Output<GetUserS3CredentialsResult> Invoke(GetUserS3CredentialsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUserS3CredentialsResult> getUserS3Credentials(GetUserS3CredentialsArgs args, InvokeOptions options)
public static Output<GetUserS3CredentialsResult> getUserS3Credentials(GetUserS3CredentialsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ovh:CloudProject/getUserS3Credentials:getUserS3Credentials
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
UserId
This property is required.
Changes to this property will trigger replacement.
string
The ID of a public cloud project's user.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
UserId
This property is required.
Changes to this property will trigger replacement.
string
The ID of a public cloud project's user.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
userId
This property is required.
Changes to this property will trigger replacement.
String
The ID of a public cloud project's user.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
userId
This property is required.
Changes to this property will trigger replacement.
string
The ID of a public cloud project's user.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
user_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of a public cloud project's user.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
userId
This property is required.
Changes to this property will trigger replacement.
String
The ID of a public cloud project's user.

getUserS3Credentials Result

The following output properties are available:

AccessKeyIds List<string>
The list of the Access Key ID associated with this user.
Id string
The provider-assigned unique ID for this managed resource.
ServiceName string
UserId string
AccessKeyIds []string
The list of the Access Key ID associated with this user.
Id string
The provider-assigned unique ID for this managed resource.
ServiceName string
UserId string
accessKeyIds List<String>
The list of the Access Key ID associated with this user.
id String
The provider-assigned unique ID for this managed resource.
serviceName String
userId String
accessKeyIds string[]
The list of the Access Key ID associated with this user.
id string
The provider-assigned unique ID for this managed resource.
serviceName string
userId string
access_key_ids Sequence[str]
The list of the Access Key ID associated with this user.
id str
The provider-assigned unique ID for this managed resource.
service_name str
user_id str
accessKeyIds List<String>
The list of the Access Key ID associated with this user.
id String
The provider-assigned unique ID for this managed resource.
serviceName String
userId String

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.
OVHCloud v2.1.0 published on Friday, Mar 28, 2025 by OVHcloud