当前位置: 首页>>代码示例>>Python>>正文


Python waiter.WaiterModel方法代码示例

本文整理汇总了Python中botocore.waiter.WaiterModel方法的典型用法代码示例。如果您正苦于以下问题:Python waiter.WaiterModel方法的具体用法?Python waiter.WaiterModel怎么用?Python waiter.WaiterModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在botocore.waiter的用法示例。


在下文中一共展示了waiter.WaiterModel方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_waiter

# 需要导入模块: from botocore import waiter [as 别名]
# 或者: from botocore.waiter import WaiterModel [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 WaiterModel [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: waiter_names

# 需要导入模块: from botocore import waiter [as 别名]
# 或者: from botocore.waiter import WaiterModel [as 别名]
def waiter_names(self):
        """Returns a list of all available waiters."""
        config = self._get_waiter_config()
        if not config:
            return []
        model = waiter.WaiterModel(config)
        # Waiter configs is a dict, we just want the waiter names
        # which are the keys in the dict.
        return [xform_name(name) for name in model.waiter_names] 
开发者ID:skarlekar,项目名称:faces,代码行数:11,代码来源:client.py

示例4: get_waiter_model

# 需要导入模块: from botocore import waiter [as 别名]
# 或者: from botocore.waiter import WaiterModel [as 别名]
def get_waiter_model(self, service_name, api_version=None):
        loader = self.get_component('data_loader')
        waiter_config = loader.load_service_model(
            service_name, 'waiters-2', api_version)
        return waiter.WaiterModel(waiter_config) 
开发者ID:skarlekar,项目名称:faces,代码行数:7,代码来源:session.py

示例5: fargate_delete_waiter

# 需要导入模块: from botocore import waiter [as 别名]
# 或者: from botocore.waiter import WaiterModel [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

示例6: __init__

# 需要导入模块: from botocore import waiter [as 别名]
# 或者: from botocore.waiter import WaiterModel [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.WaiterModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。