Activation

class Activation : KotlinCustomResource

Registers an on-premises server or virtual machine with Amazon EC2 so that it can be managed using Run Command.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.iam.RolePolicyAttachment;
import com.pulumi.aws.iam.RolePolicyAttachmentArgs;
import com.pulumi.aws.ssm.Activation;
import com.pulumi.aws.ssm.ActivationArgs;
import com.pulumi.resources.CustomResourceOptions;
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 assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
.statements(GetPolicyDocumentStatementArgs.builder()
.effect("Allow")
.principals(GetPolicyDocumentStatementPrincipalArgs.builder()
.type("Service")
.identifiers("ssm.amazonaws.com")
.build())
.actions("sts:AssumeRole")
.build())
.build());
var testRole = new Role("testRole", RoleArgs.builder()
.assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
.build());
var testAttach = new RolePolicyAttachment("testAttach", RolePolicyAttachmentArgs.builder()
.role(testRole.name())
.policyArn("arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore")
.build());
var foo = new Activation("foo", ActivationArgs.builder()
.description("Test")
.iamRole(testRole.id())
.registrationLimit("5")
.build(), CustomResourceOptions.builder()
.dependsOn(testAttach)
.build());
}
}

Import

AWS SSM Activation can be imported using the id, e.g.,

$ pulumi import aws:ssm/activation:Activation example e488f2f6-e686-4afb-8a04-ef6dfEXAMPLE

Properties

Link copied to clipboard
val activationCode: Output<String>

The code the system generates when it processes the activation.

Link copied to clipboard
val description: Output<String>?

The description of the resource that you want to register.

Link copied to clipboard
val expirationDate: Output<String>

UTC timestamp in RFC3339 format by which this activation request should expire. The default value is 24 hours from resource creation time. This provider will only perform drift detection of its value when present in a configuration.

Link copied to clipboard
val expired: Output<Boolean>

If the current activation has expired.

Link copied to clipboard
val iamRole: Output<String>

The IAM Role to attach to the managed instance.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The default name of the registered managed instance.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val registrationCount: Output<Int>

The number of managed instances that are currently registered using this activation.

Link copied to clipboard
val registrationLimit: Output<Int>?

The maximum number of managed instances you want to register. The default value is 1 instance.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the object. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>