Weitere AWS SDK-Beispiele sind im Repo AWS Doc SDK Examples
Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.
Verwendung von DescribeServices
mit einer CLI
Die folgenden Code-Beispiele zeigen, wie DescribeServices
verwendet wird.
- CLI
-
- AWS CLI
-
Um Service-Metadaten abzurufen
In diesem Beispiel werden die Metadaten für den EC2 Amazon-Servicecode abgerufen.
Befehl:
aws pricing describe-services --service-code
AmazonEC2
--format-versionaws_v1
--max-items1
Ausgabe:
{ "Services": [ { "ServiceCode": "AmazonEC2", "AttributeNames": [ "volumeType", "maxIopsvolume", "instance", "instanceCapacity10xlarge", "locationType", "instanceFamily", "operatingSystem", "clockSpeed", "LeaseContractLength", "ecu", "networkPerformance", "instanceCapacity8xlarge", "group", "maxThroughputvolume", "gpuMemory", "ebsOptimized", "elasticGpuType", "maxVolumeSize", "gpu", "processorFeatures", "intelAvxAvailable", "instanceCapacity4xlarge", "servicecode", "groupDescription", "processorArchitecture", "physicalCores", "productFamily", "enhancedNetworkingSupported", "intelTurboAvailable", "memory", "dedicatedEbsThroughput", "vcpu", "OfferingClass", "instanceCapacityLarge", "capacitystatus", "termType", "storage", "intelAvx2Available", "storageMedia", "physicalProcessor", "provisioned", "servicename", "PurchaseOption", "instanceCapacity18xlarge", "instanceType", "tenancy", "usagetype", "normalizationSizeFactor", "instanceCapacity2xlarge", "instanceCapacity16xlarge", "maxIopsBurstPerformance", "instanceCapacity12xlarge", "instanceCapacity32xlarge", "instanceCapacityXlarge", "licenseModel", "currentGeneration", "preInstalledSw", "location", "instanceCapacity24xlarge", "instanceCapacity9xlarge", "instanceCapacityMedium", "operation" ] } ], "FormatVersion": "aws_v1" }
-
Einzelheiten zur API finden Sie DescribeServices
in der AWS CLI Befehlsreferenz.
-
- PowerShell
-
- Tools für PowerShell V4
-
Beispiel 1: Gibt die Metadaten für alle verfügbaren Servicecodes in der Region us-east-1 zurück.
Get-PLSService -Region us-east-1
Ausgabe:
AttributeNames ServiceCode -------------- ----------- {productFamily, servicecode, groupDescription, termType...} AWSBudgets {productFamily, servicecode, termType, usagetype...} AWSCloudTrail {productFamily, servicecode, termType, usagetype...} AWSCodeCommit {productFamily, servicecode, termType, usagetype...} AWSCodeDeploy {productFamily, servicecode, termType, usagetype...} AWSCodePipeline {productFamily, servicecode, termType, usagetype...} AWSConfig ...
Beispiel 2: Gibt die Metadaten für den EC2 Amazon-Service in der Region us-east-1 zurück.
Get-PLSService -ServiceCode AmazonEC2 -Region us-east-1
Ausgabe:
AttributeNames ServiceCode -------------- ----------- {volumeType, maxIopsvolume, instanceCapacity10xlarge, locationType...} AmazonEC2
-
Einzelheiten zur API finden Sie unter DescribeServices AWS -Tools für PowerShellCmdlet-Referenz (V4).
-
- Tools für V5 PowerShell
-
Beispiel 1: Gibt die Metadaten für alle verfügbaren Servicecodes in der Region us-east-1 zurück.
Get-PLSService -Region us-east-1
Ausgabe:
AttributeNames ServiceCode -------------- ----------- {productFamily, servicecode, groupDescription, termType...} AWSBudgets {productFamily, servicecode, termType, usagetype...} AWSCloudTrail {productFamily, servicecode, termType, usagetype...} AWSCodeCommit {productFamily, servicecode, termType, usagetype...} AWSCodeDeploy {productFamily, servicecode, termType, usagetype...} AWSCodePipeline {productFamily, servicecode, termType, usagetype...} AWSConfig ...
Beispiel 2: Gibt die Metadaten für den EC2 Amazon-Service in der Region us-east-1 zurück.
Get-PLSService -ServiceCode AmazonEC2 -Region us-east-1
Ausgabe:
AttributeNames ServiceCode -------------- ----------- {volumeType, maxIopsvolume, instanceCapacity10xlarge, locationType...} AmazonEC2
-
Einzelheiten zur API finden Sie unter DescribeServices AWS -Tools für PowerShellCmdlet-Referenz (V5).
-