打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
associate_dhcp_options亚马逊boto3

associate_dhcp_options(**kwargs)¶
Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.
After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.
For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Request Syntax

同样是非常简单的代码,但是DHCP好像更复杂一些

response = client.associate_dhcp_options(
    DhcpOptionsId='string',
    VpcId='string',
    DryRun=True|False
)
Parameters
* DhcpOptionsId (string) -- [REQUIRED]
The ID of the DHCP options set, or default to associate no DHCP options with the VPC.
* VpcId (string) -- [REQUIRED]
The ID of the VPC.
* DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
Examples
This example associates the specified DHCP options set with the specified VPC.
response = client.associate_dhcp_options(
    DhcpOptionsId='dopt-d9070ebb',
    VpcId='vpc-a01106c2',
)

print(response)
Expected Output:
{
    'ResponseMetadata': {
        '...': '...',
    },
}
This example associates the default DHCP options set with the specified VPC.
response = client.associate_dhcp_options(
    DhcpOptionsId='default',
    VpcId='vpc-a01106c2',
)

print(response)
Expected Output:
{
    'ResponseMetadata': {
        '...': '...',
    },
}

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
国内首款 Serverless MySQL 数据库重磅发布!
PXE搭建原理和过程之isc-dhcp-server
投行薪资、职业发展、Offer成功率大揭秘
你到底是不是世界首富贝佐斯的兄弟?
0854麦肯锡新员工培训手册
AWS核心服务概览
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服