Cookie の設定を選択する

当社は、当社のサイトおよびサービスを提供するために必要な必須 Cookie および類似のツールを使用しています。当社は、パフォーマンス Cookie を使用して匿名の統計情報を収集することで、お客様が当社のサイトをどのように利用しているかを把握し、改善に役立てています。必須 Cookie は無効化できませんが、[カスタマイズ] または [拒否] をクリックしてパフォーマンス Cookie を拒否することはできます。

お客様が同意した場合、AWS および承認された第三者は、Cookie を使用して便利なサイト機能を提供したり、お客様の選択を記憶したり、関連する広告を含む関連コンテンツを表示したりします。すべての必須ではない Cookie を受け入れるか拒否するには、[受け入れる] または [拒否] をクリックしてください。より詳細な選択を行うには、[カスタマイズ] をクリックしてください。

リザーブドインスタンスを購入する (AWS SDK)

フォーカスモード
リザーブドインスタンスを購入する (AWS SDK) - Amazon OpenSearch Service

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

AWS SDK (Android および iOS SDK を除く) は、「Amazon OpenSearch Service API リファレンス」に定義されているすべてのオペレーションをサポートします。これには、次も含まれます。

  • DescribeReservedInstanceOfferings

  • PurchaseReservedInstanceOffering

  • DescribeReservedInstances

このサンプルスクリプトは、AWS SDK for Python (Boto3) の OpenSearchService 低レベル Python クライアントを使用して、リザーブドインスタンスを購入します。instance_type の値を指定する必要があります。

import boto3 from botocore.config import Config # Build the client using the default credential configuration. # You can use the CLI and run 'aws configure' to set access key, secret # key, and default region. my_config = Config( # Optionally lets you specify a region other than your default. region_name='us-east-1' ) client = boto3.client('opensearch', config=my_config) instance_type = '' # e.g. m4.2xlarge.search def describe_RI_offerings(client): """Gets the Reserved Instance offerings for this account""" response = client.describe_reserved_instance_offerings() offerings = (response['ReservedInstanceOfferings']) return offerings def check_instance(offering): """Returns True if instance type is the one you specified above""" if offering['InstanceType'] == instance_type: return True return False def get_instance_id(): """Iterates through the available offerings to find the ID of the one you specified""" instance_type_iterator = filter( check_instance, describe_RI_offerings(client)) offering = list(instance_type_iterator) id = offering[0]['ReservedInstanceOfferingId'] return id def purchase_RI_offering(client): """Purchase Reserved Instances""" response = client.purchase_reserved_instance_offering( ReservedInstanceOfferingId = get_instance_id(), ReservationName = 'my-reservation', InstanceCount = 1 ) print('Purchased reserved instance offering of type ' + instance_type) print(response) def main(): """Purchase Reserved Instances""" purchase_RI_offering(client)

AWS SDK のインストールと使用の詳細については、「AWS Software Development Kits」を参照してください。

プライバシーサイト規約Cookie の設定
© 2025, Amazon Web Services, Inc. or its affiliates.All rights reserved.