AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

This is the response object from the GetFindingRecommendation operation.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.AccessAnalyzer.Model.GetFindingRecommendationResponse

Namespace: Amazon.AccessAnalyzer.Model
Assembly: AWSSDK.AccessAnalyzer.dll
Version: 3.x.y.z

Syntax

C#
public class GetFindingRecommendationResponse : AmazonWebServiceResponse

The GetFindingRecommendationResponse type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property CompletedAt System.DateTime

Gets and sets the property CompletedAt.

The time at which the retrieval of the finding recommendation was completed.

Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property Error Amazon.AccessAnalyzer.Model.RecommendationError

Gets and sets the property Error.

Detailed information about the reason that the retrieval of a recommendation for the finding failed.

Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property NextToken System.String

Gets and sets the property NextToken.

A token used for pagination of results returned.

Public Property RecommendationType Amazon.AccessAnalyzer.RecommendationType

Gets and sets the property RecommendationType.

The type of recommendation for the finding.

Public Property RecommendedSteps System.Collections.Generic.List<Amazon.AccessAnalyzer.Model.RecommendedStep>

Gets and sets the property RecommendedSteps.

A group of recommended steps for the finding.

Public Property ResourceArn System.String

Gets and sets the property ResourceArn.

The ARN of the resource of the finding.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property StartedAt System.DateTime

Gets and sets the property StartedAt.

The time at which the retrieval of the finding recommendation was started.

Public Property Status Amazon.AccessAnalyzer.Status

Gets and sets the property Status.

The status of the retrieval of the finding recommendation.

Examples

Successfully fetched finding recommendation


var client = new AmazonAccessAnalyzerClient();
var response = client.CheckAccessNotGranted(new CheckAccessNotGrantedRequest 
{
    Access = new List<Access> {
        new Access { Actions = new List<string> {
            "s3:PutObject"
        } }
    },
    PolicyDocument = "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:GetObject\",\"Resource\":\"*\"}]}",
    PolicyType = "RESOURCE_POLICY"
});

string message = response.Message;
string result = response.Result;

            

In progress finding recommendation


var client = new AmazonAccessAnalyzerClient();
var response = client.CheckAccessNotGranted(new CheckAccessNotGrantedRequest 
{
    Access = new List<Access> {
        new Access { Resources = new List<string> {
            "arn:aws:s3:::sensitive-bucket/*"
        } }
    },
    PolicyDocument = "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:PutObject\",\"Resource\":\"arn:aws:s3:::non-sensitive-bucket/*\"}]}",
    PolicyType = "RESOURCE_POLICY"
});

string message = response.Message;
string result = response.Result;

            

Failed finding recommendation


var client = new AmazonAccessAnalyzerClient();
var response = client.CheckAccessNotGranted(new CheckAccessNotGrantedRequest 
{
    Access = new List<Access> {
        new Access { Resources = new List<string> {
            "arn:aws:s3:::my-bucket/*"
        } }
    },
    PolicyDocument = "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:PutObject\",\"Resource\":\"arn:aws:s3:::my-bucket/*\"}]}",
    PolicyType = "RESOURCE_POLICY"
});

string message = response.Message;
List<ReasonSummary> reasons = response.Reasons;
string result = response.Result;

            

Failed field validation for id value


var client = new AmazonAccessAnalyzerClient();
var response = client.GetFindingRecommendation(new GetFindingRecommendationRequest 
{
    AnalyzerArn = "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
    Id = "!"
});


            

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5