Cria um vSwitch padrão.
Descrição da operação
Ao chamar esta operação para criar um vSwitch padrão, observe os seguintes itens:\n- O primeiro e os três últimos endereços IP de cada bloco CIDR do vSwitch padrão são reservados pelo sistema. Por exemplo, os endereços IP reservados pelo sistema para 192.168.1.0/24 são 192.168.1.0, 192.168.1.253, 192.168.1.254 e 192.168.1.255.\n\n- O número de instâncias de serviço em nuvem em um vSwitch padrão não pode exceder o número restante de instâncias de serviço em nuvem disponíveis na VPC (15.000 menos o número atual de instâncias de serviço em nuvem).\n\n- Os vSwitches padrão não suportam multicast ou broadcast.\n\n- Após a criação de um vSwitch padrão, você não pode modificar seu bloco CIDR.\n\n- A operação CreateDefaultVSwitch é assíncrona. Após o envio de uma solicitação, o sistema retorna um ID de instância, mas o vSwitch padrão ainda não foi criado. Uma tarefa em segundo plano ainda está em andamento. Você pode chamar DescribeVSwitchAttributes para consultar o status de criação do vSwitch padrão:\n - Se o vSwitch padrão estiver no estado Pending, o vSwitch padrão está sendo configurado.\n - Se o vSwitch padrão estiver no estado Available, o vSwitch padrão está disponível.\n- Se já existir um vSwitch padrão em uma zona da região especificada, a chamada para esta operação falhará.\n- Antes de criar um vSwitch padrão, crie primeiro uma VPC padrão. Você pode chamar a operação CreateDefaultVpc para criar uma VPC padrão.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
vpc:CreateDefaultVSwitch |
create |
*VSwitch
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| ZoneId |
string |
Sim |
O ID da zona do vSwitch padrão que você deseja criar.\n\nVocê pode chamar a operação DescribeZones para consultar os IDs de zona. |
cn-hangzhou-b |
| RegionId |
string |
Sim |
O ID da região do vSwitch padrão que você deseja criar.\n\nVocê pode chamar a operação DescribeRegions para consultar os IDs de região. |
cn-hangzhou |
| Ipv6CidrBlock |
integer |
Não |
Os últimos 8 bits do bloco CIDR IPv6 do vSwitch. Valores válidos: 0 a 255. |
12 |
| ClientToken |
string |
Não |
O token de cliente usado para garantir a idempotência da solicitação.\n\nVocê pode usar o cliente para gerar o token, mas deve garantir que o token seja único entre diferentes solicitações. O token pode conter apenas caracteres ASCII.\n\n> Se você não especificar este parâmetro, o sistema usará automaticamente o RequestId da solicitação de API como o ClientToken. O RequestId pode ser diferente para cada solicitação de API. |
0c593ea1-3bea-11e9-b96b-88e9fe63**** |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
O ID do vSwitch padrão criado. |
||
| VSwitchId |
string |
O ID do vSwitch padrão criado. |
vsw-bp1a4b5qhmxftjimq**** |
| RequestId |
string |
O ID da solicitação. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
Exemplos
Resposta de sucesso
JSON formato
{
"VSwitchId": "vsw-bp1a4b5qhmxftjimq****",
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | InvalidDescription.Malformed | Invalid description. | |
| 400 | InvalidVSwitchName.Malformed | Specified virtual switch name is not valid. | The format of the specified vSwitch name is invalid. Specify the name in the valid format. |
| 400 | InvalidVSwitchDiscription.Malformed | Specified virtual switch description is not valid. | |
| 400 | Abs.Vpc.InvalidDescription.Malformed | Specified virtual switch name is not valid. | |
| 400 | ResourceNotAvailable | Resource you requested is not available in this region or zone. | |
| 400 | InvalidParameter | Specified CIDR block is not valid in VPC. | |
| 400 | InvalidCidrBlock.Overlapped | Specified CIDR block overlapped with other subnets. | |
| 400 | QuotaExceeded.VSwitch | Virtual switch quota exceeded. | The number of vSwitches has reached the upper limit. Reduce the number of vSwitches and try again later. |
| 400 | IncorrectRouteEntryStatus | Some route entry status blocked this operation. | |
| 400 | IncorrectVSwitchStatus | Some virtual switch is modifying within the same VPC. | Multiple vSwitches are in the Modifying state in the same VPC. Try again later. |
| 400 | InvalidCirdrBlock.MaskLength | Specified CIDR block is not valid . | Invalid CIDR block. |
| 400 | IncorrectVpcStatus | Current VPC status does not support this operation. | |
| 400 | CreateVSwitch.IncorrectStatus.cbnStatus | Current CBN status does not support this operation. | You cannot create a vSwitch when the CEN instance is in the current state. |
| 400 | InvalidCidrBlock.Malformed | Specified CIDR block is not valid. | |
| 400 | MissingParameter | Miss mandatory parameter. | |
| 400 | TaskConflict | The operation is too frequent, TaskConflict. | The system is unavailable. Try again later. |
| 400 | VPC.SWITCH.RULE.QUOTA.NOT.EXISTS | vSwitch quota rule not exists. | |
| 400 | Forbidden.VpcNotFound | Specified VPC can not found. | The specified VPC does not exist. |
| 400 | RouteConflict.AlreadyExist | Route conflict exists in routing table. | Route conflicts exist in the route table. |
| 400 | OperationFailed.CidrAcross | Classic link instance cidr must not across. | |
| 400 | Duplicated.ClientToken | %s | |
| 400 | OperationFailed.Ipv6CidrBlockExisted | %s | |
| 400 | IllegalParam.Ipv6CidrBlock | %s | |
| 400 | OperationFailed.VpcIpv6Disabled | %s | |
| 400 | IncorrectStatus.cbnStatus | Current CBN status does not support this operation. | The status of the CEN instance is invalid. |
| 400 | OperationFailed.DefaultVpcNotExist | %s | |
| 400 | UnsupportedFeature.CloudBoxIpv6 | The IPv6 feature is not supported by cloud box. | You cannot create an IPv6 address for a CloudBox instance. |
| 400 | OperationDenied.VpcPeerExist | The operation is not allowed because the VPC peer exists. | The operation failed because VPC peering connections exist. |
| 400 | OperationDenied.CenAttached | The operation is not allowed because the VPC is attached to CEN. | The operation is not allowed because the VPC is attached to a CEN instance. |
| 400 | OperationDenied.NatgwExist | The operation is not allowed because the NAT gateway exists in VPC. | The operation is not allowed because NAT gateways exist in the VPC. |
| 400 | OperationDenied.OtherSubnetCreating | other subnet is creating | |
| 400 | OperationFailed.DefaultVSwitchExist | A default vSwitch already exists in the zone. | The error message returned because the default vSwitch already exists in the current zone. |
| 400 | InvalidStatus.RouteEntry | RouteEntry status error. | |
| 400 | InvalidZoneId.NotFound | Specified zone does not exist. | |
| 400 | OperationDenied.ZoneIsDisabled | The specified zone is disabled. You cannot create a vSwitch in a disabled zone. | The specified zone is disabled. You cannot create a vSwitch in a disabled zone. |
| 404 | Invalid.NotExist | witch mask rule not exists. | |
| 404 | InvalidVpcId.NotFound | Specified VPC does not exist. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.