Try AWS Native preview for resources not in the classic version.
aws.iam.SigningCertificate
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides an IAM Signing Certificate resource to upload Signing Certificates.
Note: All arguments including the certificate body will be stored in the raw state as plain-text.
Example Usage
Using certs on file:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const testCert = new aws.iam.SigningCertificate("test_cert", {
username: "some_test_cert",
certificateBody: std.file({
input: "self-ca-cert.pem",
}).then(invoke => invoke.result),
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
test_cert = aws.iam.SigningCertificate("test_cert",
username="some_test_cert",
certificate_body=std.file(input="self-ca-cert.pem").result)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
invokeFile, err := std.File(ctx, &std.FileArgs{
Input: "self-ca-cert.pem",
}, nil)
if err != nil {
return err
}
_, err = iam.NewSigningCertificate(ctx, "test_cert", &iam.SigningCertificateArgs{
Username: pulumi.String("some_test_cert"),
CertificateBody: invokeFile.Result,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var testCert = new Aws.Iam.SigningCertificate("test_cert", new()
{
Username = "some_test_cert",
CertificateBody = Std.File.Invoke(new()
{
Input = "self-ca-cert.pem",
}).Apply(invoke => invoke.Result),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.SigningCertificate;
import com.pulumi.aws.iam.SigningCertificateArgs;
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 testCert = new SigningCertificate("testCert", SigningCertificateArgs.builder()
.username("some_test_cert")
.certificateBody(StdFunctions.file(FileArgs.builder()
.input("self-ca-cert.pem")
.build()).result())
.build());
}
}
resources:
testCert:
type: aws:iam:SigningCertificate
name: test_cert
properties:
username: some_test_cert
certificateBody:
fn::invoke:
Function: std:file
Arguments:
input: self-ca-cert.pem
Return: result
Example with cert in-line:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const testCertAlt = new aws.iam.SigningCertificate("test_cert_alt", {
username: "some_test_cert",
certificateBody: `-----BEGIN CERTIFICATE-----
[......] # cert contents
-----END CERTIFICATE-----
`,
});
import pulumi
import pulumi_aws as aws
test_cert_alt = aws.iam.SigningCertificate("test_cert_alt",
username="some_test_cert",
certificate_body="""-----BEGIN CERTIFICATE-----
[......] # cert contents
-----END CERTIFICATE-----
""")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := iam.NewSigningCertificate(ctx, "test_cert_alt", &iam.SigningCertificateArgs{
Username: pulumi.String("some_test_cert"),
CertificateBody: pulumi.String("-----BEGIN CERTIFICATE-----\n[......] # cert contents\n-----END CERTIFICATE-----\n"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var testCertAlt = new Aws.Iam.SigningCertificate("test_cert_alt", new()
{
Username = "some_test_cert",
CertificateBody = @"-----BEGIN CERTIFICATE-----
[......] # cert contents
-----END CERTIFICATE-----
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.SigningCertificate;
import com.pulumi.aws.iam.SigningCertificateArgs;
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 testCertAlt = new SigningCertificate("testCertAlt", SigningCertificateArgs.builder()
.username("some_test_cert")
.certificateBody("""
-----BEGIN CERTIFICATE-----
[......] # cert contents
-----END CERTIFICATE-----
""")
.build());
}
}
resources:
testCertAlt:
type: aws:iam:SigningCertificate
name: test_cert_alt
properties:
username: some_test_cert
certificateBody: |
-----BEGIN CERTIFICATE-----
[......] # cert contents
-----END CERTIFICATE-----
Create SigningCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SigningCertificate(name: string, args: SigningCertificateArgs, opts?: CustomResourceOptions);
@overload
def SigningCertificate(resource_name: str,
args: SigningCertificateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SigningCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
certificate_body: Optional[str] = None,
user_name: Optional[str] = None,
status: Optional[str] = None)
func NewSigningCertificate(ctx *Context, name string, args SigningCertificateArgs, opts ...ResourceOption) (*SigningCertificate, error)
public SigningCertificate(string name, SigningCertificateArgs args, CustomResourceOptions? opts = null)
public SigningCertificate(String name, SigningCertificateArgs args)
public SigningCertificate(String name, SigningCertificateArgs args, CustomResourceOptions options)
type: aws:iam:SigningCertificate
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 SigningCertificateArgs
- 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 SigningCertificateArgs
- 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 SigningCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SigningCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SigningCertificateArgs
- 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 signingCertificateResource = new Aws.Iam.SigningCertificate("signingCertificateResource", new()
{
CertificateBody = "string",
UserName = "string",
Status = "string",
});
example, err := iam.NewSigningCertificate(ctx, "signingCertificateResource", &iam.SigningCertificateArgs{
CertificateBody: pulumi.String("string"),
UserName: pulumi.String("string"),
Status: pulumi.String("string"),
})
var signingCertificateResource = new SigningCertificate("signingCertificateResource", SigningCertificateArgs.builder()
.certificateBody("string")
.userName("string")
.status("string")
.build());
signing_certificate_resource = aws.iam.SigningCertificate("signingCertificateResource",
certificate_body="string",
user_name="string",
status="string")
const signingCertificateResource = new aws.iam.SigningCertificate("signingCertificateResource", {
certificateBody: "string",
userName: "string",
status: "string",
});
type: aws:iam:SigningCertificate
properties:
certificateBody: string
status: string
userName: string
SigningCertificate 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 SigningCertificate resource accepts the following input properties:
- Certificate
Body string - The contents of the signing certificate in PEM-encoded format.
- User
Name string - The name of the user the signing certificate is for.
- Status string
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used.
- Certificate
Body string - The contents of the signing certificate in PEM-encoded format.
- User
Name string - The name of the user the signing certificate is for.
- Status string
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used.
- certificate
Body String - The contents of the signing certificate in PEM-encoded format.
- user
Name String - The name of the user the signing certificate is for.
- status String
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used.
- certificate
Body string - The contents of the signing certificate in PEM-encoded format.
- user
Name string - The name of the user the signing certificate is for.
- status string
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used.
- certificate_
body str - The contents of the signing certificate in PEM-encoded format.
- user_
name str - The name of the user the signing certificate is for.
- status str
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used.
- certificate
Body String - The contents of the signing certificate in PEM-encoded format.
- user
Name String - The name of the user the signing certificate is for.
- status String
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used.
Outputs
All input properties are implicitly available as output properties. Additionally, the SigningCertificate resource produces the following output properties:
- Certificate
Id string - The ID for the signing certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- Certificate
Id string - The ID for the signing certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- certificate
Id String - The ID for the signing certificate.
- id String
- The provider-assigned unique ID for this managed resource.
- certificate
Id string - The ID for the signing certificate.
- id string
- The provider-assigned unique ID for this managed resource.
- certificate_
id str - The ID for the signing certificate.
- id str
- The provider-assigned unique ID for this managed resource.
- certificate
Id String - The ID for the signing certificate.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SigningCertificate Resource
Get an existing SigningCertificate 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?: SigningCertificateState, opts?: CustomResourceOptions): SigningCertificate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
certificate_body: Optional[str] = None,
certificate_id: Optional[str] = None,
status: Optional[str] = None,
user_name: Optional[str] = None) -> SigningCertificate
func GetSigningCertificate(ctx *Context, name string, id IDInput, state *SigningCertificateState, opts ...ResourceOption) (*SigningCertificate, error)
public static SigningCertificate Get(string name, Input<string> id, SigningCertificateState? state, CustomResourceOptions? opts = null)
public static SigningCertificate get(String name, Output<String> id, SigningCertificateState 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.
- Certificate
Body string - The contents of the signing certificate in PEM-encoded format.
- Certificate
Id string - The ID for the signing certificate.
- Status string
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used. - User
Name string - The name of the user the signing certificate is for.
- Certificate
Body string - The contents of the signing certificate in PEM-encoded format.
- Certificate
Id string - The ID for the signing certificate.
- Status string
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used. - User
Name string - The name of the user the signing certificate is for.
- certificate
Body String - The contents of the signing certificate in PEM-encoded format.
- certificate
Id String - The ID for the signing certificate.
- status String
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used. - user
Name String - The name of the user the signing certificate is for.
- certificate
Body string - The contents of the signing certificate in PEM-encoded format.
- certificate
Id string - The ID for the signing certificate.
- status string
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used. - user
Name string - The name of the user the signing certificate is for.
- certificate_
body str - The contents of the signing certificate in PEM-encoded format.
- certificate_
id str - The ID for the signing certificate.
- status str
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used. - user_
name str - The name of the user the signing certificate is for.
- certificate
Body String - The contents of the signing certificate in PEM-encoded format.
- certificate
Id String - The ID for the signing certificate.
- status String
- The status you want to assign to the certificate.
Active
means that the certificate can be used for programmatic calls to Amazon Web ServicesInactive
means that the certificate cannot be used. - user
Name String - The name of the user the signing certificate is for.
Import
Using pulumi import
, import IAM Signing Certificates using the id
. For example:
$ pulumi import aws:iam/signingCertificate:SigningCertificate certificate IDIDIDIDID:user-name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.