Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.ssm.AssociationArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.ssm;
import com.pulumi.aws.ssm.inputs.AssociationOutputLocationArgs;
import com.pulumi.aws.ssm.inputs.AssociationTargetArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class AssociationArgs extends com.pulumi.resources.ResourceArgs {
public static final AssociationArgs Empty = new AssociationArgs();
/**
* By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: `false`.
*
*/
@Import(name="applyOnlyAtCronInterval")
private @Nullable Output applyOnlyAtCronInterval;
/**
* @return By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: `false`.
*
*/
public Optional> applyOnlyAtCronInterval() {
return Optional.ofNullable(this.applyOnlyAtCronInterval);
}
/**
* The descriptive name for the association.
*
*/
@Import(name="associationName")
private @Nullable Output associationName;
/**
* @return The descriptive name for the association.
*
*/
public Optional> associationName() {
return Optional.ofNullable(this.associationName);
}
/**
* Specify the target for the association. This target is required for associations that use an `Automation` document and target resources by using rate controls. This should be set to the SSM document `parameter` that will define how your automation will branch out.
*
*/
@Import(name="automationTargetParameterName")
private @Nullable Output automationTargetParameterName;
/**
* @return Specify the target for the association. This target is required for associations that use an `Automation` document and target resources by using rate controls. This should be set to the SSM document `parameter` that will define how your automation will branch out.
*
*/
public Optional> automationTargetParameterName() {
return Optional.ofNullable(this.automationTargetParameterName);
}
/**
* The compliance severity for the association. Can be one of the following: `UNSPECIFIED`, `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`
*
*/
@Import(name="complianceSeverity")
private @Nullable Output complianceSeverity;
/**
* @return The compliance severity for the association. Can be one of the following: `UNSPECIFIED`, `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`
*
*/
public Optional> complianceSeverity() {
return Optional.ofNullable(this.complianceSeverity);
}
/**
* The document version you want to associate with the target(s). Can be a specific version or the default version.
*
*/
@Import(name="documentVersion")
private @Nullable Output documentVersion;
/**
* @return The document version you want to associate with the target(s). Can be a specific version or the default version.
*
*/
public Optional> documentVersion() {
return Optional.ofNullable(this.documentVersion);
}
/**
* The instance ID to apply an SSM document to. Use `targets` with key `InstanceIds` for document schema versions 2.0 and above. Use the `targets` attribute instead.
*
* @deprecated
* use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId
*
*/
@Deprecated /* use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId */
@Import(name="instanceId")
private @Nullable Output instanceId;
/**
* @return The instance ID to apply an SSM document to. Use `targets` with key `InstanceIds` for document schema versions 2.0 and above. Use the `targets` attribute instead.
*
* @deprecated
* use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId
*
*/
@Deprecated /* use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId */
public Optional> instanceId() {
return Optional.ofNullable(this.instanceId);
}
/**
* The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
*
*/
@Import(name="maxConcurrency")
private @Nullable Output maxConcurrency;
/**
* @return The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
*
*/
public Optional> maxConcurrency() {
return Optional.ofNullable(this.maxConcurrency);
}
/**
* The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
*
*/
@Import(name="maxErrors")
private @Nullable Output maxErrors;
/**
* @return The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
*
*/
public Optional> maxErrors() {
return Optional.ofNullable(this.maxErrors);
}
/**
* The name of the SSM document to apply.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The name of the SSM document to apply.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* An output location block. Output Location is documented below.
*
*/
@Import(name="outputLocation")
private @Nullable Output outputLocation;
/**
* @return An output location block. Output Location is documented below.
*
*/
public Optional> outputLocation() {
return Optional.ofNullable(this.outputLocation);
}
/**
* A block of arbitrary string parameters to pass to the SSM document.
*
*/
@Import(name="parameters")
private @Nullable Output> parameters;
/**
* @return A block of arbitrary string parameters to pass to the SSM document.
*
*/
public Optional>> parameters() {
return Optional.ofNullable(this.parameters);
}
/**
* A [cron or rate expression](https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html) that specifies when the association runs.
*
*/
@Import(name="scheduleExpression")
private @Nullable Output scheduleExpression;
/**
* @return A [cron or rate expression](https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html) that specifies when the association runs.
*
*/
public Optional> scheduleExpression() {
return Optional.ofNullable(this.scheduleExpression);
}
/**
* The mode for generating association compliance. You can specify `AUTO` or `MANUAL`.
*
*/
@Import(name="syncCompliance")
private @Nullable Output syncCompliance;
/**
* @return The mode for generating association compliance. You can specify `AUTO` or `MANUAL`.
*
*/
public Optional> syncCompliance() {
return Optional.ofNullable(this.syncCompliance);
}
/**
* 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.
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return 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.
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
*
*/
@Import(name="targets")
private @Nullable Output> targets;
/**
* @return A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
*
*/
public Optional>> targets() {
return Optional.ofNullable(this.targets);
}
/**
* The number of seconds to wait for the association status to be `Success`. If `Success` status is not reached within the given time, create opration will fail.
*
* Output Location (`output_location`) is an S3 bucket where you want to store the results of this association:
*
*/
@Import(name="waitForSuccessTimeoutSeconds")
private @Nullable Output waitForSuccessTimeoutSeconds;
/**
* @return The number of seconds to wait for the association status to be `Success`. If `Success` status is not reached within the given time, create opration will fail.
*
* Output Location (`output_location`) is an S3 bucket where you want to store the results of this association:
*
*/
public Optional> waitForSuccessTimeoutSeconds() {
return Optional.ofNullable(this.waitForSuccessTimeoutSeconds);
}
private AssociationArgs() {}
private AssociationArgs(AssociationArgs $) {
this.applyOnlyAtCronInterval = $.applyOnlyAtCronInterval;
this.associationName = $.associationName;
this.automationTargetParameterName = $.automationTargetParameterName;
this.complianceSeverity = $.complianceSeverity;
this.documentVersion = $.documentVersion;
this.instanceId = $.instanceId;
this.maxConcurrency = $.maxConcurrency;
this.maxErrors = $.maxErrors;
this.name = $.name;
this.outputLocation = $.outputLocation;
this.parameters = $.parameters;
this.scheduleExpression = $.scheduleExpression;
this.syncCompliance = $.syncCompliance;
this.tags = $.tags;
this.targets = $.targets;
this.waitForSuccessTimeoutSeconds = $.waitForSuccessTimeoutSeconds;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AssociationArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private AssociationArgs $;
public Builder() {
$ = new AssociationArgs();
}
public Builder(AssociationArgs defaults) {
$ = new AssociationArgs(Objects.requireNonNull(defaults));
}
/**
* @param applyOnlyAtCronInterval By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: `false`.
*
* @return builder
*
*/
public Builder applyOnlyAtCronInterval(@Nullable Output applyOnlyAtCronInterval) {
$.applyOnlyAtCronInterval = applyOnlyAtCronInterval;
return this;
}
/**
* @param applyOnlyAtCronInterval By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: `false`.
*
* @return builder
*
*/
public Builder applyOnlyAtCronInterval(Boolean applyOnlyAtCronInterval) {
return applyOnlyAtCronInterval(Output.of(applyOnlyAtCronInterval));
}
/**
* @param associationName The descriptive name for the association.
*
* @return builder
*
*/
public Builder associationName(@Nullable Output associationName) {
$.associationName = associationName;
return this;
}
/**
* @param associationName The descriptive name for the association.
*
* @return builder
*
*/
public Builder associationName(String associationName) {
return associationName(Output.of(associationName));
}
/**
* @param automationTargetParameterName Specify the target for the association. This target is required for associations that use an `Automation` document and target resources by using rate controls. This should be set to the SSM document `parameter` that will define how your automation will branch out.
*
* @return builder
*
*/
public Builder automationTargetParameterName(@Nullable Output automationTargetParameterName) {
$.automationTargetParameterName = automationTargetParameterName;
return this;
}
/**
* @param automationTargetParameterName Specify the target for the association. This target is required for associations that use an `Automation` document and target resources by using rate controls. This should be set to the SSM document `parameter` that will define how your automation will branch out.
*
* @return builder
*
*/
public Builder automationTargetParameterName(String automationTargetParameterName) {
return automationTargetParameterName(Output.of(automationTargetParameterName));
}
/**
* @param complianceSeverity The compliance severity for the association. Can be one of the following: `UNSPECIFIED`, `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`
*
* @return builder
*
*/
public Builder complianceSeverity(@Nullable Output complianceSeverity) {
$.complianceSeverity = complianceSeverity;
return this;
}
/**
* @param complianceSeverity The compliance severity for the association. Can be one of the following: `UNSPECIFIED`, `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`
*
* @return builder
*
*/
public Builder complianceSeverity(String complianceSeverity) {
return complianceSeverity(Output.of(complianceSeverity));
}
/**
* @param documentVersion The document version you want to associate with the target(s). Can be a specific version or the default version.
*
* @return builder
*
*/
public Builder documentVersion(@Nullable Output documentVersion) {
$.documentVersion = documentVersion;
return this;
}
/**
* @param documentVersion The document version you want to associate with the target(s). Can be a specific version or the default version.
*
* @return builder
*
*/
public Builder documentVersion(String documentVersion) {
return documentVersion(Output.of(documentVersion));
}
/**
* @param instanceId The instance ID to apply an SSM document to. Use `targets` with key `InstanceIds` for document schema versions 2.0 and above. Use the `targets` attribute instead.
*
* @return builder
*
* @deprecated
* use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId
*
*/
@Deprecated /* use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId */
public Builder instanceId(@Nullable Output instanceId) {
$.instanceId = instanceId;
return this;
}
/**
* @param instanceId The instance ID to apply an SSM document to. Use `targets` with key `InstanceIds` for document schema versions 2.0 and above. Use the `targets` attribute instead.
*
* @return builder
*
* @deprecated
* use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId
*
*/
@Deprecated /* use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId */
public Builder instanceId(String instanceId) {
return instanceId(Output.of(instanceId));
}
/**
* @param maxConcurrency The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
*
* @return builder
*
*/
public Builder maxConcurrency(@Nullable Output maxConcurrency) {
$.maxConcurrency = maxConcurrency;
return this;
}
/**
* @param maxConcurrency The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
*
* @return builder
*
*/
public Builder maxConcurrency(String maxConcurrency) {
return maxConcurrency(Output.of(maxConcurrency));
}
/**
* @param maxErrors The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
*
* @return builder
*
*/
public Builder maxErrors(@Nullable Output maxErrors) {
$.maxErrors = maxErrors;
return this;
}
/**
* @param maxErrors The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
*
* @return builder
*
*/
public Builder maxErrors(String maxErrors) {
return maxErrors(Output.of(maxErrors));
}
/**
* @param name The name of the SSM document to apply.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The name of the SSM document to apply.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param outputLocation An output location block. Output Location is documented below.
*
* @return builder
*
*/
public Builder outputLocation(@Nullable Output outputLocation) {
$.outputLocation = outputLocation;
return this;
}
/**
* @param outputLocation An output location block. Output Location is documented below.
*
* @return builder
*
*/
public Builder outputLocation(AssociationOutputLocationArgs outputLocation) {
return outputLocation(Output.of(outputLocation));
}
/**
* @param parameters A block of arbitrary string parameters to pass to the SSM document.
*
* @return builder
*
*/
public Builder parameters(@Nullable Output> parameters) {
$.parameters = parameters;
return this;
}
/**
* @param parameters A block of arbitrary string parameters to pass to the SSM document.
*
* @return builder
*
*/
public Builder parameters(Map parameters) {
return parameters(Output.of(parameters));
}
/**
* @param scheduleExpression A [cron or rate expression](https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html) that specifies when the association runs.
*
* @return builder
*
*/
public Builder scheduleExpression(@Nullable Output scheduleExpression) {
$.scheduleExpression = scheduleExpression;
return this;
}
/**
* @param scheduleExpression A [cron or rate expression](https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html) that specifies when the association runs.
*
* @return builder
*
*/
public Builder scheduleExpression(String scheduleExpression) {
return scheduleExpression(Output.of(scheduleExpression));
}
/**
* @param syncCompliance The mode for generating association compliance. You can specify `AUTO` or `MANUAL`.
*
* @return builder
*
*/
public Builder syncCompliance(@Nullable Output syncCompliance) {
$.syncCompliance = syncCompliance;
return this;
}
/**
* @param syncCompliance The mode for generating association compliance. You can specify `AUTO` or `MANUAL`.
*
* @return builder
*
*/
public Builder syncCompliance(String syncCompliance) {
return syncCompliance(Output.of(syncCompliance));
}
/**
* @param tags 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.
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags 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.
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
/**
* @param targets A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
*
* @return builder
*
*/
public Builder targets(@Nullable Output> targets) {
$.targets = targets;
return this;
}
/**
* @param targets A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
*
* @return builder
*
*/
public Builder targets(List targets) {
return targets(Output.of(targets));
}
/**
* @param targets A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
*
* @return builder
*
*/
public Builder targets(AssociationTargetArgs... targets) {
return targets(List.of(targets));
}
/**
* @param waitForSuccessTimeoutSeconds The number of seconds to wait for the association status to be `Success`. If `Success` status is not reached within the given time, create opration will fail.
*
* Output Location (`output_location`) is an S3 bucket where you want to store the results of this association:
*
* @return builder
*
*/
public Builder waitForSuccessTimeoutSeconds(@Nullable Output waitForSuccessTimeoutSeconds) {
$.waitForSuccessTimeoutSeconds = waitForSuccessTimeoutSeconds;
return this;
}
/**
* @param waitForSuccessTimeoutSeconds The number of seconds to wait for the association status to be `Success`. If `Success` status is not reached within the given time, create opration will fail.
*
* Output Location (`output_location`) is an S3 bucket where you want to store the results of this association:
*
* @return builder
*
*/
public Builder waitForSuccessTimeoutSeconds(Integer waitForSuccessTimeoutSeconds) {
return waitForSuccessTimeoutSeconds(Output.of(waitForSuccessTimeoutSeconds));
}
public AssociationArgs build() {
return $;
}
}
}