Retrieves the details of a network migration definition including source and target configurations.
Parameters:
Raises:
Examples:
Sample GetNetworkMigrationDefinition call
>>> client.get_network_migration_definition(network_migration_definition_id='nmd-01234567891234567')
Source code in docs_src/capo_mgn/_services/mgn.py
| def get_network_migration_definition(
self,
network_migration_definition_id: "capo_mgn.types.network_migration_definition_id.NetworkMigrationDefinitionID",
*,
config_overrides: Optional[mgnClientConfig] = None,
) -> "capo_mgn.types.network_migration_definition.NetworkMigrationDefinition":
"""<p>Retrieves the details of a network migration definition including source and target configurations.</p>
Args:
network_migration_definition_id: <p>The unique identifier of the network migration definition to retrieve.</p>
Raises:
capo_mgn.errors.access_denied_exception.AccessDeniedException: <p>Operation denied due to a file permission or access check error.</p>
capo_mgn.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found exception.</p>
capo_mgn.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Sample GetNetworkMigrationDefinition call
>>> client.get_network_migration_definition(network_migration_definition_id='nmd-01234567891234567')
"""
def _handler(
req: "OperationRequest[capo_mgn.types.get_network_migration_definition_request.GetNetworkMigrationDefinitionRequest]",
) -> OperationResponse[
"capo_mgn.types.network_migration_definition.NetworkMigrationDefinition"
]:
import capo_mgn._operations.application_migration_service.get_network_migration_definition
output, http_response = (
capo_mgn._operations.application_migration_service.get_network_migration_definition.get_network_migration_definition(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_mgn.types.network_migration_definition.NetworkMigrationDefinition",
) -> dict[str, Any]:
import capo_mgn.types.network_migration_definition
return capo_mgn.types.network_migration_definition.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"GetNetworkMigrationDefinition", redact_output=_redact_output
),
)
input_: capo_mgn.types.get_network_migration_definition_request.GetNetworkMigrationDefinitionRequest = {
"network_migration_definition_id": network_migration_definition_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|