All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.sdk.service.ecs20140526.models.DescribeSecurityGroupsRequest Maven / Gradle / Ivy

There is a newer version: 5.0.29
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;

import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;

/**
 * 
 * {@link DescribeSecurityGroupsRequest} extends {@link RequestModel}
 *
 * 

DescribeSecurityGroupsRequest

*/ public class DescribeSecurityGroupsRequest extends Request { @com.aliyun.core.annotation.Host @com.aliyun.core.annotation.NameInMap("SourceRegionId") private String sourceRegionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DryRun") private Boolean dryRun; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("FuzzyQuery") private Boolean fuzzyQuery; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("IsQueryEcsCount") private Boolean isQueryEcsCount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("MaxResults") @com.aliyun.core.annotation.Validation(maximum = 100, minimum = 1) private Integer maxResults; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("NetworkType") private String networkType; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("NextToken") private String nextToken; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerAccount") private String ownerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerId") private Long ownerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PageNumber") private Integer pageNumber; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PageSize") @com.aliyun.core.annotation.Validation(maximum = 100, minimum = 1) private Integer pageSize; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("RegionId") @com.aliyun.core.annotation.Validation(required = true) private String regionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceGroupId") private String resourceGroupId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerId") private Long resourceOwnerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SecurityGroupId") private String securityGroupId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SecurityGroupIds") private String securityGroupIds; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SecurityGroupName") private String securityGroupName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SecurityGroupType") private String securityGroupType; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ServiceManaged") private Boolean serviceManaged; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Tag") private java.util.List < Tag> tag; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("VpcId") private String vpcId; private DescribeSecurityGroupsRequest(Builder builder) { super(builder); this.sourceRegionId = builder.sourceRegionId; this.dryRun = builder.dryRun; this.fuzzyQuery = builder.fuzzyQuery; this.isQueryEcsCount = builder.isQueryEcsCount; this.maxResults = builder.maxResults; this.networkType = builder.networkType; this.nextToken = builder.nextToken; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.pageNumber = builder.pageNumber; this.pageSize = builder.pageSize; this.regionId = builder.regionId; this.resourceGroupId = builder.resourceGroupId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.securityGroupId = builder.securityGroupId; this.securityGroupIds = builder.securityGroupIds; this.securityGroupName = builder.securityGroupName; this.securityGroupType = builder.securityGroupType; this.serviceManaged = builder.serviceManaged; this.tag = builder.tag; this.vpcId = builder.vpcId; } public static Builder builder() { return new Builder(); } public static DescribeSecurityGroupsRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return sourceRegionId */ public String getSourceRegionId() { return this.sourceRegionId; } /** * @return dryRun */ public Boolean getDryRun() { return this.dryRun; } /** * @return fuzzyQuery */ public Boolean getFuzzyQuery() { return this.fuzzyQuery; } /** * @return isQueryEcsCount */ public Boolean getIsQueryEcsCount() { return this.isQueryEcsCount; } /** * @return maxResults */ public Integer getMaxResults() { return this.maxResults; } /** * @return networkType */ public String getNetworkType() { return this.networkType; } /** * @return nextToken */ public String getNextToken() { return this.nextToken; } /** * @return ownerAccount */ public String getOwnerAccount() { return this.ownerAccount; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @return pageNumber */ public Integer getPageNumber() { return this.pageNumber; } /** * @return pageSize */ public Integer getPageSize() { return this.pageSize; } /** * @return regionId */ public String getRegionId() { return this.regionId; } /** * @return resourceGroupId */ public String getResourceGroupId() { return this.resourceGroupId; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return resourceOwnerId */ public Long getResourceOwnerId() { return this.resourceOwnerId; } /** * @return securityGroupId */ public String getSecurityGroupId() { return this.securityGroupId; } /** * @return securityGroupIds */ public String getSecurityGroupIds() { return this.securityGroupIds; } /** * @return securityGroupName */ public String getSecurityGroupName() { return this.securityGroupName; } /** * @return securityGroupType */ public String getSecurityGroupType() { return this.securityGroupType; } /** * @return serviceManaged */ public Boolean getServiceManaged() { return this.serviceManaged; } /** * @return tag */ public java.util.List < Tag> getTag() { return this.tag; } /** * @return vpcId */ public String getVpcId() { return this.vpcId; } public static final class Builder extends Request.Builder { private String sourceRegionId; private Boolean dryRun; private Boolean fuzzyQuery; private Boolean isQueryEcsCount; private Integer maxResults; private String networkType; private String nextToken; private String ownerAccount; private Long ownerId; private Integer pageNumber; private Integer pageSize; private String regionId; private String resourceGroupId; private String resourceOwnerAccount; private Long resourceOwnerId; private String securityGroupId; private String securityGroupIds; private String securityGroupName; private String securityGroupType; private Boolean serviceManaged; private java.util.List < Tag> tag; private String vpcId; private Builder() { super(); } private Builder(DescribeSecurityGroupsRequest request) { super(request); this.sourceRegionId = request.sourceRegionId; this.dryRun = request.dryRun; this.fuzzyQuery = request.fuzzyQuery; this.isQueryEcsCount = request.isQueryEcsCount; this.maxResults = request.maxResults; this.networkType = request.networkType; this.nextToken = request.nextToken; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.pageNumber = request.pageNumber; this.pageSize = request.pageSize; this.regionId = request.regionId; this.resourceGroupId = request.resourceGroupId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.securityGroupId = request.securityGroupId; this.securityGroupIds = request.securityGroupIds; this.securityGroupName = request.securityGroupName; this.securityGroupType = request.securityGroupType; this.serviceManaged = request.serviceManaged; this.tag = request.tag; this.vpcId = request.vpcId; } /** * SourceRegionId. */ public Builder sourceRegionId(String sourceRegionId) { this.putHostParameter("SourceRegionId", sourceRegionId); this.sourceRegionId = sourceRegionId; return this; } /** *

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*
    *
  • true: performs only a dry run. The system checks your AccessKey pair, the permissions of the RAM user, and the required parameters. If the request passes the dry run, the DryRunOperation error code is returned. Otherwise, an error message is returned.
  • *
  • false: performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
  • *
*

Default value: false.

* * example: *

false

*/ public Builder dryRun(Boolean dryRun) { this.putQueryParameter("DryRun", dryRun); this.dryRun = dryRun; return this; } /** *
*

This parameter is deprecated.

*
* * example: *

null

*/ public Builder fuzzyQuery(Boolean fuzzyQuery) { this.putQueryParameter("FuzzyQuery", fuzzyQuery); this.fuzzyQuery = fuzzyQuery; return this; } /** *

Specifies whether to query the capacity of the security group. If you set this parameter to True, the EcsCount and AvailableInstanceAmount values in the response are valid.

*
*

This parameter is deprecated.

*
* * example: *

null

*/ public Builder isQueryEcsCount(Boolean isQueryEcsCount) { this.putQueryParameter("IsQueryEcsCount", isQueryEcsCount); this.isQueryEcsCount = isQueryEcsCount; return this; } /** *

The maximum number of entries per page. If you specify this parameter, both MaxResults and NextToken are used for a paged query.

*

Maximum value: 100.

*

Default value: 10.

* * example: *

10

*/ public Builder maxResults(Integer maxResults) { this.putQueryParameter("MaxResults", maxResults); this.maxResults = maxResults; return this; } /** *

The network type of the security group. Valid values:

*
    *
  • vpc
  • *
  • classic
  • *
* * example: *

vpc

*/ public Builder networkType(String networkType) { this.putQueryParameter("NetworkType", networkType); this.networkType = networkType; return this; } /** *

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.

* * example: *

e71d8a535bd9cc11

*/ public Builder nextToken(String nextToken) { this.putQueryParameter("NextToken", nextToken); this.nextToken = nextToken; return this; } /** * OwnerAccount. */ public Builder ownerAccount(String ownerAccount) { this.putQueryParameter("OwnerAccount", ownerAccount); this.ownerAccount = ownerAccount; return this; } /** * OwnerId. */ public Builder ownerId(Long ownerId) { this.putQueryParameter("OwnerId", ownerId); this.ownerId = ownerId; return this; } /** *

The page number.

*

Pages start from page 1.

*

Default value: 1.

*
*

This parameter will be removed in the future. We recommend that you use NextToken and MaxResults for a paged query.

*
* * example: *

1

*/ public Builder pageNumber(Integer pageNumber) { this.putQueryParameter("PageNumber", pageNumber); this.pageNumber = pageNumber; return this; } /** *

The number of entries per page.

*

Valid values: 1 to 50.

*

Default value: 10.

*
*

This parameter will be removed in the future. We recommend that you use NextToken and MaxResults for a paged query.

*
* * example: *

10

*/ public Builder pageSize(Integer pageSize) { this.putQueryParameter("PageSize", pageSize); this.pageSize = pageSize; return this; } /** *

The region ID. You can call the DescribeRegions operation to query the most recent region list.

*

This parameter is required.

* * example: *

cn-hangzhou

*/ public Builder regionId(String regionId) { this.putQueryParameter("RegionId", regionId); this.regionId = regionId; return this; } /** *

The ID of the resource group to which the security group belongs. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response. You can call the ListResourceGroups operation to query the most recent resource group list.

*
*

Resources in the default resource group are displayed in the response regardless of how this parameter is configured.

*
* * example: *

rg-bp67acfmxazb4p****

*/ public Builder resourceGroupId(String resourceGroupId) { this.putQueryParameter("ResourceGroupId", resourceGroupId); this.resourceGroupId = resourceGroupId; return this; } /** * ResourceOwnerAccount. */ public Builder resourceOwnerAccount(String resourceOwnerAccount) { this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); this.resourceOwnerAccount = resourceOwnerAccount; return this; } /** * ResourceOwnerId. */ public Builder resourceOwnerId(Long resourceOwnerId) { this.putQueryParameter("ResourceOwnerId", resourceOwnerId); this.resourceOwnerId = resourceOwnerId; return this; } /** *

The security group ID.

* * example: *

sg-bp67acfmxazb4p****

*/ public Builder securityGroupId(String securityGroupId) { this.putQueryParameter("SecurityGroupId", securityGroupId); this.securityGroupId = securityGroupId; return this; } /** *

The security group IDs. Set this parameter to a JSON array that consists of up to 100 security group IDs. Separate the security group IDs with commas (,).

* * example: *

["sg-bp67acfmxazb4p****", "sg-bp67acfmxazb4p****", "sg-bp67acfmxazb4p****",....]

*/ public Builder securityGroupIds(String securityGroupIds) { this.putQueryParameter("SecurityGroupIds", securityGroupIds); this.securityGroupIds = securityGroupIds; return this; } /** *

The name of the security group.

* * example: *

SGTestName

*/ public Builder securityGroupName(String securityGroupName) { this.putQueryParameter("SecurityGroupName", securityGroupName); this.securityGroupName = securityGroupName; return this; } /** *

The type of the security group. Valid values:

*
    *
  • normal: basic security group
  • *
  • enterprise: advanced security group
  • *
*
*

If you do not specify this parameter, both basic and advanced security groups are queried.

*
* * example: *

normal

*/ public Builder securityGroupType(String securityGroupType) { this.putQueryParameter("SecurityGroupType", securityGroupType); this.securityGroupType = securityGroupType; return this; } /** *

Specifies whether to query managed security groups. Valid values:

*
    *
  • true
  • *
  • false
  • *
* * example: *

false

*/ public Builder serviceManaged(Boolean serviceManaged) { this.putQueryParameter("ServiceManaged", serviceManaged); this.serviceManaged = serviceManaged; return this; } /** *

The tags to add to the security groups.

*/ public Builder tag(java.util.List < Tag> tag) { this.putQueryParameter("Tag", tag); this.tag = tag; return this; } /** *

The ID of the virtual private cloud (VPC) to which the security group belongs.

* * example: *

vpc-bp67acfmxazb4p****

*/ public Builder vpcId(String vpcId) { this.putQueryParameter("VpcId", vpcId); this.vpcId = vpcId; return this; } @Override public DescribeSecurityGroupsRequest build() { return new DescribeSecurityGroupsRequest(this); } } /** * * {@link DescribeSecurityGroupsRequest} extends {@link TeaModel} * *

DescribeSecurityGroupsRequest

*/ public static class Tag extends TeaModel { @com.aliyun.core.annotation.NameInMap("Key") private String key; @com.aliyun.core.annotation.NameInMap("Value") private String value; private Tag(Builder builder) { this.key = builder.key; this.value = builder.value; } public static Builder builder() { return new Builder(); } public static Tag create() { return builder().build(); } /** * @return key */ public String getKey() { return this.key; } /** * @return value */ public String getValue() { return this.value; } public static final class Builder { private String key; private String value; /** *

The key of tag N to add to the security group. Valid values of N: 1 to 20.

*

Up to 1,000 resources that match the tags specified can be returned in the response. To query more than 1,000 resources that have specified tags added, call the ListTagResources operation.

* * example: *

TestKey

*/ public Builder key(String key) { this.key = key; return this; } /** *

The value of tag N to add to the security group. Valid values of N: 1 to 20.

* * example: *

TestValue

*/ public Builder value(String value) { this.value = value; return this; } public Tag build() { return new Tag(this); } } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy