scaleway.IamApiKey
Explore with Pulumi AI
Creates and manages Scaleway IAM API Keys. For more information, please check the documentation
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const ciCd = new scaleway.IamApplication("ciCd", {});
const main = new scaleway.IamApiKey("main", {
applicationId: scaleway_iam_application.main.id,
description: "a description",
});
import pulumi
import pulumiverse_scaleway as scaleway
ci_cd = scaleway.IamApplication("ciCd")
main = scaleway.IamApiKey("main",
application_id=scaleway_iam_application["main"]["id"],
description="a description")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.NewIamApplication(ctx, "ciCd", nil)
if err != nil {
return err
}
_, err = scaleway.NewIamApiKey(ctx, "main", &scaleway.IamApiKeyArgs{
ApplicationId: pulumi.Any(scaleway_iam_application.Main.Id),
Description: pulumi.String("a description"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var ciCd = new Scaleway.IamApplication("ciCd");
var main = new Scaleway.IamApiKey("main", new()
{
ApplicationId = scaleway_iam_application.Main.Id,
Description = "a description",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.IamApplication;
import com.pulumi.scaleway.IamApiKey;
import com.pulumi.scaleway.IamApiKeyArgs;
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) {
var ciCd = new IamApplication("ciCd");
var main = new IamApiKey("main", IamApiKeyArgs.builder()
.applicationId(scaleway_iam_application.main().id())
.description("a description")
.build());
}
}
resources:
ciCd:
type: scaleway:IamApplication
main:
type: scaleway:IamApiKey
properties:
applicationId: ${scaleway_iam_application.main.id}
description: a description
Create IamApiKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamApiKey(name: string, args?: IamApiKeyArgs, opts?: CustomResourceOptions);
@overload
def IamApiKey(resource_name: str,
args: Optional[IamApiKeyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def IamApiKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
default_project_id: Optional[str] = None,
description: Optional[str] = None,
expires_at: Optional[str] = None,
user_id: Optional[str] = None)
func NewIamApiKey(ctx *Context, name string, args *IamApiKeyArgs, opts ...ResourceOption) (*IamApiKey, error)
public IamApiKey(string name, IamApiKeyArgs? args = null, CustomResourceOptions? opts = null)
public IamApiKey(String name, IamApiKeyArgs args)
public IamApiKey(String name, IamApiKeyArgs args, CustomResourceOptions options)
type: scaleway:IamApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args IamApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args IamApiKeyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IamApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamApiKeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var iamApiKeyResource = new Scaleway.IamApiKey("iamApiKeyResource", new()
{
ApplicationId = "string",
DefaultProjectId = "string",
Description = "string",
ExpiresAt = "string",
UserId = "string",
});
example, err := scaleway.NewIamApiKey(ctx, "iamApiKeyResource", &scaleway.IamApiKeyArgs{
ApplicationId: pulumi.String("string"),
DefaultProjectId: pulumi.String("string"),
Description: pulumi.String("string"),
ExpiresAt: pulumi.String("string"),
UserId: pulumi.String("string"),
})
var iamApiKeyResource = new IamApiKey("iamApiKeyResource", IamApiKeyArgs.builder()
.applicationId("string")
.defaultProjectId("string")
.description("string")
.expiresAt("string")
.userId("string")
.build());
iam_api_key_resource = scaleway.IamApiKey("iamApiKeyResource",
application_id="string",
default_project_id="string",
description="string",
expires_at="string",
user_id="string")
const iamApiKeyResource = new scaleway.IamApiKey("iamApiKeyResource", {
applicationId: "string",
defaultProjectId: "string",
description: "string",
expiresAt: "string",
userId: "string",
});
type: scaleway:IamApiKey
properties:
applicationId: string
defaultProjectId: string
description: string
expiresAt: string
userId: string
IamApiKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The IamApiKey resource accepts the following input properties:
- Application
Id string - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - Default
Project stringId - The default project ID to use with object storage.
- Description string
- The description of the iam api key.
- Expires
At string - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- User
Id string - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- Application
Id string - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - Default
Project stringId - The default project ID to use with object storage.
- Description string
- The description of the iam api key.
- Expires
At string - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- User
Id string - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- application
Id String - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - default
Project StringId - The default project ID to use with object storage.
- description String
- The description of the iam api key.
- expires
At String - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- user
Id String - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- application
Id string - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - default
Project stringId - The default project ID to use with object storage.
- description string
- The description of the iam api key.
- expires
At string - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- user
Id string - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- application_
id str - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - default_
project_ strid - The default project ID to use with object storage.
- description str
- The description of the iam api key.
- expires_
at str - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- user_
id str - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- application
Id String - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - default
Project StringId - The default project ID to use with object storage.
- description String
- The description of the iam api key.
- expires
At String - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- user
Id String - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the IamApiKey resource produces the following output properties:
- Access
Key string - The access key of the iam api key.
- Created
At string - The date and time of the creation of the iam api key.
- Creation
Ip string - The IP Address of the device which created the API key.
- Editable bool
- Whether the iam api key is editable.
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Key string - The secret Key of the iam api key.
- Updated
At string - The date and time of the last update of the iam api key.
- Access
Key string - The access key of the iam api key.
- Created
At string - The date and time of the creation of the iam api key.
- Creation
Ip string - The IP Address of the device which created the API key.
- Editable bool
- Whether the iam api key is editable.
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Key string - The secret Key of the iam api key.
- Updated
At string - The date and time of the last update of the iam api key.
- access
Key String - The access key of the iam api key.
- created
At String - The date and time of the creation of the iam api key.
- creation
Ip String - The IP Address of the device which created the API key.
- editable Boolean
- Whether the iam api key is editable.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Key String - The secret Key of the iam api key.
- updated
At String - The date and time of the last update of the iam api key.
- access
Key string - The access key of the iam api key.
- created
At string - The date and time of the creation of the iam api key.
- creation
Ip string - The IP Address of the device which created the API key.
- editable boolean
- Whether the iam api key is editable.
- id string
- The provider-assigned unique ID for this managed resource.
- secret
Key string - The secret Key of the iam api key.
- updated
At string - The date and time of the last update of the iam api key.
- access_
key str - The access key of the iam api key.
- created_
at str - The date and time of the creation of the iam api key.
- creation_
ip str - The IP Address of the device which created the API key.
- editable bool
- Whether the iam api key is editable.
- id str
- The provider-assigned unique ID for this managed resource.
- secret_
key str - The secret Key of the iam api key.
- updated_
at str - The date and time of the last update of the iam api key.
- access
Key String - The access key of the iam api key.
- created
At String - The date and time of the creation of the iam api key.
- creation
Ip String - The IP Address of the device which created the API key.
- editable Boolean
- Whether the iam api key is editable.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Key String - The secret Key of the iam api key.
- updated
At String - The date and time of the last update of the iam api key.
Look up Existing IamApiKey Resource
Get an existing IamApiKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: IamApiKeyState, opts?: CustomResourceOptions): IamApiKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key: Optional[str] = None,
application_id: Optional[str] = None,
created_at: Optional[str] = None,
creation_ip: Optional[str] = None,
default_project_id: Optional[str] = None,
description: Optional[str] = None,
editable: Optional[bool] = None,
expires_at: Optional[str] = None,
secret_key: Optional[str] = None,
updated_at: Optional[str] = None,
user_id: Optional[str] = None) -> IamApiKey
func GetIamApiKey(ctx *Context, name string, id IDInput, state *IamApiKeyState, opts ...ResourceOption) (*IamApiKey, error)
public static IamApiKey Get(string name, Input<string> id, IamApiKeyState? state, CustomResourceOptions? opts = null)
public static IamApiKey get(String name, Output<String> id, IamApiKeyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Key string - The access key of the iam api key.
- Application
Id string - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - Created
At string - The date and time of the creation of the iam api key.
- Creation
Ip string - The IP Address of the device which created the API key.
- Default
Project stringId - The default project ID to use with object storage.
- Description string
- The description of the iam api key.
- Editable bool
- Whether the iam api key is editable.
- Expires
At string - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- Secret
Key string - The secret Key of the iam api key.
- Updated
At string - The date and time of the last update of the iam api key.
- User
Id string - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- Access
Key string - The access key of the iam api key.
- Application
Id string - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - Created
At string - The date and time of the creation of the iam api key.
- Creation
Ip string - The IP Address of the device which created the API key.
- Default
Project stringId - The default project ID to use with object storage.
- Description string
- The description of the iam api key.
- Editable bool
- Whether the iam api key is editable.
- Expires
At string - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- Secret
Key string - The secret Key of the iam api key.
- Updated
At string - The date and time of the last update of the iam api key.
- User
Id string - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- access
Key String - The access key of the iam api key.
- application
Id String - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - created
At String - The date and time of the creation of the iam api key.
- creation
Ip String - The IP Address of the device which created the API key.
- default
Project StringId - The default project ID to use with object storage.
- description String
- The description of the iam api key.
- editable Boolean
- Whether the iam api key is editable.
- expires
At String - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- secret
Key String - The secret Key of the iam api key.
- updated
At String - The date and time of the last update of the iam api key.
- user
Id String - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- access
Key string - The access key of the iam api key.
- application
Id string - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - created
At string - The date and time of the creation of the iam api key.
- creation
Ip string - The IP Address of the device which created the API key.
- default
Project stringId - The default project ID to use with object storage.
- description string
- The description of the iam api key.
- editable boolean
- Whether the iam api key is editable.
- expires
At string - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- secret
Key string - The secret Key of the iam api key.
- updated
At string - The date and time of the last update of the iam api key.
- user
Id string - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- access_
key str - The access key of the iam api key.
- application_
id str - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - created_
at str - The date and time of the creation of the iam api key.
- creation_
ip str - The IP Address of the device which created the API key.
- default_
project_ strid - The default project ID to use with object storage.
- description str
- The description of the iam api key.
- editable bool
- Whether the iam api key is editable.
- expires_
at str - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- secret_
key str - The secret Key of the iam api key.
- updated_
at str - The date and time of the last update of the iam api key.
- user_
id str - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
- access
Key String - The access key of the iam api key.
- application
Id String - ID of the application attached to the api key.
Only one of the
application_id
anduser_id
should be specified. - created
At String - The date and time of the creation of the iam api key.
- creation
Ip String - The IP Address of the device which created the API key.
- default
Project StringId - The default project ID to use with object storage.
- description String
- The description of the iam api key.
- editable Boolean
- Whether the iam api key is editable.
- expires
At String - The date and time of the expiration of the iam api key. Please note that in case of change, the resource will be recreated.
- secret
Key String - The secret Key of the iam api key.
- updated
At String - The date and time of the last update of the iam api key.
- user
Id String - ID of the user attached to the api key.
Only one of the
application_id
anduser_id
should be specified.
Import
Api keys can be imported using the {id}
, e.g.
bash
$ pulumi import scaleway:index/iamApiKey:IamApiKey main 11111111111111111111
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.