class_docstr: Creates a new bucket.
  
  Google Cloud Storage uses a flat namespace, so you
  can't create a bucket with a name that is already in use.
  
      .. seealso::
          For more information, see Bucket Naming Guidelines:
          https://cloud.google.com/storage/docs/bucketnaming.html#requirements
  
  :param bucket_name: The name of the bucket. (templated)
  :param resource: An optional dict with parameters for creating the bucket.
          For information on available parameters, see Cloud Storage API doc:
          https://cloud.google.com/storage/docs/json_api/v1/buckets/insert
  :param storage_class: This defines how objects in the bucket are stored
          and determines the SLA and the cost of storage (templated). Values include
  
          - ``MULTI_REGIONAL``
          - ``REGIONAL``
          - ``STANDARD``
          - ``NEARLINE``
          - ``COLDLINE``.
  
          If this value is not specified when the bucket is
          created, it will default to STANDARD.
  :param location: The location of the bucket. (templated)
      Object data for objects in the bucket resides in physical storage
      within this region. Defaults to US.
  
      .. seealso:: https://developers.google.com/storage/docs/bucket-locations
  
  :param project_id: The ID of the Google Cloud Project. (templated)
  :param labels: User-provided labels, in key/value pairs.
  :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud.
  :param impersonation_chain: Optional service account to impersonate using short-term
      credentials, or chained list of accounts required to get the access_token
      of the last account in the list, which will be impersonated in the request.
      If set as a string, the account must grant the originating account
      the Service Account Token Creator IAM role.
      If set as a sequence, the identities from the list must grant
      Service Account Token Creator IAM role to the directly preceding identity, with first
      account from the list granting this role to the originating account (templated).
  
  The following Operator would create a new bucket ``test-bucket``
  with ``MULTI_REGIONAL`` storage class in ``EU`` region
  
  .. code-block:: python
  
      CreateBucket = GCSCreateBucketOperator(
          task_id="CreateNewBucket",
          bucket_name="test-bucket",
          storage_class="MULTI_REGIONAL",
          location="EU",
          labels={"env": "dev", "team": "airflow"},
          gcp_conn_id="airflow-conn-id",
      )
class_docstr_tok: ["Creates","a","new","bucket",".","Google","Cloud","Storage","uses","a","flat","namespace",",","so","you","ca","n't","create","a","bucket","with","a","name","that","is","already","in","use",".","..","seealso",":",":","For","more","information",",","see","Bucket","Naming","Guidelines",":","https",":","\/\/cloud.google.com\/storage\/docs\/bucketnaming.html","#","requirements",":","param","bucket_name",":","The","name","of","the","bucket",".","(","templated",")",":","param","resource",":","An","optional","dict","with","parameters","for","creating","the","bucket",".","For","information","on","available","parameters",",","see","Cloud","Storage","API","doc",":","https",":","\/\/cloud.google.com\/storage\/docs\/json_api\/v1\/buckets\/insert",":","param","storage_class",":","This","defines","how","objects","in","the","bucket","are","stored","and","determines","the","SLA","and","the","cost","of","storage","(","templated",")",".","Values","include","-","``","MULTI_REGIONAL","``","-","``","REGIONAL","``","-","``","STANDARD","``","-","``","NEARLINE","``","-","``","COLDLINE","``",".","If","this","value","is","not","specified","when","the","bucket","is","created",",","it","will","default","to","STANDARD",".",":","param","location",":","The","location","of","the","bucket",".","(","templated",")","Object","data","for","objects","in","the","bucket","resides","in","physical","storage","within","this","region",".","Defaults","to","US",".","..","seealso",":",":","https",":","\/\/developers.google.com\/storage\/docs\/bucket-locations",":","param","project_id",":","The","ID","of","the","Google","Cloud","Project",".","(","templated",")",":","param","labels",":","User-provided","labels",",","in","key\/value","pairs",".",":","param","gcp_conn_id",":","(","Optional",")","The","connection","ID","used","to","connect","to","Google","Cloud",".",":","param","impersonation_chain",":","Optional","service","account","to","impersonate","using","short-term","credentials",",","or","chained","list","of","accounts","required","to","get","the","access_token","of","the","last","account","in","the","list",",","which","will","be","impersonated","in","the","request",".","If","set","as","a","string",",","the","account","must","grant","the","originating","account","the","Service","Account","Token","Creator","IAM","role",".","If","set","as","a","sequence",",","the","identities","from","the","list","must","grant","Service","Account","Token","Creator","IAM","role","to","the","directly","preceding","identity",",","with","first","account","from","the","list","granting","this","role","to","the","originating","account","(","templated",")",".","The","following","Operator","would","create","a","new","bucket","``","test-bucket","``","with","``","MULTI_REGIONAL","``","storage","class","in","``","EU","``","region","..","code-block",":",":","python","CreateBucket","=","GCSCreateBucketOperator","(","task_id=","''","CreateNewBucket","''",",","bucket_name=","''","test-bucket","''",",","storage_class=","''","MULTI_REGIONAL","''",",","location=","''","EU","''",",","labels=","{","``","env","''",":","``","dev","''",",","``","team","''",":","``","airflow","''","}",",","gcp_conn_id=","''","airflow-conn-id","''",",",")"]
code: def __init__(
      self,
      *,
      bucket_name: str,
      resource: dict | None = None,
      storage_class: str = "MULTI_REGIONAL",
      location: str = "US",
      project_id: str | None = None,
      labels: dict | None = None,
      gcp_conn_id: str = "google_cloud_default",
      impersonation_chain: str | Sequence[str] | None = None,
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
      self.bucket_name = bucket_name
      self.resource = resource
      self.storage_class = storage_class
      self.location = location
      self.project_id = project_id
      self.labels = labels
      self.gcp_conn_id = gcp_conn_id
      self.impersonation_chain = impersonation_chain
  
imports: from __future__ import annotations
  import datetime
  import subprocess
  import sys
  import warnings
  from pathlib import Path
  from tempfile import NamedTemporaryFile, TemporaryDirectory
  from typing import TYPE_CHECKING, Sequence
  import pendulum
  from google.api_core.exceptions import Conflict
  from google.cloud.exceptions import GoogleCloudError
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.google.cloud.hooks.gcs import GCSHook
  from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
  from airflow.providers.google.common.links.storage import FileDetailsLink, StorageLink
  from airflow.utils import timezone
label_desc: Use image node_id 1 to create a new GCSCreateBucketOperator object from inherited base classes: GoogleCloudBaseOperator with example: obj = GCSCreateBucketOperator()