OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud
ovh.CloudProject.getUserS3Credentials
Explore with Pulumi AI
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);
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)
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/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
	})
}
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),
    };
});
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()));
    }
}
variables:
  myS3Credentials:
    fn::invoke:
      Function: ovh:CloudProject:getUserS3Credentials
      Arguments:
        serviceName: XXXXXX
        userId: '1234'
outputs:
  accessKeyIds: ${myS3Credentials.accessKeyIds}
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>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]func GetUserS3Credentials(ctx *Context, args *GetUserS3CredentialsArgs, opts ...InvokeOption) (*GetUserS3CredentialsResult, error)
func GetUserS3CredentialsOutput(ctx *Context, args *GetUserS3CredentialsOutputArgs, opts ...InvokeOption) GetUserS3CredentialsResultOutput> 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)
}public static CompletableFuture<GetUserS3CredentialsResult> getUserS3Credentials(GetUserS3CredentialsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: ovh:CloudProject/getUserS3Credentials:getUserS3Credentials
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Service
Name string - The ID of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. - User
Id string - The ID of a public cloud project's user.
 
- Service
Name string - The ID of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. - User
Id string - The ID of a public cloud project's user.
 
- service
Name String - The ID of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. - user
Id String - The ID of a public cloud project's user.
 
- service
Name string - The ID of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. - user
Id string - The ID of a public cloud project's user.
 
- service_
name str - The ID of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. - user_
id str - The ID of a public cloud project's user.
 
- service
Name String - The ID of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. - user
Id String - The ID of a public cloud project's user.
 
getUserS3Credentials Result
The following output properties are available:
- Access
Key List<string>Ids  - The list of the Access Key ID associated with this user.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Service
Name string - User
Id string 
- Access
Key []stringIds  - The list of the Access Key ID associated with this user.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Service
Name string - User
Id string 
- access
Key List<String>Ids  - The list of the Access Key ID associated with this user.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - service
Name String - user
Id String 
- access
Key string[]Ids  - The list of the Access Key ID associated with this user.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - service
Name string - user
Id string 
- access_
key_ Sequence[str]ids  - 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 
- access
Key List<String>Ids  - The list of the Access Key ID associated with this user.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - service
Name String - user
Id String 
Package Details
- Repository
 - ovh ovh/pulumi-ovh
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ovhTerraform Provider.