outscale 1.0.1 published on Thursday, Mar 13, 2025 by outscale
outscale.getAccessKeys
Explore with Pulumi AI
Provides information about access keys.
For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.
Example Usage
Get your own access keys (root account or user)
import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";
const accessKeys01 = outscale.getAccessKeys({
filters: [{
name: "access_key_ids",
values: [
"ABCDEFGHIJ0123456789",
"0123456789ABCDEFGHIJ",
],
}],
});
import pulumi
import pulumi_outscale as outscale
access_keys01 = outscale.get_access_keys(filters=[{
"name": "access_key_ids",
"values": [
"ABCDEFGHIJ0123456789",
"0123456789ABCDEFGHIJ",
],
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := outscale.GetAccessKeys(ctx, &outscale.GetAccessKeysArgs{
Filters: []outscale.GetAccessKeysFilter{
{
Name: "access_key_ids",
Values: []string{
"ABCDEFGHIJ0123456789",
"0123456789ABCDEFGHIJ",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;
return await Deployment.RunAsync(() =>
{
var accessKeys01 = Outscale.GetAccessKeys.Invoke(new()
{
Filters = new[]
{
new Outscale.Inputs.GetAccessKeysFilterInputArgs
{
Name = "access_key_ids",
Values = new[]
{
"ABCDEFGHIJ0123456789",
"0123456789ABCDEFGHIJ",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetAccessKeysArgs;
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 accessKeys01 = OutscaleFunctions.getAccessKeys(GetAccessKeysArgs.builder()
.filters(GetAccessKeysFilterArgs.builder()
.name("access_key_ids")
.values(
"ABCDEFGHIJ0123456789",
"0123456789ABCDEFGHIJ")
.build())
.build());
}
}
variables:
accessKeys01:
fn::invoke:
function: outscale:getAccessKeys
arguments:
filters:
- name: access_key_ids
values:
- ABCDEFGHIJ0123456789
- 0123456789ABCDEFGHIJ
Get the access keys of another user
import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";
const accessKeys = outscale.getAccessKeys({
filters: [
{
name: "access_key_ids",
values: [
"XXXXXXXXX",
"YYYYYYYYYY",
],
},
{
name: "states",
values: ["ACTIVE"],
},
],
userName: "user_name",
});
import pulumi
import pulumi_outscale as outscale
access_keys = outscale.get_access_keys(filters=[
{
"name": "access_key_ids",
"values": [
"XXXXXXXXX",
"YYYYYYYYYY",
],
},
{
"name": "states",
"values": ["ACTIVE"],
},
],
user_name="user_name")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := outscale.GetAccessKeys(ctx, &outscale.GetAccessKeysArgs{
Filters: []outscale.GetAccessKeysFilter{
{
Name: "access_key_ids",
Values: []string{
"XXXXXXXXX",
"YYYYYYYYYY",
},
},
{
Name: "states",
Values: []string{
"ACTIVE",
},
},
},
UserName: pulumi.StringRef("user_name"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;
return await Deployment.RunAsync(() =>
{
var accessKeys = Outscale.GetAccessKeys.Invoke(new()
{
Filters = new[]
{
new Outscale.Inputs.GetAccessKeysFilterInputArgs
{
Name = "access_key_ids",
Values = new[]
{
"XXXXXXXXX",
"YYYYYYYYYY",
},
},
new Outscale.Inputs.GetAccessKeysFilterInputArgs
{
Name = "states",
Values = new[]
{
"ACTIVE",
},
},
},
UserName = "user_name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetAccessKeysArgs;
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 accessKeys = OutscaleFunctions.getAccessKeys(GetAccessKeysArgs.builder()
.filters(
GetAccessKeysFilterArgs.builder()
.name("access_key_ids")
.values(
"XXXXXXXXX",
"YYYYYYYYYY")
.build(),
GetAccessKeysFilterArgs.builder()
.name("states")
.values("ACTIVE")
.build())
.userName("user_name")
.build());
}
}
variables:
accessKeys:
fn::invoke:
function: outscale:getAccessKeys
arguments:
filters:
- name: access_key_ids
values:
- XXXXXXXXX
- YYYYYYYYYY
- name: states
values:
- ACTIVE
userName: user_name
Using getAccessKeys
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 getAccessKeys(args: GetAccessKeysArgs, opts?: InvokeOptions): Promise<GetAccessKeysResult>
function getAccessKeysOutput(args: GetAccessKeysOutputArgs, opts?: InvokeOptions): Output<GetAccessKeysResult>
def get_access_keys(access_key_ids: Optional[Sequence[str]] = None,
filters: Optional[Sequence[GetAccessKeysFilter]] = None,
id: Optional[str] = None,
states: Optional[Sequence[str]] = None,
user_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccessKeysResult
def get_access_keys_output(access_key_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAccessKeysFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
states: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
user_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccessKeysResult]
func GetAccessKeys(ctx *Context, args *GetAccessKeysArgs, opts ...InvokeOption) (*GetAccessKeysResult, error)
func GetAccessKeysOutput(ctx *Context, args *GetAccessKeysOutputArgs, opts ...InvokeOption) GetAccessKeysResultOutput
> Note: This function is named GetAccessKeys
in the Go SDK.
public static class GetAccessKeys
{
public static Task<GetAccessKeysResult> InvokeAsync(GetAccessKeysArgs args, InvokeOptions? opts = null)
public static Output<GetAccessKeysResult> Invoke(GetAccessKeysInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccessKeysResult> getAccessKeys(GetAccessKeysArgs args, InvokeOptions options)
public static Output<GetAccessKeysResult> getAccessKeys(GetAccessKeysArgs args, InvokeOptions options)
fn::invoke:
function: outscale:index/getAccessKeys:getAccessKeys
arguments:
# arguments dictionary
The following arguments are supported:
- Access
Key List<string>Ids - Filters
List<Get
Access Keys Filter> - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- Id string
- States List<string>
- User
Name string - The name of the EIM user. By default, the user who sends the request (which can be the root account).
- Access
Key []stringIds - Filters
[]Get
Access Keys Filter - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- Id string
- States []string
- User
Name string - The name of the EIM user. By default, the user who sends the request (which can be the root account).
- access
Key List<String>Ids - filters
List<Get
Access Keys Filter> - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id String
- states List<String>
- user
Name String - The name of the EIM user. By default, the user who sends the request (which can be the root account).
- access
Key string[]Ids - filters
Get
Access Keys Filter[] - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id string
- states string[]
- user
Name string - The name of the EIM user. By default, the user who sends the request (which can be the root account).
- access_
key_ Sequence[str]ids - filters
Sequence[Get
Access Keys Filter] - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id str
- states Sequence[str]
- user_
name str - The name of the EIM user. By default, the user who sends the request (which can be the root account).
- access
Key List<String>Ids - filters List<Property Map>
- A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id String
- states List<String>
- user
Name String - The name of the EIM user. By default, the user who sends the request (which can be the root account).
getAccessKeys Result
The following output properties are available:
- Access
Keys List<GetAccess Keys Access Key> - A list of access keys.
- Id string
- Request
Id string - Access
Key List<string>Ids - Filters
List<Get
Access Keys Filter> - States List<string>
- User
Name string
- Access
Keys []GetAccess Keys Access Key - A list of access keys.
- Id string
- Request
Id string - Access
Key []stringIds - Filters
[]Get
Access Keys Filter - States []string
- User
Name string
- access
Keys List<GetAccess Keys Access Key> - A list of access keys.
- id String
- request
Id String - access
Key List<String>Ids - filters
List<Get
Access Keys Filter> - states List<String>
- user
Name String
- access
Keys GetAccess Keys Access Key[] - A list of access keys.
- id string
- request
Id string - access
Key string[]Ids - filters
Get
Access Keys Filter[] - states string[]
- user
Name string
- access_
keys Sequence[GetAccess Keys Access Key] - A list of access keys.
- id str
- request_
id str - access_
key_ Sequence[str]ids - filters
Sequence[Get
Access Keys Filter] - states Sequence[str]
- user_
name str
- access
Keys List<Property Map> - A list of access keys.
- id String
- request
Id String - access
Key List<String>Ids - filters List<Property Map>
- states List<String>
- user
Name String
Supporting Types
GetAccessKeysAccessKey
- Access
Key stringId - The ID of the access key.
- Creation
Date string - The date and time (UTC) at which the access key was created.
- Expiration
Date string - The date and time (UTC) at which the access key expires.
- Last
Modification stringDate - The date and time (UTC) at which the access key was last modified.
- State string
- The state of the access key (
ACTIVE
if the key is valid for API calls, orINACTIVE
if not).
- Access
Key stringId - The ID of the access key.
- Creation
Date string - The date and time (UTC) at which the access key was created.
- Expiration
Date string - The date and time (UTC) at which the access key expires.
- Last
Modification stringDate - The date and time (UTC) at which the access key was last modified.
- State string
- The state of the access key (
ACTIVE
if the key is valid for API calls, orINACTIVE
if not).
- access
Key StringId - The ID of the access key.
- creation
Date String - The date and time (UTC) at which the access key was created.
- expiration
Date String - The date and time (UTC) at which the access key expires.
- last
Modification StringDate - The date and time (UTC) at which the access key was last modified.
- state String
- The state of the access key (
ACTIVE
if the key is valid for API calls, orINACTIVE
if not).
- access
Key stringId - The ID of the access key.
- creation
Date string - The date and time (UTC) at which the access key was created.
- expiration
Date string - The date and time (UTC) at which the access key expires.
- last
Modification stringDate - The date and time (UTC) at which the access key was last modified.
- state string
- The state of the access key (
ACTIVE
if the key is valid for API calls, orINACTIVE
if not).
- access_
key_ strid - The ID of the access key.
- creation_
date str - The date and time (UTC) at which the access key was created.
- expiration_
date str - The date and time (UTC) at which the access key expires.
- last_
modification_ strdate - The date and time (UTC) at which the access key was last modified.
- state str
- The state of the access key (
ACTIVE
if the key is valid for API calls, orINACTIVE
if not).
- access
Key StringId - The ID of the access key.
- creation
Date String - The date and time (UTC) at which the access key was created.
- expiration
Date String - The date and time (UTC) at which the access key expires.
- last
Modification StringDate - The date and time (UTC) at which the access key was last modified.
- state String
- The state of the access key (
ACTIVE
if the key is valid for API calls, orINACTIVE
if not).
GetAccessKeysFilter
Package Details
- Repository
- outscale outscale/terraform-provider-outscale
- License
- Notes
- This Pulumi package is based on the
outscale
Terraform Provider.