/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.config.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A list that contains detailed configurations of a specified resource. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ConfigurationItem implements Serializable, Cloneable, StructuredPojo { /** ** The version number of the resource configuration. *
*/ private String version; /** ** The 12-digit Amazon Web Services account ID associated with the resource. *
*/ private String accountId; /** ** The time when the configuration recording was initiated. *
*/ private java.util.Date configurationItemCaptureTime; /** ** The configuration item status. The valid values are: *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** The CIs do not incur any cost. *
** An identifier that indicates the ordering of the configuration items of a resource. *
*/ private String configurationStateId; /** ** Unique MD5 hash that represents the configuration item's state. *
** You can use MD5 hash to compare the states of two or more configuration items that are associated with the same * resource. *
*/ private String configurationItemMD5Hash; /** ** Amazon Resource Name (ARN) associated with the resource. *
*/ private String arn; /** ** The type of Amazon Web Services resource. *
*/ private String resourceType; /** *
* The ID of the resource (for example, sg-xxxxxx
).
*
* The custom name of the resource, if available. *
*/ private String resourceName; /** ** The region where the resource resides. *
*/ private String awsRegion; /** ** The Availability Zone associated with the resource. *
*/ private String availabilityZone; /** ** The time stamp when the resource was created. *
*/ private java.util.Date resourceCreationTime; /** ** A mapping of key value tags associated with the resource. *
*/ private java.util.Map* A list of CloudTrail event IDs. *
** A populated field indicates that the current configuration was initiated by the events recorded in the CloudTrail * log. For more information about CloudTrail, see What Is * CloudTrail. *
** An empty field indicates that the current configuration was not initiated by any event. As of Version 1.3, the * relatedEvents field is empty. You can access the LookupEvents API * in the CloudTrail API Reference to retrieve the events for the resource. *
*/ private com.amazonaws.internal.SdkInternalList* A list of related Amazon Web Services resources. *
*/ private com.amazonaws.internal.SdkInternalList* The description of the resource configuration. *
*/ private String configuration; /** *
* Configuration attributes that Config returns for certain resource types to supplement the information returned
* for the configuration
parameter.
*
* The version number of the resource configuration. *
* * @param version * The version number of the resource configuration. */ public void setVersion(String version) { this.version = version; } /** ** The version number of the resource configuration. *
* * @return The version number of the resource configuration. */ public String getVersion() { return this.version; } /** ** The version number of the resource configuration. *
* * @param version * The version number of the resource configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withVersion(String version) { setVersion(version); return this; } /** ** The 12-digit Amazon Web Services account ID associated with the resource. *
* * @param accountId * The 12-digit Amazon Web Services account ID associated with the resource. */ public void setAccountId(String accountId) { this.accountId = accountId; } /** ** The 12-digit Amazon Web Services account ID associated with the resource. *
* * @return The 12-digit Amazon Web Services account ID associated with the resource. */ public String getAccountId() { return this.accountId; } /** ** The 12-digit Amazon Web Services account ID associated with the resource. *
* * @param accountId * The 12-digit Amazon Web Services account ID associated with the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withAccountId(String accountId) { setAccountId(accountId); return this; } /** ** The time when the configuration recording was initiated. *
* * @param configurationItemCaptureTime * The time when the configuration recording was initiated. */ public void setConfigurationItemCaptureTime(java.util.Date configurationItemCaptureTime) { this.configurationItemCaptureTime = configurationItemCaptureTime; } /** ** The time when the configuration recording was initiated. *
* * @return The time when the configuration recording was initiated. */ public java.util.Date getConfigurationItemCaptureTime() { return this.configurationItemCaptureTime; } /** ** The time when the configuration recording was initiated. *
* * @param configurationItemCaptureTime * The time when the configuration recording was initiated. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withConfigurationItemCaptureTime(java.util.Date configurationItemCaptureTime) { setConfigurationItemCaptureTime(configurationItemCaptureTime); return this; } /** ** The configuration item status. The valid values are: *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** The CIs do not incur any cost. *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** The CIs do not incur any cost. *
* @see ConfigurationItemStatus */ public void setConfigurationItemStatus(String configurationItemStatus) { this.configurationItemStatus = configurationItemStatus; } /** ** The configuration item status. The valid values are: *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** The CIs do not incur any cost. *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** The CIs do not incur any cost. *
* @see ConfigurationItemStatus */ public String getConfigurationItemStatus() { return this.configurationItemStatus; } /** ** The configuration item status. The valid values are: *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** The CIs do not incur any cost. *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** The CIs do not incur any cost. *
* @return Returns a reference to this object so that method calls can be chained together. * @see ConfigurationItemStatus */ public ConfigurationItem withConfigurationItemStatus(String configurationItemStatus) { setConfigurationItemStatus(configurationItemStatus); return this; } /** ** The configuration item status. The valid values are: *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** The CIs do not incur any cost. *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** The CIs do not incur any cost. *
* @see ConfigurationItemStatus */ public void setConfigurationItemStatus(ConfigurationItemStatus configurationItemStatus) { withConfigurationItemStatus(configurationItemStatus); } /** ** The configuration item status. The valid values are: *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the recorder * excludes the recording of resources of this type *
** The CIs do not incur any cost. *
** OK – The resource configuration has been updated *
** ResourceDiscovered – The resource was newly discovered *
** ResourceNotRecorded – The resource was discovered but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** ResourceDeleted – The resource was deleted *
** ResourceDeletedNotRecorded – The resource was deleted but its configuration was not recorded since the * recorder excludes the recording of resources of this type *
** The CIs do not incur any cost. *
* @return Returns a reference to this object so that method calls can be chained together. * @see ConfigurationItemStatus */ public ConfigurationItem withConfigurationItemStatus(ConfigurationItemStatus configurationItemStatus) { this.configurationItemStatus = configurationItemStatus.toString(); return this; } /** ** An identifier that indicates the ordering of the configuration items of a resource. *
* * @param configurationStateId * An identifier that indicates the ordering of the configuration items of a resource. */ public void setConfigurationStateId(String configurationStateId) { this.configurationStateId = configurationStateId; } /** ** An identifier that indicates the ordering of the configuration items of a resource. *
* * @return An identifier that indicates the ordering of the configuration items of a resource. */ public String getConfigurationStateId() { return this.configurationStateId; } /** ** An identifier that indicates the ordering of the configuration items of a resource. *
* * @param configurationStateId * An identifier that indicates the ordering of the configuration items of a resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withConfigurationStateId(String configurationStateId) { setConfigurationStateId(configurationStateId); return this; } /** ** Unique MD5 hash that represents the configuration item's state. *
** You can use MD5 hash to compare the states of two or more configuration items that are associated with the same * resource. *
* * @param configurationItemMD5Hash * Unique MD5 hash that represents the configuration item's state. ** You can use MD5 hash to compare the states of two or more configuration items that are associated with the * same resource. */ public void setConfigurationItemMD5Hash(String configurationItemMD5Hash) { this.configurationItemMD5Hash = configurationItemMD5Hash; } /** *
* Unique MD5 hash that represents the configuration item's state. *
** You can use MD5 hash to compare the states of two or more configuration items that are associated with the same * resource. *
* * @return Unique MD5 hash that represents the configuration item's state. ** You can use MD5 hash to compare the states of two or more configuration items that are associated with * the same resource. */ public String getConfigurationItemMD5Hash() { return this.configurationItemMD5Hash; } /** *
* Unique MD5 hash that represents the configuration item's state. *
** You can use MD5 hash to compare the states of two or more configuration items that are associated with the same * resource. *
* * @param configurationItemMD5Hash * Unique MD5 hash that represents the configuration item's state. ** You can use MD5 hash to compare the states of two or more configuration items that are associated with the * same resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withConfigurationItemMD5Hash(String configurationItemMD5Hash) { setConfigurationItemMD5Hash(configurationItemMD5Hash); return this; } /** *
* Amazon Resource Name (ARN) associated with the resource. *
* * @param arn * Amazon Resource Name (ARN) associated with the resource. */ public void setArn(String arn) { this.arn = arn; } /** ** Amazon Resource Name (ARN) associated with the resource. *
* * @return Amazon Resource Name (ARN) associated with the resource. */ public String getArn() { return this.arn; } /** ** Amazon Resource Name (ARN) associated with the resource. *
* * @param arn * Amazon Resource Name (ARN) associated with the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withArn(String arn) { setArn(arn); return this; } /** ** The type of Amazon Web Services resource. *
* * @param resourceType * The type of Amazon Web Services resource. * @see ResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** ** The type of Amazon Web Services resource. *
* * @return The type of Amazon Web Services resource. * @see ResourceType */ public String getResourceType() { return this.resourceType; } /** ** The type of Amazon Web Services resource. *
* * @param resourceType * The type of Amazon Web Services resource. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ public ConfigurationItem withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** ** The type of Amazon Web Services resource. *
* * @param resourceType * The type of Amazon Web Services resource. * @see ResourceType */ public void setResourceType(ResourceType resourceType) { withResourceType(resourceType); } /** ** The type of Amazon Web Services resource. *
* * @param resourceType * The type of Amazon Web Services resource. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ public ConfigurationItem withResourceType(ResourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** *
* The ID of the resource (for example, sg-xxxxxx
).
*
sg-xxxxxx
).
*/
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
/**
*
* The ID of the resource (for example, sg-xxxxxx
).
*
sg-xxxxxx
).
*/
public String getResourceId() {
return this.resourceId;
}
/**
*
* The ID of the resource (for example, sg-xxxxxx
).
*
sg-xxxxxx
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationItem withResourceId(String resourceId) {
setResourceId(resourceId);
return this;
}
/**
* * The custom name of the resource, if available. *
* * @param resourceName * The custom name of the resource, if available. */ public void setResourceName(String resourceName) { this.resourceName = resourceName; } /** ** The custom name of the resource, if available. *
* * @return The custom name of the resource, if available. */ public String getResourceName() { return this.resourceName; } /** ** The custom name of the resource, if available. *
* * @param resourceName * The custom name of the resource, if available. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withResourceName(String resourceName) { setResourceName(resourceName); return this; } /** ** The region where the resource resides. *
* * @param awsRegion * The region where the resource resides. */ public void setAwsRegion(String awsRegion) { this.awsRegion = awsRegion; } /** ** The region where the resource resides. *
* * @return The region where the resource resides. */ public String getAwsRegion() { return this.awsRegion; } /** ** The region where the resource resides. *
* * @param awsRegion * The region where the resource resides. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withAwsRegion(String awsRegion) { setAwsRegion(awsRegion); return this; } /** ** The Availability Zone associated with the resource. *
* * @param availabilityZone * The Availability Zone associated with the resource. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** ** The Availability Zone associated with the resource. *
* * @return The Availability Zone associated with the resource. */ public String getAvailabilityZone() { return this.availabilityZone; } /** ** The Availability Zone associated with the resource. *
* * @param availabilityZone * The Availability Zone associated with the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** ** The time stamp when the resource was created. *
* * @param resourceCreationTime * The time stamp when the resource was created. */ public void setResourceCreationTime(java.util.Date resourceCreationTime) { this.resourceCreationTime = resourceCreationTime; } /** ** The time stamp when the resource was created. *
* * @return The time stamp when the resource was created. */ public java.util.Date getResourceCreationTime() { return this.resourceCreationTime; } /** ** The time stamp when the resource was created. *
* * @param resourceCreationTime * The time stamp when the resource was created. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withResourceCreationTime(java.util.Date resourceCreationTime) { setResourceCreationTime(resourceCreationTime); return this; } /** ** A mapping of key value tags associated with the resource. *
* * @return A mapping of key value tags associated with the resource. */ public java.util.Map* A mapping of key value tags associated with the resource. *
* * @param tags * A mapping of key value tags associated with the resource. */ public void setTags(java.util.Map* A mapping of key value tags associated with the resource. *
* * @param tags * A mapping of key value tags associated with the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigurationItem withTags(java.util.Map* A list of CloudTrail event IDs. *
** A populated field indicates that the current configuration was initiated by the events recorded in the CloudTrail * log. For more information about CloudTrail, see What Is * CloudTrail. *
** An empty field indicates that the current configuration was not initiated by any event. As of Version 1.3, the * relatedEvents field is empty. You can access the LookupEvents API * in the CloudTrail API Reference to retrieve the events for the resource. *
* * @return A list of CloudTrail event IDs. ** A populated field indicates that the current configuration was initiated by the events recorded in the * CloudTrail log. For more information about CloudTrail, see What * Is CloudTrail. *
*
* An empty field indicates that the current configuration was not initiated by any event. As of Version
* 1.3, the relatedEvents field is empty. You can access the LookupEvents
* API in the CloudTrail API Reference to retrieve the events for the resource.
*/
public java.util.List
* A list of CloudTrail event IDs.
*
* A populated field indicates that the current configuration was initiated by the events recorded in the CloudTrail
* log. For more information about CloudTrail, see What Is
* CloudTrail.
*
* An empty field indicates that the current configuration was not initiated by any event. As of Version 1.3, the
* relatedEvents field is empty. You can access the LookupEvents API
* in the CloudTrail API Reference to retrieve the events for the resource.
*
* A populated field indicates that the current configuration was initiated by the events recorded in the * CloudTrail log. For more information about CloudTrail, see What * Is CloudTrail. *
*
* An empty field indicates that the current configuration was not initiated by any event. As of Version 1.3,
* the relatedEvents field is empty. You can access the LookupEvents
* API in the CloudTrail API Reference to retrieve the events for the resource.
*/
public void setRelatedEvents(java.util.Collection
* A list of CloudTrail event IDs.
*
* A populated field indicates that the current configuration was initiated by the events recorded in the CloudTrail
* log. For more information about CloudTrail, see What Is
* CloudTrail.
*
* An empty field indicates that the current configuration was not initiated by any event. As of Version 1.3, the
* relatedEvents field is empty. You can access the LookupEvents API
* in the CloudTrail API Reference to retrieve the events for the resource.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRelatedEvents(java.util.Collection)} or {@link #withRelatedEvents(java.util.Collection)} if you want
* to override the existing values.
*
* A populated field indicates that the current configuration was initiated by the events recorded in the * CloudTrail log. For more information about CloudTrail, see What * Is CloudTrail. *
*
* An empty field indicates that the current configuration was not initiated by any event. As of Version 1.3,
* the relatedEvents field is empty. You can access the LookupEvents
* API in the CloudTrail API Reference to retrieve the events for the resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationItem withRelatedEvents(String... relatedEvents) {
if (this.relatedEvents == null) {
setRelatedEvents(new com.amazonaws.internal.SdkInternalList
* A list of CloudTrail event IDs.
*
* A populated field indicates that the current configuration was initiated by the events recorded in the CloudTrail
* log. For more information about CloudTrail, see What Is
* CloudTrail.
*
* An empty field indicates that the current configuration was not initiated by any event. As of Version 1.3, the
* relatedEvents field is empty. You can access the LookupEvents API
* in the CloudTrail API Reference to retrieve the events for the resource.
*
* A populated field indicates that the current configuration was initiated by the events recorded in the * CloudTrail log. For more information about CloudTrail, see What * Is CloudTrail. *
*
* An empty field indicates that the current configuration was not initiated by any event. As of Version 1.3,
* the relatedEvents field is empty. You can access the LookupEvents
* API in the CloudTrail API Reference to retrieve the events for the resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationItem withRelatedEvents(java.util.Collection
* A list of related Amazon Web Services resources.
*
* A list of related Amazon Web Services resources.
*
* A list of related Amazon Web Services resources.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRelationships(java.util.Collection)} or {@link #withRelationships(java.util.Collection)} if you want
* to override the existing values.
*
* A list of related Amazon Web Services resources.
*
* The description of the resource configuration.
*
* The description of the resource configuration.
*
* The description of the resource configuration.
*
* Configuration attributes that Config returns for certain resource types to supplement the information returned
* for the
* Configuration attributes that Config returns for certain resource types to supplement the information returned
* for the
* Configuration attributes that Config returns for certain resource types to supplement the information returned
* for the configuration
parameter.
* configuration
parameter.
*/
public java.util.Mapconfiguration
parameter.
* configuration
parameter.
*/
public void setSupplementaryConfiguration(java.util.Mapconfiguration
parameter.
* configuration
parameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationItem withSupplementaryConfiguration(java.util.Map