spotinst.aws.Credentials
Explore with Pulumi AI
Provides a Spotinst credential AWS resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as spotinst from "@pulumi/spotinst";
// set credential AWS
const credential = new spotinst.aws.Credentials("credential", {
iamrole: "arn:aws:iam::1234567890:role/Spot_Iam_Role",
accountId: "act-123456",
});
import pulumi
import pulumi_spotinst as spotinst
# set credential AWS
credential = spotinst.aws.Credentials("credential",
iamrole="arn:aws:iam::1234567890:role/Spot_Iam_Role",
account_id="act-123456")
package main
import (
"github.com/pulumi/pulumi-spotinst/sdk/v3/go/spotinst/aws"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// set credential AWS
_, err := aws.NewCredentials(ctx, "credential", &aws.CredentialsArgs{
Iamrole: pulumi.String("arn:aws:iam::1234567890:role/Spot_Iam_Role"),
AccountId: pulumi.String("act-123456"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SpotInst = Pulumi.SpotInst;
return await Deployment.RunAsync(() =>
{
// set credential AWS
var credential = new SpotInst.Aws.Credentials("credential", new()
{
Iamrole = "arn:aws:iam::1234567890:role/Spot_Iam_Role",
AccountId = "act-123456",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spotinst.aws.Credentials;
import com.pulumi.spotinst.aws.CredentialsArgs;
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) {
// set credential AWS
var credential = new Credentials("credential", CredentialsArgs.builder()
.iamrole("arn:aws:iam::1234567890:role/Spot_Iam_Role")
.accountId("act-123456")
.build());
}
}
resources:
# set credential AWS
credential:
type: spotinst:aws:Credentials
properties:
iamrole: arn:aws:iam::1234567890:role/Spot_Iam_Role
accountId: act-123456
Create Credentials Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Credentials(name: string, args: CredentialsArgs, opts?: CustomResourceOptions);
@overload
def Credentials(resource_name: str,
args: CredentialsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Credentials(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
iamrole: Optional[str] = None)
func NewCredentials(ctx *Context, name string, args CredentialsArgs, opts ...ResourceOption) (*Credentials, error)
public Credentials(string name, CredentialsArgs args, CustomResourceOptions? opts = null)
public Credentials(String name, CredentialsArgs args)
public Credentials(String name, CredentialsArgs args, CustomResourceOptions options)
type: spotinst:aws:Credentials
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 CredentialsArgs
- 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 CredentialsArgs
- 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 CredentialsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CredentialsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CredentialsArgs
- 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 credentialsResource = new SpotInst.Aws.Credentials("credentialsResource", new()
{
AccountId = "string",
Iamrole = "string",
});
example, err := aws.NewCredentials(ctx, "credentialsResource", &aws.CredentialsArgs{
AccountId: pulumi.String("string"),
Iamrole: pulumi.String("string"),
})
var credentialsResource = new Credentials("credentialsResource", CredentialsArgs.builder()
.accountId("string")
.iamrole("string")
.build());
credentials_resource = spotinst.aws.Credentials("credentialsResource",
account_id="string",
iamrole="string")
const credentialsResource = new spotinst.aws.Credentials("credentialsResource", {
accountId: "string",
iamrole: "string",
});
type: spotinst:aws:Credentials
properties:
accountId: string
iamrole: string
Credentials Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Credentials resource accepts the following input properties:
- account_
id str - The ID of the account associated with your token.
- iamrole str
- Provide the IAM Role ARN connected to another AWS account 922761411349 and with the latest Spot Policy - https://docs.spot.io/administration/api/spot-policy-in-aws
Outputs
All input properties are implicitly available as output properties. Additionally, the Credentials resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Credentials Resource
Get an existing Credentials 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?: CredentialsState, opts?: CustomResourceOptions): Credentials
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
iamrole: Optional[str] = None) -> Credentials
func GetCredentials(ctx *Context, name string, id IDInput, state *CredentialsState, opts ...ResourceOption) (*Credentials, error)
public static Credentials Get(string name, Input<string> id, CredentialsState? state, CustomResourceOptions? opts = null)
public static Credentials get(String name, Output<String> id, CredentialsState 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.
- account_
id str - The ID of the account associated with your token.
- iamrole str
- Provide the IAM Role ARN connected to another AWS account 922761411349 and with the latest Spot Policy - https://docs.spot.io/administration/api/spot-policy-in-aws
Package Details
- Repository
- Spotinst pulumi/pulumi-spotinst
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
spotinst
Terraform Provider.