Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Tindakan untuk Amazon EC2 menggunakan AWS SDKs
Contoh kode berikut menunjukkan cara melakukan EC2 tindakan Amazon individual dengan AWS SDKs. Setiap contoh menyertakan tautan ke GitHub, di mana Anda dapat menemukan instruksi untuk mengatur dan menjalankan kode.
Kutipan ini menyebut Amazon EC2 API dan merupakan kutipan kode dari program yang lebih besar yang harus dijalankan dalam konteks. Anda dapat melihat tindakan dalam konteks diSkenario untuk Amazon EC2 menggunakan AWS SDKs .
Contoh berikut hanya mencakup tindakan yang paling umum digunakan. Untuk daftar lengkapnya, lihat APIReferensi Cloud Amazon Elastic Compute.
Contoh
- AcceptVpcPeeringConnection
- AllocateAddress
- AllocateHosts
- AssignPrivateIpAddresses
- AssociateAddress
- AssociateDhcpOptions
- AssociateRouteTable
- AttachInternetGateway
- AttachNetworkInterface
- AttachVolume
- AttachVpnGateway
- AuthorizeSecurityGroupEgress
- AuthorizeSecurityGroupIngress
- CancelCapacityReservation
- CancelImportTask
- CancelSpotFleetRequests
- CancelSpotInstanceRequests
- ConfirmProductInstance
- CopyImage
- CopySnapshot
- CreateCapacityReservation
- CreateCustomerGateway
- CreateDhcpOptions
- CreateFlowLogs
- CreateImage
- CreateInstanceExportTask
- CreateInternetGateway
- CreateKeyPair
- CreateLaunchTemplate
- CreateNetworkAcl
- CreateNetworkAclEntry
- CreateNetworkInterface
- CreatePlacementGroup
- CreateRoute
- CreateRouteTable
- CreateSecurityGroup
- CreateSnapshot
- CreateSpotDatafeedSubscription
- CreateSubnet
- CreateTags
- CreateVolume
- CreateVpc
- CreateVpcEndpoint
- CreateVpnConnection
- CreateVpnConnectionRoute
- CreateVpnGateway
- DeleteCustomerGateway
- DeleteDhcpOptions
- DeleteFlowLogs
- DeleteInternetGateway
- DeleteKeyPair
- DeleteLaunchTemplate
- DeleteNetworkAcl
- DeleteNetworkAclEntry
- DeleteNetworkInterface
- DeletePlacementGroup
- DeleteRoute
- DeleteRouteTable
- DeleteSecurityGroup
- DeleteSnapshot
- DeleteSpotDatafeedSubscription
- DeleteSubnet
- DeleteTags
- DeleteVolume
- DeleteVpc
- DeleteVpcEndpoint
- DeleteVpnConnection
- DeleteVpnConnectionRoute
- DeleteVpnGateway
- DeregisterImage
- DescribeAccountAttributes
- DescribeAddresses
- DescribeAvailabilityZones
- DescribeBundleTasks
- DescribeCapacityReservations
- DescribeCustomerGateways
- DescribeDhcpOptions
- DescribeFlowLogs
- DescribeHostReservationOfferings
- DescribeHosts
- DescribeIamInstanceProfileAssociations
- DescribeIdFormat
- DescribeIdentityIdFormat
- DescribeImageAttribute
- DescribeImages
- DescribeImportImageTasks
- DescribeImportSnapshotTasks
- DescribeInstanceAttribute
- DescribeInstanceStatus
- DescribeInstanceTypes
- DescribeInstances
- DescribeInternetGateways
- DescribeKeyPairs
- DescribeNetworkAcls
- DescribeNetworkInterfaceAttribute
- DescribeNetworkInterfaces
- DescribePlacementGroups
- DescribePrefixLists
- DescribeRegions
- DescribeRouteTables
- DescribeScheduledInstanceAvailability
- DescribeScheduledInstances
- DescribeSecurityGroups
- DescribeSnapshotAttribute
- DescribeSnapshots
- DescribeSpotDatafeedSubscription
- DescribeSpotFleetInstances
- DescribeSpotFleetRequestHistory
- DescribeSpotFleetRequests
- DescribeSpotInstanceRequests
- DescribeSpotPriceHistory
- DescribeSubnets
- DescribeTags
- DescribeVolumeAttribute
- DescribeVolumeStatus
- DescribeVolumes
- DescribeVpcAttribute
- DescribeVpcClassicLink
- DescribeVpcClassicLinkDnsSupport
- DescribeVpcEndpointServices
- DescribeVpcEndpoints
- DescribeVpcs
- DescribeVpnConnections
- DescribeVpnGateways
- DetachInternetGateway
- DetachNetworkInterface
- DetachVolume
- DetachVpnGateway
- DisableVgwRoutePropagation
- DisableVpcClassicLink
- DisableVpcClassicLinkDnsSupport
- DisassociateAddress
- DisassociateRouteTable
- EnableVgwRoutePropagation
- EnableVolumeIo
- EnableVpcClassicLink
- EnableVpcClassicLinkDnsSupport
- GetConsoleOutput
- GetHostReservationPurchasePreview
- GetPasswordData
- ImportImage
- ImportKeyPair
- ImportSnapshot
- ModifyCapacityReservation
- ModifyHosts
- ModifyIdFormat
- ModifyImageAttribute
- ModifyInstanceAttribute
- ModifyInstanceCreditSpecification
- ModifyNetworkInterfaceAttribute
- ModifyReservedInstances
- ModifySnapshotAttribute
- ModifySpotFleetRequest
- ModifySubnetAttribute
- ModifyVolumeAttribute
- ModifyVpcAttribute
- MonitorInstances
- MoveAddressToVpc
- PurchaseHostReservation
- PurchaseScheduledInstances
- RebootInstances
- RegisterImage
- RejectVpcPeeringConnection
- ReleaseAddress
- ReleaseHosts
- ReplaceIamInstanceProfileAssociation
- ReplaceNetworkAclAssociation
- ReplaceNetworkAclEntry
- ReplaceRoute
- ReplaceRouteTableAssociation
- ReportInstanceStatus
- RequestSpotFleet
- RequestSpotInstances
- ResetImageAttribute
- ResetInstanceAttribute
- ResetNetworkInterfaceAttribute
- ResetSnapshotAttribute
- RevokeSecurityGroupEgress
- RevokeSecurityGroupIngress
- RunInstances
- RunScheduledInstances
- StartInstances
- StopInstances
- TerminateInstances
- UnassignPrivateIpAddresses
- UnmonitorInstances
- UpdateSecurityGroupRuleDescriptionsIngress