| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/projects/__pycache__/ |
Upload File : |
�
��� � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z ddl mZ
ddlm
Z dd lmZ dd
lmZ ej ej j ej j � � G d� dej � � � � Zd
S )z/Command to move a project into an organization.� )�absolute_import)�division)�unicode_literals)�projects_api)�base)�flags)�util)�log)�
console_ioc �. � e Zd ZdZed� � � Zd� ZdS )�Movea� Move a project into an organization.
Moves the given project into the given organization.
This command can fail for the following reasons:
* There is no project with the given ID.
* There is no organization with the given ID, if an organization is given
as the destination.
* There is no folder with the given ID, if a folder is given as the
destination.
* More than one of organization or folder is provided.
* The active account does not have the
resourcemanager.projects.update permission for the given
project.
* The active account does not have the
resourcemanager.projects.create permission for the given
organization.
* The given project is already in an organization.
## EXAMPLES
The following command moves a project with the ID `super-awesome-project` into
the organization `25872158`:
$ {command} super-awesome-project --organization=25872158
c �� � t j d� � � | � � t j | � � | j � t j � � d S )N�move) �
project_flags�GetProjectIDNumberFlag�AddToParser�folder_flags�AddParentFlagsToParser�display_info� AddFormat�command_lib_util�LIST_FORMAT)�parsers �lib/surface/projects/move.py�Argsz Move.Args; sS � ��(��0�0�<�<�V�D�D�D��'��/�/�/�
��!�!�"2�">�?�?�?�?�?� c �( � t j |� � t j |j � � }t j d� � sd S t j |t j t j
|� � � � �� � }t j |� � |S )Na� Your project will be moved. This may alter the policies enforced on your Project, either exposing your Project to more security risk through looser polices or cause an outage through stricter polices. See these public notes on policy implications for more information: https://cloud.google.com/resource-manager/docs/creating-managing-folders#moving-folders-policy-considerations and https://cloud.google.com/resource-manager/docs/migrating-projects-billing#note_on_policy_implications. Once moved, you can move the Project again so long as you have the appropriate permissions. See our public documentation for more information: https://cloud.google.com/resource-manager/docs/creating-managing-folders#moving_a_project_into_a_folder)�parent)
r �CheckParentFlagsr �ParseProject�idr �PromptContinuer �Update�ParentNameToResourceId�GetParentFromFlagsr
�UpdatedResource)�self�args�project_ref�results r �RunzMove.RunA s� � ��!�$�'�'�'�"�/���8�8�K��$� C�
�
� � �T�
�
���2��+�D�1�1�3� 3�4� 4� 4�F� ���$�$�$��Mr N)�__name__�
__module__�__qualname__�__doc__�staticmethodr r+ � r r r
r
sK � � � � � �� �6 �@� @� �<�@�
� � � � r r
N)r/ �
__future__r r r �+googlecloudsdk.api_lib.cloudresourcemanagerr �googlecloudsdk.callioper �#googlecloudsdk.command_lib.projectsr r r r �+googlecloudsdk.command_lib.resource_managerr �googlecloudsdk.corer
�googlecloudsdk.core.consoler �
ReleaseTracks�ReleaseTrack�ALPHA�BETA�Commandr
r1 r r �<module>r>