Path: blob/develop/awscli/customizations/cloudsearchdomain.py
1566 views
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.1#2# Licensed under the Apache License, Version 2.0 (the "License"). You3# may not use this file except in compliance with the License. A copy of4# the License is located at5#6# http://aws.amazon.com/apache2.0/7#8# or in the "license" file accompanying this file. This file is9# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF10# ANY KIND, either express or implied. See the License for the specific11# language governing permissions and limitations under the License.12"""Customizations for the cloudsearchdomain command.1314This module customizes the cloudsearchdomain command:1516* Add validation that --endpoint-url is required.1718"""1920def register_cloudsearchdomain(cli):21cli.register_last('calling-command.cloudsearchdomain',22validate_endpoint_url)232425def validate_endpoint_url(parsed_globals, **kwargs):26if parsed_globals.endpoint_url is None:27return ValueError(28"--endpoint-url is required for cloudsearchdomain commands")293031