/* * 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 CreateLogGroupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the log group. *
*/ private String logGroupName; /** ** The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see Amazon Resource * Names. *
*/ private String kmsKeyId; /** ** The key-value pairs to use for the tags. *
*
* You can grant users access to certain log groups while preventing them from accessing other log groups. To do so,
* tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log group, you
* must have either the logs:TagResource
or logs:TagLogGroup
permission. For more
* information about tagging, see Tagging
* Amazon Web Services resources. For more information about using tags to control access, see Controlling access to Amazon Web
* Services resources using tags.
*
* The name of the log group. *
* * @param logGroupName * The name of the log group. */ public void setLogGroupName(String logGroupName) { this.logGroupName = logGroupName; } /** ** The name of the log group. *
* * @return The name of the log group. */ public String getLogGroupName() { return this.logGroupName; } /** ** The name of the log group. *
* * @param logGroupName * The name of the log group. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLogGroupRequest withLogGroupName(String logGroupName) { setLogGroupName(logGroupName); return this; } /** ** The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see Amazon Resource * Names. *
* * @param kmsKeyId * The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see * Amazon * Resource Names. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** ** The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see Amazon Resource * Names. *
* * @return The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see * Amazon * Resource Names. */ public String getKmsKeyId() { return this.kmsKeyId; } /** ** The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see Amazon Resource * Names. *
* * @param kmsKeyId * The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see * Amazon * Resource Names. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLogGroupRequest withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** ** The key-value pairs to use for the tags. *
*
* You can grant users access to certain log groups while preventing them from accessing other log groups. To do so,
* tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log group, you
* must have either the logs:TagResource
or logs:TagLogGroup
permission. For more
* information about tagging, see Tagging
* Amazon Web Services resources. For more information about using tags to control access, see Controlling access to Amazon Web
* Services resources using tags.
*
* You can grant users access to certain log groups while preventing them from accessing other log groups.
* To do so, tag your groups and use IAM policies that refer to those tags. To assign tags when you create a
* log group, you must have either the
* The key-value pairs to use for the tags.
*
* You can grant users access to certain log groups while preventing them from accessing other log groups. To do so,
* tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log group, you
* must have either the logs:TagResource
or logs:TagLogGroup
* permission. For more information about tagging, see Tagging Amazon Web Services
* resources. For more information about using tags to control access, see Controlling access to Amazon Web
* Services resources using tags.
*/
public java.util.Maplogs:TagResource
or logs:TagLogGroup
permission. For more
* information about tagging, see Tagging
* Amazon Web Services resources. For more information about using tags to control access, see Controlling access to Amazon Web
* Services resources using tags.
*
* You can grant users access to certain log groups while preventing them from accessing other log groups. To
* do so, tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log
* group, you must have either the
* The key-value pairs to use for the tags.
*
* You can grant users access to certain log groups while preventing them from accessing other log groups. To do so,
* tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log group, you
* must have either the logs:TagResource
or logs:TagLogGroup
permission.
* For more information about tagging, see Tagging Amazon Web Services
* resources. For more information about using tags to control access, see Controlling access to Amazon Web
* Services resources using tags.
*/
public void setTags(java.util.Maplogs:TagResource
or logs:TagLogGroup
permission. For more
* information about tagging, see Tagging
* Amazon Web Services resources. For more information about using tags to control access, see Controlling access to Amazon Web
* Services resources using tags.
*
* You can grant users access to certain log groups while preventing them from accessing other log groups. To
* do so, tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log
* group, you must have either the logs:TagResource
or logs:TagLogGroup
permission.
* For more information about tagging, see Tagging Amazon Web Services
* resources. For more information about using tags to control access, see Controlling access to Amazon Web
* Services resources using tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLogGroupRequest withTags(java.util.Map