SameerMesiah97 commented on code in PR #69886: URL: https://github.com/apache/airflow/pull/69886#discussion_r3590995622
########## providers/amazon/src/airflow/providers/amazon/aws/operators/ecr.py: ########## @@ -0,0 +1,233 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""Amazon Elastic Container Registry (ECR) operators.""" + +from __future__ import annotations + +from collections.abc import Sequence +from typing import TYPE_CHECKING, Any, ClassVar + +from airflow.providers.amazon.aws.hooks.ecr import EcrHook +from airflow.providers.amazon.aws.operators.base_aws import AwsBaseOperator +from airflow.providers.amazon.aws.utils.mixins import aws_template_fields +from airflow.utils.helpers import prune_dict + +if TYPE_CHECKING: + from airflow.sdk import Context + + +class EcrCreateRepositoryOperator(AwsBaseOperator[EcrHook]): + """ + Create an Amazon ECR repository. + + .. seealso:: + For more information on how to use this operator, take a look at the guide: + :ref:`howto/operator:EcrCreateRepositoryOperator` + + :param repository_name: The name of the repository to create. (templated) + :param registry_id: The AWS account ID associated with the registry. (templated) + :param tags: Metadata to apply to the repository. (templated) + :param image_tag_mutability: The tag mutability setting for the repository. (templated) + :param image_tag_mutability_exclusion_filters: Filters that override the repository's + image tag mutability setting. (templated) + :param image_scanning_configuration: The image scanning configuration for the repository. (templated) + :param encryption_configuration: The encryption configuration for the repository. (templated) + :param aws_conn_id: The Airflow connection used for AWS credentials. + If this is ``None`` or empty then the default boto3 behaviour is used. If + running Airflow in a distributed manner and aws_conn_id is None or + empty, then default boto3 configuration would be used (and must be + maintained on each worker node). + :param region_name: AWS region_name. If not specified then the default boto3 behaviour is used. + :param verify: Whether or not to verify SSL certificates. See: + https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html + :param botocore_config: Configuration dictionary (key-values) for botocore client. See: + https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html Review Comment: @o-nikolas I stand corrected. Thanks for catching that. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
