/* * 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.logs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribeAccountPoliciesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Use this parameter to limit the returned policies to only the policies that match the policy type that you
* specify. Currently, the only valid value is DATA_PROTECTION_POLICY
.
*
* Use this parameter to limit the returned policies to only the policy with the name that you specify. *
*/ private String policyName; /** ** If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account * observability, you can use this to specify the account ID of a source account. If you do, the operation returns * the account policy for the specified account. Currently, you can specify only one account ID in this parameter. *
** If you omit this parameter, only the policy in the current account is returned. *
*/ private com.amazonaws.internal.SdkInternalList
* Use this parameter to limit the returned policies to only the policies that match the policy type that you
* specify. Currently, the only valid value is DATA_PROTECTION_POLICY
.
*
DATA_PROTECTION_POLICY
.
* @see PolicyType
*/
public void setPolicyType(String policyType) {
this.policyType = policyType;
}
/**
*
* Use this parameter to limit the returned policies to only the policies that match the policy type that you
* specify. Currently, the only valid value is DATA_PROTECTION_POLICY
.
*
DATA_PROTECTION_POLICY
.
* @see PolicyType
*/
public String getPolicyType() {
return this.policyType;
}
/**
*
* Use this parameter to limit the returned policies to only the policies that match the policy type that you
* specify. Currently, the only valid value is DATA_PROTECTION_POLICY
.
*
DATA_PROTECTION_POLICY
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PolicyType
*/
public DescribeAccountPoliciesRequest withPolicyType(String policyType) {
setPolicyType(policyType);
return this;
}
/**
*
* Use this parameter to limit the returned policies to only the policies that match the policy type that you
* specify. Currently, the only valid value is DATA_PROTECTION_POLICY
.
*
DATA_PROTECTION_POLICY
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PolicyType
*/
public DescribeAccountPoliciesRequest withPolicyType(PolicyType policyType) {
this.policyType = policyType.toString();
return this;
}
/**
* * Use this parameter to limit the returned policies to only the policy with the name that you specify. *
* * @param policyName * Use this parameter to limit the returned policies to only the policy with the name that you specify. */ public void setPolicyName(String policyName) { this.policyName = policyName; } /** ** Use this parameter to limit the returned policies to only the policy with the name that you specify. *
* * @return Use this parameter to limit the returned policies to only the policy with the name that you specify. */ public String getPolicyName() { return this.policyName; } /** ** Use this parameter to limit the returned policies to only the policy with the name that you specify. *
* * @param policyName * Use this parameter to limit the returned policies to only the policy with the name that you specify. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAccountPoliciesRequest withPolicyName(String policyName) { setPolicyName(policyName); return this; } /** ** If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account * observability, you can use this to specify the account ID of a source account. If you do, the operation returns * the account policy for the specified account. Currently, you can specify only one account ID in this parameter. *
** If you omit this parameter, only the policy in the current account is returned. *
* * @return If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account * observability, you can use this to specify the account ID of a source account. If you do, the operation * returns the account policy for the specified account. Currently, you can specify only one account ID in * this parameter. *
* If you omit this parameter, only the policy in the current account is returned.
*/
public java.util.List
* If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account
* observability, you can use this to specify the account ID of a source account. If you do, the operation returns
* the account policy for the specified account. Currently, you can specify only one account ID in this parameter.
*
* If you omit this parameter, only the policy in the current account is returned.
*
* If you omit this parameter, only the policy in the current account is returned.
*/
public void setAccountIdentifiers(java.util.Collection
* If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account
* observability, you can use this to specify the account ID of a source account. If you do, the operation returns
* the account policy for the specified account. Currently, you can specify only one account ID in this parameter.
*
* If you omit this parameter, only the policy in the current account is returned.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAccountIdentifiers(java.util.Collection)} or {@link #withAccountIdentifiers(java.util.Collection)} if
* you want to override the existing values.
*
* If you omit this parameter, only the policy in the current account is returned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAccountPoliciesRequest withAccountIdentifiers(String... accountIdentifiers) {
if (this.accountIdentifiers == null) {
setAccountIdentifiers(new com.amazonaws.internal.SdkInternalList
* If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account
* observability, you can use this to specify the account ID of a source account. If you do, the operation returns
* the account policy for the specified account. Currently, you can specify only one account ID in this parameter.
*
* If you omit this parameter, only the policy in the current account is returned.
*
* If you omit this parameter, only the policy in the current account is returned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAccountPoliciesRequest withAccountIdentifiers(java.util.Collection