/* * Copyright 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. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// /// An access preview finding generated by the access preview. /// public partial class AccessPreviewFinding { private List _action = new List(); private FindingChangeType _changeType; private Dictionary _condition = new Dictionary(); private DateTime? _createdAt; private string _error; private string _existingFindingId; private FindingStatus _existingFindingStatus; private string _id; private bool? _isPublic; private Dictionary _principal = new Dictionary(); private string _resource; private string _resourceOwnerAccount; private ResourceType _resourceType; private List _sources = new List(); private FindingStatus _status; /// /// Gets and sets the property Action. /// /// The action in the analyzed policy statement that an external principal has permission /// to perform. /// /// public List Action { get { return this._action; } set { this._action = value; } } // Check to see if Action property is set internal bool IsSetAction() { return this._action != null && this._action.Count > 0; } /// /// Gets and sets the property ChangeType. /// /// Provides context on how the access preview finding compares to existing access identified /// in IAM Access Analyzer. /// ///
  • /// /// New - The finding is for newly-introduced access. /// ///
  • /// /// Unchanged - The preview finding is an existing finding that would remain /// unchanged. /// ///
  • /// /// Changed - The preview finding is an existing finding with a change in /// status. /// ///
/// /// For example, a Changed finding with preview status Resolved /// and existing status Active indicates the existing Active /// finding would become Resolved as a result of the proposed permissions /// change. /// ///
[AWSProperty(Required=true)] public FindingChangeType ChangeType { get { return this._changeType; } set { this._changeType = value; } } // Check to see if ChangeType property is set internal bool IsSetChangeType() { return this._changeType != null; } /// /// Gets and sets the property Condition. /// /// The condition in the analyzed policy statement that resulted in a finding. /// /// public Dictionary Condition { get { return this._condition; } set { this._condition = value; } } // Check to see if Condition property is set internal bool IsSetCondition() { return this._condition != null && this._condition.Count > 0; } /// /// Gets and sets the property CreatedAt. /// /// The time at which the access preview finding was created. /// /// [AWSProperty(Required=true)] public DateTime CreatedAt { get { return this._createdAt.GetValueOrDefault(); } set { this._createdAt = value; } } // Check to see if CreatedAt property is set internal bool IsSetCreatedAt() { return this._createdAt.HasValue; } /// /// Gets and sets the property Error. /// /// An error. /// /// public string Error { get { return this._error; } set { this._error = value; } } // Check to see if Error property is set internal bool IsSetError() { return this._error != null; } /// /// Gets and sets the property ExistingFindingId. /// /// The existing ID of the finding in IAM Access Analyzer, provided only for existing /// findings. /// /// public string ExistingFindingId { get { return this._existingFindingId; } set { this._existingFindingId = value; } } // Check to see if ExistingFindingId property is set internal bool IsSetExistingFindingId() { return this._existingFindingId != null; } /// /// Gets and sets the property ExistingFindingStatus. /// /// The existing status of the finding, provided only for existing findings. /// /// public FindingStatus ExistingFindingStatus { get { return this._existingFindingStatus; } set { this._existingFindingStatus = value; } } // Check to see if ExistingFindingStatus property is set internal bool IsSetExistingFindingStatus() { return this._existingFindingStatus != null; } /// /// Gets and sets the property Id. /// /// The ID of the access preview finding. This ID uniquely identifies the element in the /// list of access preview findings and is not related to the finding ID in Access Analyzer. /// /// [AWSProperty(Required=true)] public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// /// Gets and sets the property IsPublic. /// /// Indicates whether the policy that generated the finding allows public access to the /// resource. /// /// public bool IsPublic { get { return this._isPublic.GetValueOrDefault(); } set { this._isPublic = value; } } // Check to see if IsPublic property is set internal bool IsSetIsPublic() { return this._isPublic.HasValue; } /// /// Gets and sets the property Principal. /// /// The external principal that has access to a resource within the zone of trust. /// /// public Dictionary Principal { get { return this._principal; } set { this._principal = value; } } // Check to see if Principal property is set internal bool IsSetPrincipal() { return this._principal != null && this._principal.Count > 0; } /// /// Gets and sets the property Resource. /// /// The resource that an external principal has access to. This is the resource associated /// with the access preview. /// /// public string Resource { get { return this._resource; } set { this._resource = value; } } // Check to see if Resource property is set internal bool IsSetResource() { return this._resource != null; } /// /// Gets and sets the property ResourceOwnerAccount. /// /// The Amazon Web Services account ID that owns the resource. For most Amazon Web Services /// resources, the owning account is the account in which the resource was created. /// /// [AWSProperty(Required=true)] public string ResourceOwnerAccount { get { return this._resourceOwnerAccount; } set { this._resourceOwnerAccount = value; } } // Check to see if ResourceOwnerAccount property is set internal bool IsSetResourceOwnerAccount() { return this._resourceOwnerAccount != null; } /// /// Gets and sets the property ResourceType. /// /// The type of the resource that can be accessed in the finding. /// /// [AWSProperty(Required=true)] public ResourceType ResourceType { get { return this._resourceType; } set { this._resourceType = value; } } // Check to see if ResourceType property is set internal bool IsSetResourceType() { return this._resourceType != null; } /// /// Gets and sets the property Sources. /// /// The sources of the finding. This indicates how the access that generated the finding /// is granted. It is populated for Amazon S3 bucket findings. /// /// public List Sources { get { return this._sources; } set { this._sources = value; } } // Check to see if Sources property is set internal bool IsSetSources() { return this._sources != null && this._sources.Count > 0; } /// /// Gets and sets the property Status. /// /// The preview status of the finding. This is what the status of the finding would be /// after permissions deployment. For example, a Changed finding with preview /// status Resolved and existing status Active indicates the /// existing Active finding would become Resolved as a result /// of the proposed permissions change. /// /// [AWSProperty(Required=true)] public FindingStatus Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } } }