當前位置: 首頁>>代碼示例>>Python>>正文


Python waiter.create_waiter_with_client方法代碼示例

本文整理匯總了Python中botocore.waiter.create_waiter_with_client方法的典型用法代碼示例。如果您正苦於以下問題:Python waiter.create_waiter_with_client方法的具體用法?Python waiter.create_waiter_with_client怎麽用?Python waiter.create_waiter_with_client使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在botocore.waiter的用法示例。


在下文中一共展示了waiter.create_waiter_with_client方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_waiter

# 需要導入模塊: from botocore import waiter [as 別名]
# 或者: from botocore.waiter import create_waiter_with_client [as 別名]
def get_waiter(self, waiter_name):
        """Returns an object that can wait for some condition.

        :type waiter_name: str
        :param waiter_name: The name of the waiter to get. See the waiters
            section of the service docs for a list of available waiters.

        :returns: The specified waiter object.
        :rtype: botocore.waiter.Waiter
        """
        config = self._get_waiter_config()
        if not config:
            raise ValueError("Waiter does not exist: %s" % waiter_name)
        model = waiter.WaiterModel(config)
        mapping = {}
        for name in model.waiter_names:
            mapping[xform_name(name)] = name
        if waiter_name not in mapping:
            raise ValueError("Waiter does not exist: %s" % waiter_name)

        return waiter.create_waiter_with_client(
            mapping[waiter_name], model, self) 
開發者ID:QData,項目名稱:deepWordBug,代碼行數:24,代碼來源:client.py

示例2: get_waiter

# 需要導入模塊: from botocore import waiter [as 別名]
# 或者: from botocore.waiter import create_waiter_with_client [as 別名]
def get_waiter(self, waiter_name):
        config = self._get_waiter_config()
        if not config:
            raise ValueError("Waiter does not exist: %s" % waiter_name)
        model = waiter.WaiterModel(config)
        mapping = {}
        for name in model.waiter_names:
            mapping[xform_name(name)] = name
        if waiter_name not in mapping:
            raise ValueError("Waiter does not exist: %s" % waiter_name)

        return waiter.create_waiter_with_client(
            mapping[waiter_name], model, self) 
開發者ID:skarlekar,項目名稱:faces,代碼行數:15,代碼來源:client.py

示例3: fargate_delete_waiter

# 需要導入模塊: from botocore import waiter [as 別名]
# 或者: from botocore.waiter import create_waiter_with_client [as 別名]
def fargate_delete_waiter(self, client):
        # Fargate profiles seem to delete faster @ roughly 2 minutes each so keeping defaults
        config = {
            'version': 2,
            'waiters': {
                "FargateProfileDeleted": {
                    'operation': 'DescribeFargateProfile',
                    'delay': 30,
                    'maxAttempts': 40,
                    'acceptors': [
                        {
                            "expected": "DELETE_FAILED",
                            "matcher": "path",
                            "state": "failure",
                            "argument": "fargateprofile.status"
                        },
                        {
                            "expected": "ResourceNotFoundException",
                            "matcher": "error",
                            "state": "success"
                        }
                    ]
                }
            }
        }
        return create_waiter_with_client("FargateProfileDeleted", WaiterModel(config), client) 
開發者ID:cloud-custodian,項目名稱:cloud-custodian,代碼行數:28,代碼來源:eks.py

示例4: __init__

# 需要導入模塊: from botocore import waiter [as 別名]
# 或者: from botocore.waiter import create_waiter_with_client [as 別名]
def __init__(self, client):
        waiter_json_filename = os.path.join(utils.__path__[0], 'cfn-waiters-2.json')
        with open(waiter_json_filename, 'r') as waiter_json_file:
            self.waiter_json_model = json.load(waiter_json_file)
        self.waiter_model = WaiterModel(self.waiter_json_model)
        self.waiter = create_waiter_with_client('StackAvailable', self.waiter_model, client.meta.client) 
開發者ID:saksdirect,項目名稱:nova,代碼行數:8,代碼來源:cfn_waiter.py


注:本文中的botocore.waiter.create_waiter_with_client方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。