/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Http { class URI; } //namespace Http namespace AccessAnalyzer { namespace Model { /** */ class ValidatePolicyRequest : public AccessAnalyzerRequest { public: AWS_ACCESSANALYZER_API ValidatePolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ValidatePolicy"; } AWS_ACCESSANALYZER_API Aws::String SerializePayload() const override; AWS_ACCESSANALYZER_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

The locale to use for localizing the findings.

*/ inline const Locale& GetLocale() const{ return m_locale; } /** *

The locale to use for localizing the findings.

*/ inline bool LocaleHasBeenSet() const { return m_localeHasBeenSet; } /** *

The locale to use for localizing the findings.

*/ inline void SetLocale(const Locale& value) { m_localeHasBeenSet = true; m_locale = value; } /** *

The locale to use for localizing the findings.

*/ inline void SetLocale(Locale&& value) { m_localeHasBeenSet = true; m_locale = std::move(value); } /** *

The locale to use for localizing the findings.

*/ inline ValidatePolicyRequest& WithLocale(const Locale& value) { SetLocale(value); return *this;} /** *

The locale to use for localizing the findings.

*/ inline ValidatePolicyRequest& WithLocale(Locale&& value) { SetLocale(std::move(value)); return *this;} /** *

The maximum number of results to return in the response.

*/ inline int GetMaxResults() const{ return m_maxResults; } /** *

The maximum number of results to return in the response.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

The maximum number of results to return in the response.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

The maximum number of results to return in the response.

*/ inline ValidatePolicyRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

A token used for pagination of results returned.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

A token used for pagination of results returned.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

A token used for pagination of results returned.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

A token used for pagination of results returned.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

A token used for pagination of results returned.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

A token used for pagination of results returned.

*/ inline ValidatePolicyRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

A token used for pagination of results returned.

*/ inline ValidatePolicyRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

A token used for pagination of results returned.

*/ inline ValidatePolicyRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

The JSON policy document to use as the content for the policy.

*/ inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; } /** *

The JSON policy document to use as the content for the policy.

*/ inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; } /** *

The JSON policy document to use as the content for the policy.

*/ inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; } /** *

The JSON policy document to use as the content for the policy.

*/ inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); } /** *

The JSON policy document to use as the content for the policy.

*/ inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); } /** *

The JSON policy document to use as the content for the policy.

*/ inline ValidatePolicyRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;} /** *

The JSON policy document to use as the content for the policy.

*/ inline ValidatePolicyRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;} /** *

The JSON policy document to use as the content for the policy.

*/ inline ValidatePolicyRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;} /** *

The type of policy to validate. Identity policies grant permissions to IAM * principals. Identity policies include managed and inline policies for IAM roles, * users, and groups. They also include service-control policies (SCPs) that are * attached to an Amazon Web Services organization, organizational unit (OU), or an * account.

Resource policies grant permissions on Amazon Web Services * resources. Resource policies include trust policies for IAM roles and bucket * policies for Amazon S3 buckets. You can provide a generic input such as identity * policy or resource policy or a specific input such as managed policy or Amazon * S3 bucket policy.

*/ inline const PolicyType& GetPolicyType() const{ return m_policyType; } /** *

The type of policy to validate. Identity policies grant permissions to IAM * principals. Identity policies include managed and inline policies for IAM roles, * users, and groups. They also include service-control policies (SCPs) that are * attached to an Amazon Web Services organization, organizational unit (OU), or an * account.

Resource policies grant permissions on Amazon Web Services * resources. Resource policies include trust policies for IAM roles and bucket * policies for Amazon S3 buckets. You can provide a generic input such as identity * policy or resource policy or a specific input such as managed policy or Amazon * S3 bucket policy.

*/ inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; } /** *

The type of policy to validate. Identity policies grant permissions to IAM * principals. Identity policies include managed and inline policies for IAM roles, * users, and groups. They also include service-control policies (SCPs) that are * attached to an Amazon Web Services organization, organizational unit (OU), or an * account.

Resource policies grant permissions on Amazon Web Services * resources. Resource policies include trust policies for IAM roles and bucket * policies for Amazon S3 buckets. You can provide a generic input such as identity * policy or resource policy or a specific input such as managed policy or Amazon * S3 bucket policy.

*/ inline void SetPolicyType(const PolicyType& value) { m_policyTypeHasBeenSet = true; m_policyType = value; } /** *

The type of policy to validate. Identity policies grant permissions to IAM * principals. Identity policies include managed and inline policies for IAM roles, * users, and groups. They also include service-control policies (SCPs) that are * attached to an Amazon Web Services organization, organizational unit (OU), or an * account.

Resource policies grant permissions on Amazon Web Services * resources. Resource policies include trust policies for IAM roles and bucket * policies for Amazon S3 buckets. You can provide a generic input such as identity * policy or resource policy or a specific input such as managed policy or Amazon * S3 bucket policy.

*/ inline void SetPolicyType(PolicyType&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); } /** *

The type of policy to validate. Identity policies grant permissions to IAM * principals. Identity policies include managed and inline policies for IAM roles, * users, and groups. They also include service-control policies (SCPs) that are * attached to an Amazon Web Services organization, organizational unit (OU), or an * account.

Resource policies grant permissions on Amazon Web Services * resources. Resource policies include trust policies for IAM roles and bucket * policies for Amazon S3 buckets. You can provide a generic input such as identity * policy or resource policy or a specific input such as managed policy or Amazon * S3 bucket policy.

*/ inline ValidatePolicyRequest& WithPolicyType(const PolicyType& value) { SetPolicyType(value); return *this;} /** *

The type of policy to validate. Identity policies grant permissions to IAM * principals. Identity policies include managed and inline policies for IAM roles, * users, and groups. They also include service-control policies (SCPs) that are * attached to an Amazon Web Services organization, organizational unit (OU), or an * account.

Resource policies grant permissions on Amazon Web Services * resources. Resource policies include trust policies for IAM roles and bucket * policies for Amazon S3 buckets. You can provide a generic input such as identity * policy or resource policy or a specific input such as managed policy or Amazon * S3 bucket policy.

*/ inline ValidatePolicyRequest& WithPolicyType(PolicyType&& value) { SetPolicyType(std::move(value)); return *this;} /** *

The type of resource to attach to your resource policy. Specify a value for * the policy validation resource type only if the policy type is * RESOURCE_POLICY. For example, to validate a resource policy to * attach to an Amazon S3 bucket, you can choose AWS::S3::Bucket for * the policy validation resource type.

For resource types not supported as * valid values, IAM Access Analyzer runs policy checks that apply to all resource * policies. For example, to validate a resource policy to attach to a KMS key, do * not specify a value for the policy validation resource type and IAM Access * Analyzer will run policy checks that apply to all resource policies.

*/ inline const ValidatePolicyResourceType& GetValidatePolicyResourceType() const{ return m_validatePolicyResourceType; } /** *

The type of resource to attach to your resource policy. Specify a value for * the policy validation resource type only if the policy type is * RESOURCE_POLICY. For example, to validate a resource policy to * attach to an Amazon S3 bucket, you can choose AWS::S3::Bucket for * the policy validation resource type.

For resource types not supported as * valid values, IAM Access Analyzer runs policy checks that apply to all resource * policies. For example, to validate a resource policy to attach to a KMS key, do * not specify a value for the policy validation resource type and IAM Access * Analyzer will run policy checks that apply to all resource policies.

*/ inline bool ValidatePolicyResourceTypeHasBeenSet() const { return m_validatePolicyResourceTypeHasBeenSet; } /** *

The type of resource to attach to your resource policy. Specify a value for * the policy validation resource type only if the policy type is * RESOURCE_POLICY. For example, to validate a resource policy to * attach to an Amazon S3 bucket, you can choose AWS::S3::Bucket for * the policy validation resource type.

For resource types not supported as * valid values, IAM Access Analyzer runs policy checks that apply to all resource * policies. For example, to validate a resource policy to attach to a KMS key, do * not specify a value for the policy validation resource type and IAM Access * Analyzer will run policy checks that apply to all resource policies.

*/ inline void SetValidatePolicyResourceType(const ValidatePolicyResourceType& value) { m_validatePolicyResourceTypeHasBeenSet = true; m_validatePolicyResourceType = value; } /** *

The type of resource to attach to your resource policy. Specify a value for * the policy validation resource type only if the policy type is * RESOURCE_POLICY. For example, to validate a resource policy to * attach to an Amazon S3 bucket, you can choose AWS::S3::Bucket for * the policy validation resource type.

For resource types not supported as * valid values, IAM Access Analyzer runs policy checks that apply to all resource * policies. For example, to validate a resource policy to attach to a KMS key, do * not specify a value for the policy validation resource type and IAM Access * Analyzer will run policy checks that apply to all resource policies.

*/ inline void SetValidatePolicyResourceType(ValidatePolicyResourceType&& value) { m_validatePolicyResourceTypeHasBeenSet = true; m_validatePolicyResourceType = std::move(value); } /** *

The type of resource to attach to your resource policy. Specify a value for * the policy validation resource type only if the policy type is * RESOURCE_POLICY. For example, to validate a resource policy to * attach to an Amazon S3 bucket, you can choose AWS::S3::Bucket for * the policy validation resource type.

For resource types not supported as * valid values, IAM Access Analyzer runs policy checks that apply to all resource * policies. For example, to validate a resource policy to attach to a KMS key, do * not specify a value for the policy validation resource type and IAM Access * Analyzer will run policy checks that apply to all resource policies.

*/ inline ValidatePolicyRequest& WithValidatePolicyResourceType(const ValidatePolicyResourceType& value) { SetValidatePolicyResourceType(value); return *this;} /** *

The type of resource to attach to your resource policy. Specify a value for * the policy validation resource type only if the policy type is * RESOURCE_POLICY. For example, to validate a resource policy to * attach to an Amazon S3 bucket, you can choose AWS::S3::Bucket for * the policy validation resource type.

For resource types not supported as * valid values, IAM Access Analyzer runs policy checks that apply to all resource * policies. For example, to validate a resource policy to attach to a KMS key, do * not specify a value for the policy validation resource type and IAM Access * Analyzer will run policy checks that apply to all resource policies.

*/ inline ValidatePolicyRequest& WithValidatePolicyResourceType(ValidatePolicyResourceType&& value) { SetValidatePolicyResourceType(std::move(value)); return *this;} private: Locale m_locale; bool m_localeHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; Aws::String m_policyDocument; bool m_policyDocumentHasBeenSet = false; PolicyType m_policyType; bool m_policyTypeHasBeenSet = false; ValidatePolicyResourceType m_validatePolicyResourceType; bool m_validatePolicyResourceTypeHasBeenSet = false; }; } // namespace Model } // namespace AccessAnalyzer } // namespace Aws