body_hash stringlengths 64 64 | body stringlengths 23 109k | docstring stringlengths 1 57k | path stringlengths 4 198 | name stringlengths 1 115 | repository_name stringlengths 7 111 | repository_stars float64 0 191k | lang stringclasses 1 value | body_without_docstring stringlengths 14 108k | unified stringlengths 45 133k |
|---|---|---|---|---|---|---|---|---|---|
0590abaf318056adffcdbfde23a1c7cfec960ab3e14545af9c7e88c4d3922654 | def test_command_store_handles_finish_action_with_stopped() -> None:
'It should change to a stopped state if FinishAction has set_run_status=False.'
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(FinishAction(set_run_status=False))
assert (subject.state.run_result == RunResult.STOPPED) | It should change to a stopped state if FinishAction has set_run_status=False. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_command_store_handles_finish_action_with_stopped | Opentrons/labware | 2 | python | def test_command_store_handles_finish_action_with_stopped() -> None:
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(FinishAction(set_run_status=False))
assert (subject.state.run_result == RunResult.STOPPED) | def test_command_store_handles_finish_action_with_stopped() -> None:
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(FinishAction(set_run_status=False))
assert (subject.state.run_result == RunResult.STOPPED)<|docstring|>It should change to a stopped state if FinishAction has set_run_status=False.<|endoftext|> |
61c8f9235146b7a2f2fa80f964222f8d705be3a65417f4a0602891f83035bda5 | def test_command_store_handles_stop_action() -> None:
'It should mark the engine as non-gracefully stopped on StopAction.'
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(StopAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.STOPPED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | It should mark the engine as non-gracefully stopped on StopAction. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_command_store_handles_stop_action | Opentrons/labware | 2 | python | def test_command_store_handles_stop_action() -> None:
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(StopAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.STOPPED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | def test_command_store_handles_stop_action() -> None:
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(StopAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.STOPPED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))<|docstring|>It should mark the engine as non-gracefully stopped on StopAction.<|endoftext|> |
6dd548d198458352949632831ce749a098ed634a312ae8d94851cbed145d6257 | def test_command_store_cannot_restart_after_should_stop() -> None:
'It should reject a play action after finish.'
subject = CommandStore()
subject.handle_action(FinishAction())
subject.handle_action(PlayAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.SUCCEEDED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | It should reject a play action after finish. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_command_store_cannot_restart_after_should_stop | Opentrons/labware | 2 | python | def test_command_store_cannot_restart_after_should_stop() -> None:
subject = CommandStore()
subject.handle_action(FinishAction())
subject.handle_action(PlayAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.SUCCEEDED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | def test_command_store_cannot_restart_after_should_stop() -> None:
subject = CommandStore()
subject.handle_action(FinishAction())
subject.handle_action(PlayAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.SUCCEEDED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))<|docstring|>It should reject a play action after finish.<|endoftext|> |
a9761f582a8e91ec4a07ab445ffaed1a14046324714d5728f783cd202c9493f8 | def test_command_store_ignores_known_finish_error() -> None:
'It not store a ProtocolEngineError that comes in with the stop action.'
subject = CommandStore()
error_details = FinishErrorDetails(error=errors.ProtocolEngineError('oh no'), error_id='error-id', created_at=datetime(year=2021, month=1, day=1))
subject.handle_action(FinishAction(error_details=error_details))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.FAILED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | It not store a ProtocolEngineError that comes in with the stop action. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_command_store_ignores_known_finish_error | Opentrons/labware | 2 | python | def test_command_store_ignores_known_finish_error() -> None:
subject = CommandStore()
error_details = FinishErrorDetails(error=errors.ProtocolEngineError('oh no'), error_id='error-id', created_at=datetime(year=2021, month=1, day=1))
subject.handle_action(FinishAction(error_details=error_details))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.FAILED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | def test_command_store_ignores_known_finish_error() -> None:
subject = CommandStore()
error_details = FinishErrorDetails(error=errors.ProtocolEngineError('oh no'), error_id='error-id', created_at=datetime(year=2021, month=1, day=1))
subject.handle_action(FinishAction(error_details=error_details))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.FAILED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))<|docstring|>It not store a ProtocolEngineError that comes in with the stop action.<|endoftext|> |
2f8eee561f408ab2bb350128b8f58bfaafe671afacdeb1281de360f933eb20e2 | def test_command_store_saves_unknown_finish_error() -> None:
'It not store a ProtocolEngineError that comes in with the stop action.'
subject = CommandStore()
error_details = FinishErrorDetails(error=RuntimeError('oh no'), error_id='error-id', created_at=datetime(year=2021, month=1, day=1))
subject.handle_action(FinishAction(error_details=error_details))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.FAILED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={'error-id': errors.ErrorOccurrence(id='error-id', createdAt=datetime(year=2021, month=1, day=1), errorType='RuntimeError', detail='oh no')})) | It not store a ProtocolEngineError that comes in with the stop action. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_command_store_saves_unknown_finish_error | Opentrons/labware | 2 | python | def test_command_store_saves_unknown_finish_error() -> None:
subject = CommandStore()
error_details = FinishErrorDetails(error=RuntimeError('oh no'), error_id='error-id', created_at=datetime(year=2021, month=1, day=1))
subject.handle_action(FinishAction(error_details=error_details))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.FAILED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={'error-id': errors.ErrorOccurrence(id='error-id', createdAt=datetime(year=2021, month=1, day=1), errorType='RuntimeError', detail='oh no')})) | def test_command_store_saves_unknown_finish_error() -> None:
subject = CommandStore()
error_details = FinishErrorDetails(error=RuntimeError('oh no'), error_id='error-id', created_at=datetime(year=2021, month=1, day=1))
subject.handle_action(FinishAction(error_details=error_details))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.FAILED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={'error-id': errors.ErrorOccurrence(id='error-id', createdAt=datetime(year=2021, month=1, day=1), errorType='RuntimeError', detail='oh no')}))<|docstring|>It not store a ProtocolEngineError that comes in with the stop action.<|endoftext|> |
79f4913ec8e68b1053667f316564927aa60602959ab0acc58cae2017787141e5 | def test_command_store_ignores_stop_after_graceful_finish() -> None:
'It should no-op on stop if already gracefully finished.'
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(FinishAction())
subject.handle_action(StopAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.SUCCEEDED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | It should no-op on stop if already gracefully finished. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_command_store_ignores_stop_after_graceful_finish | Opentrons/labware | 2 | python | def test_command_store_ignores_stop_after_graceful_finish() -> None:
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(FinishAction())
subject.handle_action(StopAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.SUCCEEDED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | def test_command_store_ignores_stop_after_graceful_finish() -> None:
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(FinishAction())
subject.handle_action(StopAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.SUCCEEDED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))<|docstring|>It should no-op on stop if already gracefully finished.<|endoftext|> |
269e86aca66b8f895bbec0a85f3b808e43cee3caf71e25a8366da84867980d49 | def test_command_store_ignores_finish_after_non_graceful_stop() -> None:
'It should no-op on finish if already ungracefully stopped.'
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(StopAction())
subject.handle_action(FinishAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.STOPPED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | It should no-op on finish if already ungracefully stopped. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_command_store_ignores_finish_after_non_graceful_stop | Opentrons/labware | 2 | python | def test_command_store_ignores_finish_after_non_graceful_stop() -> None:
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(StopAction())
subject.handle_action(FinishAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.STOPPED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | def test_command_store_ignores_finish_after_non_graceful_stop() -> None:
subject = CommandStore()
subject.handle_action(PlayAction())
subject.handle_action(StopAction())
subject.handle_action(FinishAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.STOPPED, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))<|docstring|>It should no-op on finish if already ungracefully stopped.<|endoftext|> |
dce4fce02fdc6ce5a0c5be60531d154411321342ca64ba446b5eb615132676b6 | def test_command_store_handles_command_failed() -> None:
'It should store an error and mark the command if it fails.'
command = create_running_command(command_id='command-id')
expected_error_occurrence = errors.ErrorOccurrence(id='error-id', errorType='ProtocolEngineError', createdAt=datetime(year=2022, month=2, day=2), detail='oh no')
expected_failed_command = create_failed_command(command_id='command-id', error=expected_error_occurrence, completed_at=datetime(year=2022, month=2, day=2))
subject = CommandStore()
subject.handle_action(UpdateCommandAction(command=command))
subject.handle_action(FailCommandAction(command_id='command-id', error_id='error-id', failed_at=datetime(year=2022, month=2, day=2), error=errors.ProtocolEngineError('oh no')))
assert (subject.state == CommandState(queue_status=QueueStatus.IMPLICITLY_ACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=['command-id'], queued_command_ids=OrderedSet(), commands_by_id={'command-id': CommandEntry(index=0, command=expected_failed_command)}, errors_by_id={})) | It should store an error and mark the command if it fails. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_command_store_handles_command_failed | Opentrons/labware | 2 | python | def test_command_store_handles_command_failed() -> None:
command = create_running_command(command_id='command-id')
expected_error_occurrence = errors.ErrorOccurrence(id='error-id', errorType='ProtocolEngineError', createdAt=datetime(year=2022, month=2, day=2), detail='oh no')
expected_failed_command = create_failed_command(command_id='command-id', error=expected_error_occurrence, completed_at=datetime(year=2022, month=2, day=2))
subject = CommandStore()
subject.handle_action(UpdateCommandAction(command=command))
subject.handle_action(FailCommandAction(command_id='command-id', error_id='error-id', failed_at=datetime(year=2022, month=2, day=2), error=errors.ProtocolEngineError('oh no')))
assert (subject.state == CommandState(queue_status=QueueStatus.IMPLICITLY_ACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=['command-id'], queued_command_ids=OrderedSet(), commands_by_id={'command-id': CommandEntry(index=0, command=expected_failed_command)}, errors_by_id={})) | def test_command_store_handles_command_failed() -> None:
command = create_running_command(command_id='command-id')
expected_error_occurrence = errors.ErrorOccurrence(id='error-id', errorType='ProtocolEngineError', createdAt=datetime(year=2022, month=2, day=2), detail='oh no')
expected_failed_command = create_failed_command(command_id='command-id', error=expected_error_occurrence, completed_at=datetime(year=2022, month=2, day=2))
subject = CommandStore()
subject.handle_action(UpdateCommandAction(command=command))
subject.handle_action(FailCommandAction(command_id='command-id', error_id='error-id', failed_at=datetime(year=2022, month=2, day=2), error=errors.ProtocolEngineError('oh no')))
assert (subject.state == CommandState(queue_status=QueueStatus.IMPLICITLY_ACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=['command-id'], queued_command_ids=OrderedSet(), commands_by_id={'command-id': CommandEntry(index=0, command=expected_failed_command)}, errors_by_id={}))<|docstring|>It should store an error and mark the command if it fails.<|endoftext|> |
db13d56ea53e7eb9c718fd6c329c99a0345b27fecacc48d7cca80744e97a468c | def test_handles_hardware_stopped() -> None:
'It should mark the hardware as stopped on HardwareStoppedAction.'
subject = CommandStore()
subject.handle_action(HardwareStoppedAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.STOPPED, is_hardware_stopped=True, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | It should mark the hardware as stopped on HardwareStoppedAction. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_handles_hardware_stopped | Opentrons/labware | 2 | python | def test_handles_hardware_stopped() -> None:
subject = CommandStore()
subject.handle_action(HardwareStoppedAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.STOPPED, is_hardware_stopped=True, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | def test_handles_hardware_stopped() -> None:
subject = CommandStore()
subject.handle_action(HardwareStoppedAction())
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=RunResult.STOPPED, is_hardware_stopped=True, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))<|docstring|>It should mark the hardware as stopped on HardwareStoppedAction.<|endoftext|> |
f40d3e9a48ddc1663dc7588b2ceb4a0a275589381bc1db75a9f95fde7eb10e54 | def test_handles_door_open_and_close_event() -> None:
'It should update state when door opened and closed after run is played.'
subject = CommandStore()
door_open_event = DoorStateNotification(new_state=DoorState.OPEN, blocking=True)
door_close_event = DoorStateNotification(new_state=DoorState.CLOSED, blocking=False)
subject.handle_action(PlayAction())
subject.handle_action(HardwareEventAction(event=door_open_event))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=True, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))
subject.handle_action(HardwareEventAction(event=door_close_event))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | It should update state when door opened and closed after run is played. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_handles_door_open_and_close_event | Opentrons/labware | 2 | python | def test_handles_door_open_and_close_event() -> None:
subject = CommandStore()
door_open_event = DoorStateNotification(new_state=DoorState.OPEN, blocking=True)
door_close_event = DoorStateNotification(new_state=DoorState.CLOSED, blocking=False)
subject.handle_action(PlayAction())
subject.handle_action(HardwareEventAction(event=door_open_event))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=True, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))
subject.handle_action(HardwareEventAction(event=door_close_event))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | def test_handles_door_open_and_close_event() -> None:
subject = CommandStore()
door_open_event = DoorStateNotification(new_state=DoorState.OPEN, blocking=True)
door_close_event = DoorStateNotification(new_state=DoorState.CLOSED, blocking=False)
subject.handle_action(PlayAction())
subject.handle_action(HardwareEventAction(event=door_open_event))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=True, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))
subject.handle_action(HardwareEventAction(event=door_close_event))
assert (subject.state == CommandState(queue_status=QueueStatus.INACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))<|docstring|>It should update state when door opened and closed after run is played.<|endoftext|> |
2cc0bcb1c473c0079940dabad32a7ddfcf17bd6791527f1b7e947690262ab179 | def test_handles_door_event_during_idle_run() -> None:
'It should update state but not pause on door open when implicitly active.'
subject = CommandStore()
door_open_event = DoorStateNotification(new_state=DoorState.OPEN, blocking=True)
door_close_event = DoorStateNotification(new_state=DoorState.CLOSED, blocking=False)
subject.handle_action(HardwareEventAction(event=door_open_event))
assert (subject.state == CommandState(queue_status=QueueStatus.IMPLICITLY_ACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=True, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))
subject.handle_action(HardwareEventAction(event=door_close_event))
assert (subject.state == CommandState(queue_status=QueueStatus.IMPLICITLY_ACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | It should update state but not pause on door open when implicitly active. | api/tests/opentrons/protocol_engine/state/test_command_store.py | test_handles_door_event_during_idle_run | Opentrons/labware | 2 | python | def test_handles_door_event_during_idle_run() -> None:
subject = CommandStore()
door_open_event = DoorStateNotification(new_state=DoorState.OPEN, blocking=True)
door_close_event = DoorStateNotification(new_state=DoorState.CLOSED, blocking=False)
subject.handle_action(HardwareEventAction(event=door_open_event))
assert (subject.state == CommandState(queue_status=QueueStatus.IMPLICITLY_ACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=True, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))
subject.handle_action(HardwareEventAction(event=door_close_event))
assert (subject.state == CommandState(queue_status=QueueStatus.IMPLICITLY_ACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={})) | def test_handles_door_event_during_idle_run() -> None:
subject = CommandStore()
door_open_event = DoorStateNotification(new_state=DoorState.OPEN, blocking=True)
door_close_event = DoorStateNotification(new_state=DoorState.CLOSED, blocking=False)
subject.handle_action(HardwareEventAction(event=door_open_event))
assert (subject.state == CommandState(queue_status=QueueStatus.IMPLICITLY_ACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=True, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))
subject.handle_action(HardwareEventAction(event=door_close_event))
assert (subject.state == CommandState(queue_status=QueueStatus.IMPLICITLY_ACTIVE, run_result=None, is_hardware_stopped=False, is_door_blocking=False, running_command_id=None, all_command_ids=[], queued_command_ids=OrderedSet(), commands_by_id=OrderedDict(), errors_by_id={}))<|docstring|>It should update state but not pause on door open when implicitly active.<|endoftext|> |
9a32b5494dd3ee10617971a328b792bba3d3778610e0348efe6d55274862ab71 | def process_data(args, tfrecord_path):
'\n Load all images in threcods, and save it on args.output_path\n '
logger.info(f'Start process tfrecord {tfrecord_path}')
path_to_save = args.output_path
for (i, record) in enumerate(tf.python_io.tf_record_iterator(tfrecord_path)):
example = tf.train.Example()
example.ParseFromString(record)
feat = example.features.feature
img = feat[args.image_key].bytes_list.value[0]
img_ = Image.open(io.BytesIO(img))
img_name = feat[args.filename_key].bytes_list.value[0].decode('utf-8')
if ('/' in img_name):
img_name = img_name.replace('/', '-')
pts = os.path.join(path_to_save, img_name)
img_.save(pts) | Load all images in threcods, and save it on args.output_path | extract_frames_from_tfrecords.py | process_data | alexeyhorkin/tfrecord-viewer | 0 | python | def process_data(args, tfrecord_path):
'\n \n '
logger.info(f'Start process tfrecord {tfrecord_path}')
path_to_save = args.output_path
for (i, record) in enumerate(tf.python_io.tf_record_iterator(tfrecord_path)):
example = tf.train.Example()
example.ParseFromString(record)
feat = example.features.feature
img = feat[args.image_key].bytes_list.value[0]
img_ = Image.open(io.BytesIO(img))
img_name = feat[args.filename_key].bytes_list.value[0].decode('utf-8')
if ('/' in img_name):
img_name = img_name.replace('/', '-')
pts = os.path.join(path_to_save, img_name)
img_.save(pts) | def process_data(args, tfrecord_path):
'\n \n '
logger.info(f'Start process tfrecord {tfrecord_path}')
path_to_save = args.output_path
for (i, record) in enumerate(tf.python_io.tf_record_iterator(tfrecord_path)):
example = tf.train.Example()
example.ParseFromString(record)
feat = example.features.feature
img = feat[args.image_key].bytes_list.value[0]
img_ = Image.open(io.BytesIO(img))
img_name = feat[args.filename_key].bytes_list.value[0].decode('utf-8')
if ('/' in img_name):
img_name = img_name.replace('/', '-')
pts = os.path.join(path_to_save, img_name)
img_.save(pts)<|docstring|>Load all images in threcods, and save it on args.output_path<|endoftext|> |
2747e1d3de2efd68fb89a78ba60fa57e78d357cc36cf3cb6cd3ad750f3ae52a9 | def get_by_share(self, resource_group_name, account_name, share_name, provider_share_subscription_id, **kwargs):
'Get share subscription in a provider share.\n\n Get share subscription in a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param provider_share_subscription_id: To locate shareSubscription.\n :type provider_share_subscription_id: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :return: ProviderShareSubscription or the result of cls(response)\n :rtype: ~data_share_management_client.models.ProviderShareSubscription\n :raises: ~azure.core.exceptions.HttpResponseError\n '
cls = kwargs.pop('cls', None)
error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
api_version = '2019-11-01'
url = self.get_by_share.metadata['url']
path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'accountName': self._serialize.url('account_name', account_name, 'str'), 'shareName': self._serialize.url('share_name', share_name, 'str'), 'providerShareSubscriptionId': self._serialize.url('provider_share_subscription_id', provider_share_subscription_id, 'str')}
url = self._client.format_url(url, **path_format_arguments)
query_parameters = {}
query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if (response.status_code not in [200]):
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.DataShareError, response)
raise HttpResponseError(response=response, model=error)
deserialized = self._deserialize('ProviderShareSubscription', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized | Get share subscription in a provider share.
Get share subscription in a provider share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param provider_share_subscription_id: To locate shareSubscription.
:type provider_share_subscription_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ProviderShareSubscription or the result of cls(response)
:rtype: ~data_share_management_client.models.ProviderShareSubscription
:raises: ~azure.core.exceptions.HttpResponseError | src/datashare/azext_datashare/vendored_sdks/datashare/operations/_provider_share_subscription_operations.py | get_by_share | v-chhbhoi/azure-cli-extensions | 207 | python | def get_by_share(self, resource_group_name, account_name, share_name, provider_share_subscription_id, **kwargs):
'Get share subscription in a provider share.\n\n Get share subscription in a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param provider_share_subscription_id: To locate shareSubscription.\n :type provider_share_subscription_id: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :return: ProviderShareSubscription or the result of cls(response)\n :rtype: ~data_share_management_client.models.ProviderShareSubscription\n :raises: ~azure.core.exceptions.HttpResponseError\n '
cls = kwargs.pop('cls', None)
error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
api_version = '2019-11-01'
url = self.get_by_share.metadata['url']
path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'accountName': self._serialize.url('account_name', account_name, 'str'), 'shareName': self._serialize.url('share_name', share_name, 'str'), 'providerShareSubscriptionId': self._serialize.url('provider_share_subscription_id', provider_share_subscription_id, 'str')}
url = self._client.format_url(url, **path_format_arguments)
query_parameters = {}
query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if (response.status_code not in [200]):
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.DataShareError, response)
raise HttpResponseError(response=response, model=error)
deserialized = self._deserialize('ProviderShareSubscription', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized | def get_by_share(self, resource_group_name, account_name, share_name, provider_share_subscription_id, **kwargs):
'Get share subscription in a provider share.\n\n Get share subscription in a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param provider_share_subscription_id: To locate shareSubscription.\n :type provider_share_subscription_id: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :return: ProviderShareSubscription or the result of cls(response)\n :rtype: ~data_share_management_client.models.ProviderShareSubscription\n :raises: ~azure.core.exceptions.HttpResponseError\n '
cls = kwargs.pop('cls', None)
error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
api_version = '2019-11-01'
url = self.get_by_share.metadata['url']
path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'accountName': self._serialize.url('account_name', account_name, 'str'), 'shareName': self._serialize.url('share_name', share_name, 'str'), 'providerShareSubscriptionId': self._serialize.url('provider_share_subscription_id', provider_share_subscription_id, 'str')}
url = self._client.format_url(url, **path_format_arguments)
query_parameters = {}
query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if (response.status_code not in [200]):
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.DataShareError, response)
raise HttpResponseError(response=response, model=error)
deserialized = self._deserialize('ProviderShareSubscription', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized<|docstring|>Get share subscription in a provider share.
Get share subscription in a provider share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param provider_share_subscription_id: To locate shareSubscription.
:type provider_share_subscription_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ProviderShareSubscription or the result of cls(response)
:rtype: ~data_share_management_client.models.ProviderShareSubscription
:raises: ~azure.core.exceptions.HttpResponseError<|endoftext|> |
42f0d71d655bd5b73cbb511b34bba0dd41df5976290888d6025cd4c463ec5038 | def list_by_share(self, resource_group_name, account_name, share_name, skip_token=None, **kwargs):
'List share subscriptions in a provider share.\n\n List of available share subscriptions to a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param skip_token: Continuation Token.\n :type skip_token: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :return: ProviderShareSubscriptionList or the result of cls(response)\n :rtype: ~data_share_management_client.models.ProviderShareSubscriptionList\n :raises: ~azure.core.exceptions.HttpResponseError\n '
cls = kwargs.pop('cls', None)
error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
api_version = '2019-11-01'
def prepare_request(next_link=None):
if (not next_link):
url = self.list_by_share.metadata['url']
path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'accountName': self._serialize.url('account_name', account_name, 'str'), 'shareName': self._serialize.url('share_name', share_name, 'str')}
url = self._client.format_url(url, **path_format_arguments)
else:
url = next_link
query_parameters = {}
query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
if (skip_token is not None):
query_parameters['$skipToken'] = self._serialize.query('skip_token', skip_token, 'str')
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
deserialized = self._deserialize('ProviderShareSubscriptionList', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return ((deserialized.next_link or None), iter(list_of_elem))
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if (response.status_code not in [200]):
error = self._deserialize(models.DataShareError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error)
return pipeline_response
return ItemPaged(get_next, extract_data) | List share subscriptions in a provider share.
List of available share subscriptions to a provider share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param skip_token: Continuation Token.
:type skip_token: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ProviderShareSubscriptionList or the result of cls(response)
:rtype: ~data_share_management_client.models.ProviderShareSubscriptionList
:raises: ~azure.core.exceptions.HttpResponseError | src/datashare/azext_datashare/vendored_sdks/datashare/operations/_provider_share_subscription_operations.py | list_by_share | v-chhbhoi/azure-cli-extensions | 207 | python | def list_by_share(self, resource_group_name, account_name, share_name, skip_token=None, **kwargs):
'List share subscriptions in a provider share.\n\n List of available share subscriptions to a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param skip_token: Continuation Token.\n :type skip_token: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :return: ProviderShareSubscriptionList or the result of cls(response)\n :rtype: ~data_share_management_client.models.ProviderShareSubscriptionList\n :raises: ~azure.core.exceptions.HttpResponseError\n '
cls = kwargs.pop('cls', None)
error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
api_version = '2019-11-01'
def prepare_request(next_link=None):
if (not next_link):
url = self.list_by_share.metadata['url']
path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'accountName': self._serialize.url('account_name', account_name, 'str'), 'shareName': self._serialize.url('share_name', share_name, 'str')}
url = self._client.format_url(url, **path_format_arguments)
else:
url = next_link
query_parameters = {}
query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
if (skip_token is not None):
query_parameters['$skipToken'] = self._serialize.query('skip_token', skip_token, 'str')
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
deserialized = self._deserialize('ProviderShareSubscriptionList', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return ((deserialized.next_link or None), iter(list_of_elem))
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if (response.status_code not in [200]):
error = self._deserialize(models.DataShareError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error)
return pipeline_response
return ItemPaged(get_next, extract_data) | def list_by_share(self, resource_group_name, account_name, share_name, skip_token=None, **kwargs):
'List share subscriptions in a provider share.\n\n List of available share subscriptions to a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param skip_token: Continuation Token.\n :type skip_token: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :return: ProviderShareSubscriptionList or the result of cls(response)\n :rtype: ~data_share_management_client.models.ProviderShareSubscriptionList\n :raises: ~azure.core.exceptions.HttpResponseError\n '
cls = kwargs.pop('cls', None)
error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
api_version = '2019-11-01'
def prepare_request(next_link=None):
if (not next_link):
url = self.list_by_share.metadata['url']
path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'accountName': self._serialize.url('account_name', account_name, 'str'), 'shareName': self._serialize.url('share_name', share_name, 'str')}
url = self._client.format_url(url, **path_format_arguments)
else:
url = next_link
query_parameters = {}
query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
if (skip_token is not None):
query_parameters['$skipToken'] = self._serialize.query('skip_token', skip_token, 'str')
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
deserialized = self._deserialize('ProviderShareSubscriptionList', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return ((deserialized.next_link or None), iter(list_of_elem))
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if (response.status_code not in [200]):
error = self._deserialize(models.DataShareError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error)
return pipeline_response
return ItemPaged(get_next, extract_data)<|docstring|>List share subscriptions in a provider share.
List of available share subscriptions to a provider share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param skip_token: Continuation Token.
:type skip_token: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ProviderShareSubscriptionList or the result of cls(response)
:rtype: ~data_share_management_client.models.ProviderShareSubscriptionList
:raises: ~azure.core.exceptions.HttpResponseError<|endoftext|> |
792943170699f3afec706de51d1fd1d7e303a66f6c6b29eee2984e2916694c80 | def begin_revoke(self, resource_group_name, account_name, share_name, provider_share_subscription_id, **kwargs):
'Revoke share subscription in a provider share.\n\n Revoke share subscription in a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param provider_share_subscription_id: To locate shareSubscription.\n :type provider_share_subscription_id: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n :paramtype polling: bool or ~azure.core.polling.PollingMethod\n :return: An instance of LROPoller that returns ProviderShareSubscription\n :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ProviderShareSubscription]\n\n :raises ~azure.core.exceptions.HttpResponseError:\n '
polling = kwargs.pop('polling', False)
cls = kwargs.pop('cls', None)
raw_result = self._revoke_initial(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, provider_share_subscription_id=provider_share_subscription_id, cls=(lambda x, y, z: x), **kwargs)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('ProviderShareSubscription', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
lro_delay = kwargs.get('polling_interval', self._config.polling_interval)
if (polling is True):
raise ValueError('polling being True is not valid because no default polling implemetation has been defined.')
elif (polling is False):
polling_method = NoPolling()
else:
polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method) | Revoke share subscription in a provider share.
Revoke share subscription in a provider share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param provider_share_subscription_id: To locate shareSubscription.
:type provider_share_subscription_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:return: An instance of LROPoller that returns ProviderShareSubscription
:rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ProviderShareSubscription]
:raises ~azure.core.exceptions.HttpResponseError: | src/datashare/azext_datashare/vendored_sdks/datashare/operations/_provider_share_subscription_operations.py | begin_revoke | v-chhbhoi/azure-cli-extensions | 207 | python | def begin_revoke(self, resource_group_name, account_name, share_name, provider_share_subscription_id, **kwargs):
'Revoke share subscription in a provider share.\n\n Revoke share subscription in a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param provider_share_subscription_id: To locate shareSubscription.\n :type provider_share_subscription_id: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n :paramtype polling: bool or ~azure.core.polling.PollingMethod\n :return: An instance of LROPoller that returns ProviderShareSubscription\n :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ProviderShareSubscription]\n\n :raises ~azure.core.exceptions.HttpResponseError:\n '
polling = kwargs.pop('polling', False)
cls = kwargs.pop('cls', None)
raw_result = self._revoke_initial(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, provider_share_subscription_id=provider_share_subscription_id, cls=(lambda x, y, z: x), **kwargs)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('ProviderShareSubscription', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
lro_delay = kwargs.get('polling_interval', self._config.polling_interval)
if (polling is True):
raise ValueError('polling being True is not valid because no default polling implemetation has been defined.')
elif (polling is False):
polling_method = NoPolling()
else:
polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method) | def begin_revoke(self, resource_group_name, account_name, share_name, provider_share_subscription_id, **kwargs):
'Revoke share subscription in a provider share.\n\n Revoke share subscription in a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param provider_share_subscription_id: To locate shareSubscription.\n :type provider_share_subscription_id: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n :paramtype polling: bool or ~azure.core.polling.PollingMethod\n :return: An instance of LROPoller that returns ProviderShareSubscription\n :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ProviderShareSubscription]\n\n :raises ~azure.core.exceptions.HttpResponseError:\n '
polling = kwargs.pop('polling', False)
cls = kwargs.pop('cls', None)
raw_result = self._revoke_initial(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, provider_share_subscription_id=provider_share_subscription_id, cls=(lambda x, y, z: x), **kwargs)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('ProviderShareSubscription', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
lro_delay = kwargs.get('polling_interval', self._config.polling_interval)
if (polling is True):
raise ValueError('polling being True is not valid because no default polling implemetation has been defined.')
elif (polling is False):
polling_method = NoPolling()
else:
polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<|docstring|>Revoke share subscription in a provider share.
Revoke share subscription in a provider share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param provider_share_subscription_id: To locate shareSubscription.
:type provider_share_subscription_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:return: An instance of LROPoller that returns ProviderShareSubscription
:rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ProviderShareSubscription]
:raises ~azure.core.exceptions.HttpResponseError:<|endoftext|> |
4a92ac8bbbc47de4fdc12e098df7a5cf76a5e74d51a2ac0a9c1fd624604c5c52 | def reinstate(self, resource_group_name, account_name, share_name, provider_share_subscription_id, **kwargs):
'Reinstate share subscription in a provider share.\n\n Reinstate share subscription in a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param provider_share_subscription_id: To locate shareSubscription.\n :type provider_share_subscription_id: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :return: ProviderShareSubscription or the result of cls(response)\n :rtype: ~data_share_management_client.models.ProviderShareSubscription\n :raises: ~azure.core.exceptions.HttpResponseError\n '
cls = kwargs.pop('cls', None)
error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
api_version = '2019-11-01'
url = self.reinstate.metadata['url']
path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'accountName': self._serialize.url('account_name', account_name, 'str'), 'shareName': self._serialize.url('share_name', share_name, 'str'), 'providerShareSubscriptionId': self._serialize.url('provider_share_subscription_id', provider_share_subscription_id, 'str')}
url = self._client.format_url(url, **path_format_arguments)
query_parameters = {}
query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if (response.status_code not in [200]):
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.DataShareError, response)
raise HttpResponseError(response=response, model=error)
deserialized = self._deserialize('ProviderShareSubscription', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized | Reinstate share subscription in a provider share.
Reinstate share subscription in a provider share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param provider_share_subscription_id: To locate shareSubscription.
:type provider_share_subscription_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ProviderShareSubscription or the result of cls(response)
:rtype: ~data_share_management_client.models.ProviderShareSubscription
:raises: ~azure.core.exceptions.HttpResponseError | src/datashare/azext_datashare/vendored_sdks/datashare/operations/_provider_share_subscription_operations.py | reinstate | v-chhbhoi/azure-cli-extensions | 207 | python | def reinstate(self, resource_group_name, account_name, share_name, provider_share_subscription_id, **kwargs):
'Reinstate share subscription in a provider share.\n\n Reinstate share subscription in a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param provider_share_subscription_id: To locate shareSubscription.\n :type provider_share_subscription_id: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :return: ProviderShareSubscription or the result of cls(response)\n :rtype: ~data_share_management_client.models.ProviderShareSubscription\n :raises: ~azure.core.exceptions.HttpResponseError\n '
cls = kwargs.pop('cls', None)
error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
api_version = '2019-11-01'
url = self.reinstate.metadata['url']
path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'accountName': self._serialize.url('account_name', account_name, 'str'), 'shareName': self._serialize.url('share_name', share_name, 'str'), 'providerShareSubscriptionId': self._serialize.url('provider_share_subscription_id', provider_share_subscription_id, 'str')}
url = self._client.format_url(url, **path_format_arguments)
query_parameters = {}
query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if (response.status_code not in [200]):
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.DataShareError, response)
raise HttpResponseError(response=response, model=error)
deserialized = self._deserialize('ProviderShareSubscription', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized | def reinstate(self, resource_group_name, account_name, share_name, provider_share_subscription_id, **kwargs):
'Reinstate share subscription in a provider share.\n\n Reinstate share subscription in a provider share.\n\n :param resource_group_name: The resource group name.\n :type resource_group_name: str\n :param account_name: The name of the share account.\n :type account_name: str\n :param share_name: The name of the share.\n :type share_name: str\n :param provider_share_subscription_id: To locate shareSubscription.\n :type provider_share_subscription_id: str\n :keyword callable cls: A custom type or function that will be passed the direct response\n :return: ProviderShareSubscription or the result of cls(response)\n :rtype: ~data_share_management_client.models.ProviderShareSubscription\n :raises: ~azure.core.exceptions.HttpResponseError\n '
cls = kwargs.pop('cls', None)
error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
api_version = '2019-11-01'
url = self.reinstate.metadata['url']
path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'accountName': self._serialize.url('account_name', account_name, 'str'), 'shareName': self._serialize.url('share_name', share_name, 'str'), 'providerShareSubscriptionId': self._serialize.url('provider_share_subscription_id', provider_share_subscription_id, 'str')}
url = self._client.format_url(url, **path_format_arguments)
query_parameters = {}
query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if (response.status_code not in [200]):
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.DataShareError, response)
raise HttpResponseError(response=response, model=error)
deserialized = self._deserialize('ProviderShareSubscription', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized<|docstring|>Reinstate share subscription in a provider share.
Reinstate share subscription in a provider share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param provider_share_subscription_id: To locate shareSubscription.
:type provider_share_subscription_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ProviderShareSubscription or the result of cls(response)
:rtype: ~data_share_management_client.models.ProviderShareSubscription
:raises: ~azure.core.exceptions.HttpResponseError<|endoftext|> |
85fe91cc2718adb69156cf6fafdabf7f441ba90448b0df0cafcaa092b63ef857 | @commands.command()
@commands.has_any_role('Moderators')
async def protect(self, ctx: commands.Context) -> None:
'\n Do mysterious things.\n Note: this is an on/off switch command.\n '
self.is_protection_on = (not self.is_protection_on)
(await ctx.send('Protection is {}'.format(self.is_protection_on))) | Do mysterious things.
Note: this is an on/off switch command. | Modules/Authentication.py | protect | Skk-nsmt/reina | 0 | python | @commands.command()
@commands.has_any_role('Moderators')
async def protect(self, ctx: commands.Context) -> None:
'\n Do mysterious things.\n Note: this is an on/off switch command.\n '
self.is_protection_on = (not self.is_protection_on)
(await ctx.send('Protection is {}'.format(self.is_protection_on))) | @commands.command()
@commands.has_any_role('Moderators')
async def protect(self, ctx: commands.Context) -> None:
'\n Do mysterious things.\n Note: this is an on/off switch command.\n '
self.is_protection_on = (not self.is_protection_on)
(await ctx.send('Protection is {}'.format(self.is_protection_on)))<|docstring|>Do mysterious things.
Note: this is an on/off switch command.<|endoftext|> |
90696b267cbed841d74b100e812a15ac056969dcf09634e8e5be41ac8cd2b670 | def __init__(__self__, *, resource_group_name: pulumi.Input[str], additional_capabilities: Optional[pulumi.Input['AdditionalCapabilitiesArgs']]=None, availability_set: Optional[pulumi.Input['SubResourceArgs']]=None, billing_profile: Optional[pulumi.Input['BillingProfileArgs']]=None, diagnostics_profile: Optional[pulumi.Input['DiagnosticsProfileArgs']]=None, eviction_policy: Optional[pulumi.Input[Union[(str, 'VirtualMachineEvictionPolicyTypes')]]]=None, hardware_profile: Optional[pulumi.Input['HardwareProfileArgs']]=None, host: Optional[pulumi.Input['SubResourceArgs']]=None, identity: Optional[pulumi.Input['VirtualMachineIdentityArgs']]=None, license_type: Optional[pulumi.Input[str]]=None, location: Optional[pulumi.Input[str]]=None, network_profile: Optional[pulumi.Input['NetworkProfileArgs']]=None, os_profile: Optional[pulumi.Input['OSProfileArgs']]=None, plan: Optional[pulumi.Input['PlanArgs']]=None, priority: Optional[pulumi.Input[Union[(str, 'VirtualMachinePriorityTypes')]]]=None, proximity_placement_group: Optional[pulumi.Input['SubResourceArgs']]=None, storage_profile: Optional[pulumi.Input['StorageProfileArgs']]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, virtual_machine_scale_set: Optional[pulumi.Input['SubResourceArgs']]=None, vm_name: Optional[pulumi.Input[str]]=None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None):
"\n The set of arguments for constructing a VirtualMachine resource.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input['AdditionalCapabilitiesArgs'] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.\n :param pulumi.Input['SubResourceArgs'] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.\n :param pulumi.Input['BillingProfileArgs'] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.\n :param pulumi.Input['DiagnosticsProfileArgs'] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.\n :param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.\n :param pulumi.Input['HardwareProfileArgs'] hardware_profile: Specifies the hardware settings for the virtual machine.\n :param pulumi.Input['SubResourceArgs'] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.\n :param pulumi.Input['VirtualMachineIdentityArgs'] identity: The identity of the virtual machine, if configured.\n :param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15\n :param pulumi.Input[str] location: Resource location\n :param pulumi.Input['NetworkProfileArgs'] network_profile: Specifies the network interfaces of the virtual machine.\n :param pulumi.Input['OSProfileArgs'] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.\n :param pulumi.Input['PlanArgs'] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.\n :param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01\n :param pulumi.Input['SubResourceArgs'] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.\n :param pulumi.Input['StorageProfileArgs'] storage_profile: Specifies the storage settings for the virtual machine disks.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags\n :param pulumi.Input['SubResourceArgs'] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01\n :param pulumi.Input[str] vm_name: The name of the virtual machine.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones.\n "
pulumi.set(__self__, 'resource_group_name', resource_group_name)
if (additional_capabilities is not None):
pulumi.set(__self__, 'additional_capabilities', additional_capabilities)
if (availability_set is not None):
pulumi.set(__self__, 'availability_set', availability_set)
if (billing_profile is not None):
pulumi.set(__self__, 'billing_profile', billing_profile)
if (diagnostics_profile is not None):
pulumi.set(__self__, 'diagnostics_profile', diagnostics_profile)
if (eviction_policy is not None):
pulumi.set(__self__, 'eviction_policy', eviction_policy)
if (hardware_profile is not None):
pulumi.set(__self__, 'hardware_profile', hardware_profile)
if (host is not None):
pulumi.set(__self__, 'host', host)
if (identity is not None):
pulumi.set(__self__, 'identity', identity)
if (license_type is not None):
pulumi.set(__self__, 'license_type', license_type)
if (location is not None):
pulumi.set(__self__, 'location', location)
if (network_profile is not None):
pulumi.set(__self__, 'network_profile', network_profile)
if (os_profile is not None):
pulumi.set(__self__, 'os_profile', os_profile)
if (plan is not None):
pulumi.set(__self__, 'plan', plan)
if (priority is not None):
pulumi.set(__self__, 'priority', priority)
if (proximity_placement_group is not None):
pulumi.set(__self__, 'proximity_placement_group', proximity_placement_group)
if (storage_profile is not None):
pulumi.set(__self__, 'storage_profile', storage_profile)
if (tags is not None):
pulumi.set(__self__, 'tags', tags)
if (virtual_machine_scale_set is not None):
pulumi.set(__self__, 'virtual_machine_scale_set', virtual_machine_scale_set)
if (vm_name is not None):
pulumi.set(__self__, 'vm_name', vm_name)
if (zones is not None):
pulumi.set(__self__, 'zones', zones) | The set of arguments for constructing a VirtualMachine resource.
:param pulumi.Input[str] resource_group_name: The name of the resource group.
:param pulumi.Input['AdditionalCapabilitiesArgs'] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.
:param pulumi.Input['SubResourceArgs'] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
:param pulumi.Input['BillingProfileArgs'] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
:param pulumi.Input['DiagnosticsProfileArgs'] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
:param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
:param pulumi.Input['HardwareProfileArgs'] hardware_profile: Specifies the hardware settings for the virtual machine.
:param pulumi.Input['SubResourceArgs'] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
:param pulumi.Input['VirtualMachineIdentityArgs'] identity: The identity of the virtual machine, if configured.
:param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
:param pulumi.Input[str] location: Resource location
:param pulumi.Input['NetworkProfileArgs'] network_profile: Specifies the network interfaces of the virtual machine.
:param pulumi.Input['OSProfileArgs'] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
:param pulumi.Input['PlanArgs'] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
:param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01
:param pulumi.Input['SubResourceArgs'] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
:param pulumi.Input['StorageProfileArgs'] storage_profile: Specifies the storage settings for the virtual machine disks.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags
:param pulumi.Input['SubResourceArgs'] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01
:param pulumi.Input[str] vm_name: The name of the virtual machine.
:param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | __init__ | polivbr/pulumi-azure-native | 0 | python | def __init__(__self__, *, resource_group_name: pulumi.Input[str], additional_capabilities: Optional[pulumi.Input['AdditionalCapabilitiesArgs']]=None, availability_set: Optional[pulumi.Input['SubResourceArgs']]=None, billing_profile: Optional[pulumi.Input['BillingProfileArgs']]=None, diagnostics_profile: Optional[pulumi.Input['DiagnosticsProfileArgs']]=None, eviction_policy: Optional[pulumi.Input[Union[(str, 'VirtualMachineEvictionPolicyTypes')]]]=None, hardware_profile: Optional[pulumi.Input['HardwareProfileArgs']]=None, host: Optional[pulumi.Input['SubResourceArgs']]=None, identity: Optional[pulumi.Input['VirtualMachineIdentityArgs']]=None, license_type: Optional[pulumi.Input[str]]=None, location: Optional[pulumi.Input[str]]=None, network_profile: Optional[pulumi.Input['NetworkProfileArgs']]=None, os_profile: Optional[pulumi.Input['OSProfileArgs']]=None, plan: Optional[pulumi.Input['PlanArgs']]=None, priority: Optional[pulumi.Input[Union[(str, 'VirtualMachinePriorityTypes')]]]=None, proximity_placement_group: Optional[pulumi.Input['SubResourceArgs']]=None, storage_profile: Optional[pulumi.Input['StorageProfileArgs']]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, virtual_machine_scale_set: Optional[pulumi.Input['SubResourceArgs']]=None, vm_name: Optional[pulumi.Input[str]]=None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None):
"\n The set of arguments for constructing a VirtualMachine resource.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input['AdditionalCapabilitiesArgs'] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.\n :param pulumi.Input['SubResourceArgs'] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.\n :param pulumi.Input['BillingProfileArgs'] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.\n :param pulumi.Input['DiagnosticsProfileArgs'] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.\n :param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.\n :param pulumi.Input['HardwareProfileArgs'] hardware_profile: Specifies the hardware settings for the virtual machine.\n :param pulumi.Input['SubResourceArgs'] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.\n :param pulumi.Input['VirtualMachineIdentityArgs'] identity: The identity of the virtual machine, if configured.\n :param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15\n :param pulumi.Input[str] location: Resource location\n :param pulumi.Input['NetworkProfileArgs'] network_profile: Specifies the network interfaces of the virtual machine.\n :param pulumi.Input['OSProfileArgs'] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.\n :param pulumi.Input['PlanArgs'] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.\n :param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01\n :param pulumi.Input['SubResourceArgs'] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.\n :param pulumi.Input['StorageProfileArgs'] storage_profile: Specifies the storage settings for the virtual machine disks.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags\n :param pulumi.Input['SubResourceArgs'] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01\n :param pulumi.Input[str] vm_name: The name of the virtual machine.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones.\n "
pulumi.set(__self__, 'resource_group_name', resource_group_name)
if (additional_capabilities is not None):
pulumi.set(__self__, 'additional_capabilities', additional_capabilities)
if (availability_set is not None):
pulumi.set(__self__, 'availability_set', availability_set)
if (billing_profile is not None):
pulumi.set(__self__, 'billing_profile', billing_profile)
if (diagnostics_profile is not None):
pulumi.set(__self__, 'diagnostics_profile', diagnostics_profile)
if (eviction_policy is not None):
pulumi.set(__self__, 'eviction_policy', eviction_policy)
if (hardware_profile is not None):
pulumi.set(__self__, 'hardware_profile', hardware_profile)
if (host is not None):
pulumi.set(__self__, 'host', host)
if (identity is not None):
pulumi.set(__self__, 'identity', identity)
if (license_type is not None):
pulumi.set(__self__, 'license_type', license_type)
if (location is not None):
pulumi.set(__self__, 'location', location)
if (network_profile is not None):
pulumi.set(__self__, 'network_profile', network_profile)
if (os_profile is not None):
pulumi.set(__self__, 'os_profile', os_profile)
if (plan is not None):
pulumi.set(__self__, 'plan', plan)
if (priority is not None):
pulumi.set(__self__, 'priority', priority)
if (proximity_placement_group is not None):
pulumi.set(__self__, 'proximity_placement_group', proximity_placement_group)
if (storage_profile is not None):
pulumi.set(__self__, 'storage_profile', storage_profile)
if (tags is not None):
pulumi.set(__self__, 'tags', tags)
if (virtual_machine_scale_set is not None):
pulumi.set(__self__, 'virtual_machine_scale_set', virtual_machine_scale_set)
if (vm_name is not None):
pulumi.set(__self__, 'vm_name', vm_name)
if (zones is not None):
pulumi.set(__self__, 'zones', zones) | def __init__(__self__, *, resource_group_name: pulumi.Input[str], additional_capabilities: Optional[pulumi.Input['AdditionalCapabilitiesArgs']]=None, availability_set: Optional[pulumi.Input['SubResourceArgs']]=None, billing_profile: Optional[pulumi.Input['BillingProfileArgs']]=None, diagnostics_profile: Optional[pulumi.Input['DiagnosticsProfileArgs']]=None, eviction_policy: Optional[pulumi.Input[Union[(str, 'VirtualMachineEvictionPolicyTypes')]]]=None, hardware_profile: Optional[pulumi.Input['HardwareProfileArgs']]=None, host: Optional[pulumi.Input['SubResourceArgs']]=None, identity: Optional[pulumi.Input['VirtualMachineIdentityArgs']]=None, license_type: Optional[pulumi.Input[str]]=None, location: Optional[pulumi.Input[str]]=None, network_profile: Optional[pulumi.Input['NetworkProfileArgs']]=None, os_profile: Optional[pulumi.Input['OSProfileArgs']]=None, plan: Optional[pulumi.Input['PlanArgs']]=None, priority: Optional[pulumi.Input[Union[(str, 'VirtualMachinePriorityTypes')]]]=None, proximity_placement_group: Optional[pulumi.Input['SubResourceArgs']]=None, storage_profile: Optional[pulumi.Input['StorageProfileArgs']]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, virtual_machine_scale_set: Optional[pulumi.Input['SubResourceArgs']]=None, vm_name: Optional[pulumi.Input[str]]=None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None):
"\n The set of arguments for constructing a VirtualMachine resource.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input['AdditionalCapabilitiesArgs'] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.\n :param pulumi.Input['SubResourceArgs'] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.\n :param pulumi.Input['BillingProfileArgs'] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.\n :param pulumi.Input['DiagnosticsProfileArgs'] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.\n :param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.\n :param pulumi.Input['HardwareProfileArgs'] hardware_profile: Specifies the hardware settings for the virtual machine.\n :param pulumi.Input['SubResourceArgs'] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.\n :param pulumi.Input['VirtualMachineIdentityArgs'] identity: The identity of the virtual machine, if configured.\n :param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15\n :param pulumi.Input[str] location: Resource location\n :param pulumi.Input['NetworkProfileArgs'] network_profile: Specifies the network interfaces of the virtual machine.\n :param pulumi.Input['OSProfileArgs'] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.\n :param pulumi.Input['PlanArgs'] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.\n :param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01\n :param pulumi.Input['SubResourceArgs'] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.\n :param pulumi.Input['StorageProfileArgs'] storage_profile: Specifies the storage settings for the virtual machine disks.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags\n :param pulumi.Input['SubResourceArgs'] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01\n :param pulumi.Input[str] vm_name: The name of the virtual machine.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones.\n "
pulumi.set(__self__, 'resource_group_name', resource_group_name)
if (additional_capabilities is not None):
pulumi.set(__self__, 'additional_capabilities', additional_capabilities)
if (availability_set is not None):
pulumi.set(__self__, 'availability_set', availability_set)
if (billing_profile is not None):
pulumi.set(__self__, 'billing_profile', billing_profile)
if (diagnostics_profile is not None):
pulumi.set(__self__, 'diagnostics_profile', diagnostics_profile)
if (eviction_policy is not None):
pulumi.set(__self__, 'eviction_policy', eviction_policy)
if (hardware_profile is not None):
pulumi.set(__self__, 'hardware_profile', hardware_profile)
if (host is not None):
pulumi.set(__self__, 'host', host)
if (identity is not None):
pulumi.set(__self__, 'identity', identity)
if (license_type is not None):
pulumi.set(__self__, 'license_type', license_type)
if (location is not None):
pulumi.set(__self__, 'location', location)
if (network_profile is not None):
pulumi.set(__self__, 'network_profile', network_profile)
if (os_profile is not None):
pulumi.set(__self__, 'os_profile', os_profile)
if (plan is not None):
pulumi.set(__self__, 'plan', plan)
if (priority is not None):
pulumi.set(__self__, 'priority', priority)
if (proximity_placement_group is not None):
pulumi.set(__self__, 'proximity_placement_group', proximity_placement_group)
if (storage_profile is not None):
pulumi.set(__self__, 'storage_profile', storage_profile)
if (tags is not None):
pulumi.set(__self__, 'tags', tags)
if (virtual_machine_scale_set is not None):
pulumi.set(__self__, 'virtual_machine_scale_set', virtual_machine_scale_set)
if (vm_name is not None):
pulumi.set(__self__, 'vm_name', vm_name)
if (zones is not None):
pulumi.set(__self__, 'zones', zones)<|docstring|>The set of arguments for constructing a VirtualMachine resource.
:param pulumi.Input[str] resource_group_name: The name of the resource group.
:param pulumi.Input['AdditionalCapabilitiesArgs'] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.
:param pulumi.Input['SubResourceArgs'] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
:param pulumi.Input['BillingProfileArgs'] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
:param pulumi.Input['DiagnosticsProfileArgs'] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
:param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
:param pulumi.Input['HardwareProfileArgs'] hardware_profile: Specifies the hardware settings for the virtual machine.
:param pulumi.Input['SubResourceArgs'] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
:param pulumi.Input['VirtualMachineIdentityArgs'] identity: The identity of the virtual machine, if configured.
:param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
:param pulumi.Input[str] location: Resource location
:param pulumi.Input['NetworkProfileArgs'] network_profile: Specifies the network interfaces of the virtual machine.
:param pulumi.Input['OSProfileArgs'] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
:param pulumi.Input['PlanArgs'] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
:param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01
:param pulumi.Input['SubResourceArgs'] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
:param pulumi.Input['StorageProfileArgs'] storage_profile: Specifies the storage settings for the virtual machine disks.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags
:param pulumi.Input['SubResourceArgs'] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01
:param pulumi.Input[str] vm_name: The name of the virtual machine.
:param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones.<|endoftext|> |
98eb6c85f4a5186d9d5e838be1c375ba32ee58272931f0c5f93ad28266f15668 | @property
@pulumi.getter(name='resourceGroupName')
def resource_group_name(self) -> pulumi.Input[str]:
'\n The name of the resource group.\n '
return pulumi.get(self, 'resource_group_name') | The name of the resource group. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | resource_group_name | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='resourceGroupName')
def resource_group_name(self) -> pulumi.Input[str]:
'\n \n '
return pulumi.get(self, 'resource_group_name') | @property
@pulumi.getter(name='resourceGroupName')
def resource_group_name(self) -> pulumi.Input[str]:
'\n \n '
return pulumi.get(self, 'resource_group_name')<|docstring|>The name of the resource group.<|endoftext|> |
9e0f4a938a0a34aae14687917129978e41e4ad730c238db9e5f71f7ac3405498 | @property
@pulumi.getter(name='additionalCapabilities')
def additional_capabilities(self) -> Optional[pulumi.Input['AdditionalCapabilitiesArgs']]:
'\n Specifies additional capabilities enabled or disabled on the virtual machine.\n '
return pulumi.get(self, 'additional_capabilities') | Specifies additional capabilities enabled or disabled on the virtual machine. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | additional_capabilities | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='additionalCapabilities')
def additional_capabilities(self) -> Optional[pulumi.Input['AdditionalCapabilitiesArgs']]:
'\n \n '
return pulumi.get(self, 'additional_capabilities') | @property
@pulumi.getter(name='additionalCapabilities')
def additional_capabilities(self) -> Optional[pulumi.Input['AdditionalCapabilitiesArgs']]:
'\n \n '
return pulumi.get(self, 'additional_capabilities')<|docstring|>Specifies additional capabilities enabled or disabled on the virtual machine.<|endoftext|> |
dbb3100dc2fc6c8221b4edda4150cee9f3c8c86cc95251773c80cd04ea17a4f2 | @property
@pulumi.getter(name='availabilitySet')
def availability_set(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.\n '
return pulumi.get(self, 'availability_set') | Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | availability_set | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='availabilitySet')
def availability_set(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n \n '
return pulumi.get(self, 'availability_set') | @property
@pulumi.getter(name='availabilitySet')
def availability_set(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n \n '
return pulumi.get(self, 'availability_set')<|docstring|>Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.<|endoftext|> |
0ea4473932200105ac592392f07874c2e38721e34b3df25f9f525894251a369d | @property
@pulumi.getter(name='billingProfile')
def billing_profile(self) -> Optional[pulumi.Input['BillingProfileArgs']]:
'\n Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.\n '
return pulumi.get(self, 'billing_profile') | Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | billing_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='billingProfile')
def billing_profile(self) -> Optional[pulumi.Input['BillingProfileArgs']]:
'\n \n '
return pulumi.get(self, 'billing_profile') | @property
@pulumi.getter(name='billingProfile')
def billing_profile(self) -> Optional[pulumi.Input['BillingProfileArgs']]:
'\n \n '
return pulumi.get(self, 'billing_profile')<|docstring|>Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.<|endoftext|> |
66f9ece87a89ad27708ac486e321b1e892cac3cf0d3321c40606724441dd5ebf | @property
@pulumi.getter(name='diagnosticsProfile')
def diagnostics_profile(self) -> Optional[pulumi.Input['DiagnosticsProfileArgs']]:
'\n Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.\n '
return pulumi.get(self, 'diagnostics_profile') | Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | diagnostics_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='diagnosticsProfile')
def diagnostics_profile(self) -> Optional[pulumi.Input['DiagnosticsProfileArgs']]:
'\n \n '
return pulumi.get(self, 'diagnostics_profile') | @property
@pulumi.getter(name='diagnosticsProfile')
def diagnostics_profile(self) -> Optional[pulumi.Input['DiagnosticsProfileArgs']]:
'\n \n '
return pulumi.get(self, 'diagnostics_profile')<|docstring|>Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.<|endoftext|> |
8d1ee6599a341aef25207e93f8aa2c085aa85820a879f1df3dac23cd70fc34ff | @property
@pulumi.getter(name='evictionPolicy')
def eviction_policy(self) -> Optional[pulumi.Input[Union[(str, 'VirtualMachineEvictionPolicyTypes')]]]:
"\n Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.\n "
return pulumi.get(self, 'eviction_policy') | Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | eviction_policy | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='evictionPolicy')
def eviction_policy(self) -> Optional[pulumi.Input[Union[(str, 'VirtualMachineEvictionPolicyTypes')]]]:
"\n \n "
return pulumi.get(self, 'eviction_policy') | @property
@pulumi.getter(name='evictionPolicy')
def eviction_policy(self) -> Optional[pulumi.Input[Union[(str, 'VirtualMachineEvictionPolicyTypes')]]]:
"\n \n "
return pulumi.get(self, 'eviction_policy')<|docstring|>Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.<|endoftext|> |
df93a236a5b0d2f5bc45a8c674984d35f1807fab6375ddba88fbaa1c820012df | @property
@pulumi.getter(name='hardwareProfile')
def hardware_profile(self) -> Optional[pulumi.Input['HardwareProfileArgs']]:
'\n Specifies the hardware settings for the virtual machine.\n '
return pulumi.get(self, 'hardware_profile') | Specifies the hardware settings for the virtual machine. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | hardware_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='hardwareProfile')
def hardware_profile(self) -> Optional[pulumi.Input['HardwareProfileArgs']]:
'\n \n '
return pulumi.get(self, 'hardware_profile') | @property
@pulumi.getter(name='hardwareProfile')
def hardware_profile(self) -> Optional[pulumi.Input['HardwareProfileArgs']]:
'\n \n '
return pulumi.get(self, 'hardware_profile')<|docstring|>Specifies the hardware settings for the virtual machine.<|endoftext|> |
40d9f64db77e7a636b4745db5bf7fc148dd9426de3d07046003257ec854e6019 | @property
@pulumi.getter
def host(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.\n '
return pulumi.get(self, 'host') | Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | host | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def host(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n \n '
return pulumi.get(self, 'host') | @property
@pulumi.getter
def host(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n \n '
return pulumi.get(self, 'host')<|docstring|>Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.<|endoftext|> |
2fd49240510f2fec690fb0136436e8ee168ec25136448a6bc2f827cec76b2dc0 | @property
@pulumi.getter
def identity(self) -> Optional[pulumi.Input['VirtualMachineIdentityArgs']]:
'\n The identity of the virtual machine, if configured.\n '
return pulumi.get(self, 'identity') | The identity of the virtual machine, if configured. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | identity | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def identity(self) -> Optional[pulumi.Input['VirtualMachineIdentityArgs']]:
'\n \n '
return pulumi.get(self, 'identity') | @property
@pulumi.getter
def identity(self) -> Optional[pulumi.Input['VirtualMachineIdentityArgs']]:
'\n \n '
return pulumi.get(self, 'identity')<|docstring|>The identity of the virtual machine, if configured.<|endoftext|> |
ee02b6033f274b8644b6387000409c1b06059a0bd1587662d78488b74d2d0026 | @property
@pulumi.getter(name='licenseType')
def license_type(self) -> Optional[pulumi.Input[str]]:
'\n Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15\n '
return pulumi.get(self, 'license_type') | Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15 | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | license_type | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='licenseType')
def license_type(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'license_type') | @property
@pulumi.getter(name='licenseType')
def license_type(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'license_type')<|docstring|>Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15<|endoftext|> |
d4ad67926c047049bbbac856f68e68700f2370e6cdc3e70b27ea2432407309af | @property
@pulumi.getter
def location(self) -> Optional[pulumi.Input[str]]:
'\n Resource location\n '
return pulumi.get(self, 'location') | Resource location | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | location | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def location(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'location') | @property
@pulumi.getter
def location(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'location')<|docstring|>Resource location<|endoftext|> |
54ef7da29e846e51efeed2890032d4160416a92e858da9097290f4d8ad949779 | @property
@pulumi.getter(name='networkProfile')
def network_profile(self) -> Optional[pulumi.Input['NetworkProfileArgs']]:
'\n Specifies the network interfaces of the virtual machine.\n '
return pulumi.get(self, 'network_profile') | Specifies the network interfaces of the virtual machine. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | network_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='networkProfile')
def network_profile(self) -> Optional[pulumi.Input['NetworkProfileArgs']]:
'\n \n '
return pulumi.get(self, 'network_profile') | @property
@pulumi.getter(name='networkProfile')
def network_profile(self) -> Optional[pulumi.Input['NetworkProfileArgs']]:
'\n \n '
return pulumi.get(self, 'network_profile')<|docstring|>Specifies the network interfaces of the virtual machine.<|endoftext|> |
ebf1829d70bc87b48db663d9813478553b9112ff93782556f4b95ee08eeb598d | @property
@pulumi.getter(name='osProfile')
def os_profile(self) -> Optional[pulumi.Input['OSProfileArgs']]:
'\n Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.\n '
return pulumi.get(self, 'os_profile') | Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | os_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='osProfile')
def os_profile(self) -> Optional[pulumi.Input['OSProfileArgs']]:
'\n \n '
return pulumi.get(self, 'os_profile') | @property
@pulumi.getter(name='osProfile')
def os_profile(self) -> Optional[pulumi.Input['OSProfileArgs']]:
'\n \n '
return pulumi.get(self, 'os_profile')<|docstring|>Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.<|endoftext|> |
b3a9de59956e50db995e1738c802750bc39a1c2b7db4522fcc9920082c8e6205 | @property
@pulumi.getter
def plan(self) -> Optional[pulumi.Input['PlanArgs']]:
'\n Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.\n '
return pulumi.get(self, 'plan') | Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | plan | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def plan(self) -> Optional[pulumi.Input['PlanArgs']]:
'\n \n '
return pulumi.get(self, 'plan') | @property
@pulumi.getter
def plan(self) -> Optional[pulumi.Input['PlanArgs']]:
'\n \n '
return pulumi.get(self, 'plan')<|docstring|>Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.<|endoftext|> |
1128c61dba3bbf4c89ad5387f53a9f710d63f0cfce248f5d6a185b558142b585 | @property
@pulumi.getter
def priority(self) -> Optional[pulumi.Input[Union[(str, 'VirtualMachinePriorityTypes')]]]:
'\n Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01\n '
return pulumi.get(self, 'priority') | Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01 | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | priority | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def priority(self) -> Optional[pulumi.Input[Union[(str, 'VirtualMachinePriorityTypes')]]]:
'\n \n '
return pulumi.get(self, 'priority') | @property
@pulumi.getter
def priority(self) -> Optional[pulumi.Input[Union[(str, 'VirtualMachinePriorityTypes')]]]:
'\n \n '
return pulumi.get(self, 'priority')<|docstring|>Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01<|endoftext|> |
7ec277d0576eada88c76e44bd14804678f622929335f54b5a1a3ca9f114550f8 | @property
@pulumi.getter(name='proximityPlacementGroup')
def proximity_placement_group(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.\n '
return pulumi.get(self, 'proximity_placement_group') | Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | proximity_placement_group | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='proximityPlacementGroup')
def proximity_placement_group(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n \n '
return pulumi.get(self, 'proximity_placement_group') | @property
@pulumi.getter(name='proximityPlacementGroup')
def proximity_placement_group(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n \n '
return pulumi.get(self, 'proximity_placement_group')<|docstring|>Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.<|endoftext|> |
5cb128b0a983d10a3f4f2af7baa5fc9e3c89a8f9d8468af34f6fecef2707fd7d | @property
@pulumi.getter(name='storageProfile')
def storage_profile(self) -> Optional[pulumi.Input['StorageProfileArgs']]:
'\n Specifies the storage settings for the virtual machine disks.\n '
return pulumi.get(self, 'storage_profile') | Specifies the storage settings for the virtual machine disks. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | storage_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='storageProfile')
def storage_profile(self) -> Optional[pulumi.Input['StorageProfileArgs']]:
'\n \n '
return pulumi.get(self, 'storage_profile') | @property
@pulumi.getter(name='storageProfile')
def storage_profile(self) -> Optional[pulumi.Input['StorageProfileArgs']]:
'\n \n '
return pulumi.get(self, 'storage_profile')<|docstring|>Specifies the storage settings for the virtual machine disks.<|endoftext|> |
74370621d5b582b437e75dcac9d9b4719b8bf85563f527a3e2a2a4f0a0bb1f25 | @property
@pulumi.getter
def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n Resource tags\n '
return pulumi.get(self, 'tags') | Resource tags | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | tags | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'tags') | @property
@pulumi.getter
def tags(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'tags')<|docstring|>Resource tags<|endoftext|> |
76a1def6552bc4682eb990530716e294b82d73e04e143978d5b1b8264da3f4de | @property
@pulumi.getter(name='virtualMachineScaleSet')
def virtual_machine_scale_set(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01\n '
return pulumi.get(self, 'virtual_machine_scale_set') | Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01 | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | virtual_machine_scale_set | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='virtualMachineScaleSet')
def virtual_machine_scale_set(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n \n '
return pulumi.get(self, 'virtual_machine_scale_set') | @property
@pulumi.getter(name='virtualMachineScaleSet')
def virtual_machine_scale_set(self) -> Optional[pulumi.Input['SubResourceArgs']]:
'\n \n '
return pulumi.get(self, 'virtual_machine_scale_set')<|docstring|>Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01<|endoftext|> |
adc56f2fa99c6791f5cdc8b86f5b0b37d4b2c5b91ac2656560dfaec641fd4680 | @property
@pulumi.getter(name='vmName')
def vm_name(self) -> Optional[pulumi.Input[str]]:
'\n The name of the virtual machine.\n '
return pulumi.get(self, 'vm_name') | The name of the virtual machine. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | vm_name | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='vmName')
def vm_name(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'vm_name') | @property
@pulumi.getter(name='vmName')
def vm_name(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'vm_name')<|docstring|>The name of the virtual machine.<|endoftext|> |
4f476dc6c427acda26e15a2a09bd27e9ea2dea1b47d24c0fe2144be131919efd | @property
@pulumi.getter
def zones(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
'\n The virtual machine zones.\n '
return pulumi.get(self, 'zones') | The virtual machine zones. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | zones | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def zones(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
'\n \n '
return pulumi.get(self, 'zones') | @property
@pulumi.getter
def zones(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
'\n \n '
return pulumi.get(self, 'zones')<|docstring|>The virtual machine zones.<|endoftext|> |
c3cab93e2c18c0c17632f19abb492dc09e5a32ba97119cc055556346658b434f | @overload
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, additional_capabilities: Optional[pulumi.Input[pulumi.InputType['AdditionalCapabilitiesArgs']]]=None, availability_set: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, billing_profile: Optional[pulumi.Input[pulumi.InputType['BillingProfileArgs']]]=None, diagnostics_profile: Optional[pulumi.Input[pulumi.InputType['DiagnosticsProfileArgs']]]=None, eviction_policy: Optional[pulumi.Input[Union[(str, 'VirtualMachineEvictionPolicyTypes')]]]=None, hardware_profile: Optional[pulumi.Input[pulumi.InputType['HardwareProfileArgs']]]=None, host: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, identity: Optional[pulumi.Input[pulumi.InputType['VirtualMachineIdentityArgs']]]=None, license_type: Optional[pulumi.Input[str]]=None, location: Optional[pulumi.Input[str]]=None, network_profile: Optional[pulumi.Input[pulumi.InputType['NetworkProfileArgs']]]=None, os_profile: Optional[pulumi.Input[pulumi.InputType['OSProfileArgs']]]=None, plan: Optional[pulumi.Input[pulumi.InputType['PlanArgs']]]=None, priority: Optional[pulumi.Input[Union[(str, 'VirtualMachinePriorityTypes')]]]=None, proximity_placement_group: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, storage_profile: Optional[pulumi.Input[pulumi.InputType['StorageProfileArgs']]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, virtual_machine_scale_set: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, vm_name: Optional[pulumi.Input[str]]=None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, __props__=None):
"\n Describes a Virtual Machine.\n\n :param str resource_name: The name of the resource.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType['AdditionalCapabilitiesArgs']] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.\n :param pulumi.Input[pulumi.InputType['BillingProfileArgs']] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.\n :param pulumi.Input[pulumi.InputType['DiagnosticsProfileArgs']] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.\n :param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.\n :param pulumi.Input[pulumi.InputType['HardwareProfileArgs']] hardware_profile: Specifies the hardware settings for the virtual machine.\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.\n :param pulumi.Input[pulumi.InputType['VirtualMachineIdentityArgs']] identity: The identity of the virtual machine, if configured.\n :param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15\n :param pulumi.Input[str] location: Resource location\n :param pulumi.Input[pulumi.InputType['NetworkProfileArgs']] network_profile: Specifies the network interfaces of the virtual machine.\n :param pulumi.Input[pulumi.InputType['OSProfileArgs']] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.\n :param pulumi.Input[pulumi.InputType['PlanArgs']] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.\n :param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input[pulumi.InputType['StorageProfileArgs']] storage_profile: Specifies the storage settings for the virtual machine disks.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01\n :param pulumi.Input[str] vm_name: The name of the virtual machine.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones.\n "
... | Describes a Virtual Machine.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['AdditionalCapabilitiesArgs']] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.
:param pulumi.Input[pulumi.InputType['SubResourceArgs']] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
:param pulumi.Input[pulumi.InputType['BillingProfileArgs']] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
:param pulumi.Input[pulumi.InputType['DiagnosticsProfileArgs']] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
:param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
:param pulumi.Input[pulumi.InputType['HardwareProfileArgs']] hardware_profile: Specifies the hardware settings for the virtual machine.
:param pulumi.Input[pulumi.InputType['SubResourceArgs']] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
:param pulumi.Input[pulumi.InputType['VirtualMachineIdentityArgs']] identity: The identity of the virtual machine, if configured.
:param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
:param pulumi.Input[str] location: Resource location
:param pulumi.Input[pulumi.InputType['NetworkProfileArgs']] network_profile: Specifies the network interfaces of the virtual machine.
:param pulumi.Input[pulumi.InputType['OSProfileArgs']] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
:param pulumi.Input[pulumi.InputType['PlanArgs']] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
:param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01
:param pulumi.Input[pulumi.InputType['SubResourceArgs']] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
:param pulumi.Input[str] resource_group_name: The name of the resource group.
:param pulumi.Input[pulumi.InputType['StorageProfileArgs']] storage_profile: Specifies the storage settings for the virtual machine disks.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags
:param pulumi.Input[pulumi.InputType['SubResourceArgs']] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01
:param pulumi.Input[str] vm_name: The name of the virtual machine.
:param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | __init__ | polivbr/pulumi-azure-native | 0 | python | @overload
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, additional_capabilities: Optional[pulumi.Input[pulumi.InputType['AdditionalCapabilitiesArgs']]]=None, availability_set: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, billing_profile: Optional[pulumi.Input[pulumi.InputType['BillingProfileArgs']]]=None, diagnostics_profile: Optional[pulumi.Input[pulumi.InputType['DiagnosticsProfileArgs']]]=None, eviction_policy: Optional[pulumi.Input[Union[(str, 'VirtualMachineEvictionPolicyTypes')]]]=None, hardware_profile: Optional[pulumi.Input[pulumi.InputType['HardwareProfileArgs']]]=None, host: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, identity: Optional[pulumi.Input[pulumi.InputType['VirtualMachineIdentityArgs']]]=None, license_type: Optional[pulumi.Input[str]]=None, location: Optional[pulumi.Input[str]]=None, network_profile: Optional[pulumi.Input[pulumi.InputType['NetworkProfileArgs']]]=None, os_profile: Optional[pulumi.Input[pulumi.InputType['OSProfileArgs']]]=None, plan: Optional[pulumi.Input[pulumi.InputType['PlanArgs']]]=None, priority: Optional[pulumi.Input[Union[(str, 'VirtualMachinePriorityTypes')]]]=None, proximity_placement_group: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, storage_profile: Optional[pulumi.Input[pulumi.InputType['StorageProfileArgs']]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, virtual_machine_scale_set: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, vm_name: Optional[pulumi.Input[str]]=None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, __props__=None):
"\n Describes a Virtual Machine.\n\n :param str resource_name: The name of the resource.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType['AdditionalCapabilitiesArgs']] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.\n :param pulumi.Input[pulumi.InputType['BillingProfileArgs']] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.\n :param pulumi.Input[pulumi.InputType['DiagnosticsProfileArgs']] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.\n :param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.\n :param pulumi.Input[pulumi.InputType['HardwareProfileArgs']] hardware_profile: Specifies the hardware settings for the virtual machine.\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.\n :param pulumi.Input[pulumi.InputType['VirtualMachineIdentityArgs']] identity: The identity of the virtual machine, if configured.\n :param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15\n :param pulumi.Input[str] location: Resource location\n :param pulumi.Input[pulumi.InputType['NetworkProfileArgs']] network_profile: Specifies the network interfaces of the virtual machine.\n :param pulumi.Input[pulumi.InputType['OSProfileArgs']] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.\n :param pulumi.Input[pulumi.InputType['PlanArgs']] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.\n :param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input[pulumi.InputType['StorageProfileArgs']] storage_profile: Specifies the storage settings for the virtual machine disks.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01\n :param pulumi.Input[str] vm_name: The name of the virtual machine.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones.\n "
... | @overload
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, additional_capabilities: Optional[pulumi.Input[pulumi.InputType['AdditionalCapabilitiesArgs']]]=None, availability_set: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, billing_profile: Optional[pulumi.Input[pulumi.InputType['BillingProfileArgs']]]=None, diagnostics_profile: Optional[pulumi.Input[pulumi.InputType['DiagnosticsProfileArgs']]]=None, eviction_policy: Optional[pulumi.Input[Union[(str, 'VirtualMachineEvictionPolicyTypes')]]]=None, hardware_profile: Optional[pulumi.Input[pulumi.InputType['HardwareProfileArgs']]]=None, host: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, identity: Optional[pulumi.Input[pulumi.InputType['VirtualMachineIdentityArgs']]]=None, license_type: Optional[pulumi.Input[str]]=None, location: Optional[pulumi.Input[str]]=None, network_profile: Optional[pulumi.Input[pulumi.InputType['NetworkProfileArgs']]]=None, os_profile: Optional[pulumi.Input[pulumi.InputType['OSProfileArgs']]]=None, plan: Optional[pulumi.Input[pulumi.InputType['PlanArgs']]]=None, priority: Optional[pulumi.Input[Union[(str, 'VirtualMachinePriorityTypes')]]]=None, proximity_placement_group: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, resource_group_name: Optional[pulumi.Input[str]]=None, storage_profile: Optional[pulumi.Input[pulumi.InputType['StorageProfileArgs']]]=None, tags: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, virtual_machine_scale_set: Optional[pulumi.Input[pulumi.InputType['SubResourceArgs']]]=None, vm_name: Optional[pulumi.Input[str]]=None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, __props__=None):
"\n Describes a Virtual Machine.\n\n :param str resource_name: The name of the resource.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType['AdditionalCapabilitiesArgs']] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.\n :param pulumi.Input[pulumi.InputType['BillingProfileArgs']] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.\n :param pulumi.Input[pulumi.InputType['DiagnosticsProfileArgs']] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.\n :param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.\n :param pulumi.Input[pulumi.InputType['HardwareProfileArgs']] hardware_profile: Specifies the hardware settings for the virtual machine.\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.\n :param pulumi.Input[pulumi.InputType['VirtualMachineIdentityArgs']] identity: The identity of the virtual machine, if configured.\n :param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15\n :param pulumi.Input[str] location: Resource location\n :param pulumi.Input[pulumi.InputType['NetworkProfileArgs']] network_profile: Specifies the network interfaces of the virtual machine.\n :param pulumi.Input[pulumi.InputType['OSProfileArgs']] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.\n :param pulumi.Input[pulumi.InputType['PlanArgs']] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.\n :param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.\n :param pulumi.Input[str] resource_group_name: The name of the resource group.\n :param pulumi.Input[pulumi.InputType['StorageProfileArgs']] storage_profile: Specifies the storage settings for the virtual machine disks.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags\n :param pulumi.Input[pulumi.InputType['SubResourceArgs']] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01\n :param pulumi.Input[str] vm_name: The name of the virtual machine.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones.\n "
...<|docstring|>Describes a Virtual Machine.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['AdditionalCapabilitiesArgs']] additional_capabilities: Specifies additional capabilities enabled or disabled on the virtual machine.
:param pulumi.Input[pulumi.InputType['SubResourceArgs']] availability_set: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
:param pulumi.Input[pulumi.InputType['BillingProfileArgs']] billing_profile: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
:param pulumi.Input[pulumi.InputType['DiagnosticsProfileArgs']] diagnostics_profile: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
:param pulumi.Input[Union[str, 'VirtualMachineEvictionPolicyTypes']] eviction_policy: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
:param pulumi.Input[pulumi.InputType['HardwareProfileArgs']] hardware_profile: Specifies the hardware settings for the virtual machine.
:param pulumi.Input[pulumi.InputType['SubResourceArgs']] host: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
:param pulumi.Input[pulumi.InputType['VirtualMachineIdentityArgs']] identity: The identity of the virtual machine, if configured.
:param pulumi.Input[str] license_type: Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
:param pulumi.Input[str] location: Resource location
:param pulumi.Input[pulumi.InputType['NetworkProfileArgs']] network_profile: Specifies the network interfaces of the virtual machine.
:param pulumi.Input[pulumi.InputType['OSProfileArgs']] os_profile: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
:param pulumi.Input[pulumi.InputType['PlanArgs']] plan: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
:param pulumi.Input[Union[str, 'VirtualMachinePriorityTypes']] priority: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01
:param pulumi.Input[pulumi.InputType['SubResourceArgs']] proximity_placement_group: Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
:param pulumi.Input[str] resource_group_name: The name of the resource group.
:param pulumi.Input[pulumi.InputType['StorageProfileArgs']] storage_profile: Specifies the storage settings for the virtual machine disks.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags
:param pulumi.Input[pulumi.InputType['SubResourceArgs']] virtual_machine_scale_set: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01
:param pulumi.Input[str] vm_name: The name of the virtual machine.
:param pulumi.Input[Sequence[pulumi.Input[str]]] zones: The virtual machine zones.<|endoftext|> |
c0ab4ed3ec5eff74a9ddf3292b85e430401f22272ea512e58da882b6febf180a | @overload
def __init__(__self__, resource_name: str, args: VirtualMachineArgs, opts: Optional[pulumi.ResourceOptions]=None):
"\n Describes a Virtual Machine.\n\n :param str resource_name: The name of the resource.\n :param VirtualMachineArgs args: The arguments to use to populate this resource's properties.\n :param pulumi.ResourceOptions opts: Options for the resource.\n "
... | Describes a Virtual Machine.
:param str resource_name: The name of the resource.
:param VirtualMachineArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | __init__ | polivbr/pulumi-azure-native | 0 | python | @overload
def __init__(__self__, resource_name: str, args: VirtualMachineArgs, opts: Optional[pulumi.ResourceOptions]=None):
"\n Describes a Virtual Machine.\n\n :param str resource_name: The name of the resource.\n :param VirtualMachineArgs args: The arguments to use to populate this resource's properties.\n :param pulumi.ResourceOptions opts: Options for the resource.\n "
... | @overload
def __init__(__self__, resource_name: str, args: VirtualMachineArgs, opts: Optional[pulumi.ResourceOptions]=None):
"\n Describes a Virtual Machine.\n\n :param str resource_name: The name of the resource.\n :param VirtualMachineArgs args: The arguments to use to populate this resource's properties.\n :param pulumi.ResourceOptions opts: Options for the resource.\n "
...<|docstring|>Describes a Virtual Machine.
:param str resource_name: The name of the resource.
:param VirtualMachineArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.<|endoftext|> |
76ec7f62975cfad407f875c8ae57e71bdbdc5d057ed673f43f3ac6b8a3cb1844 | @staticmethod
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'VirtualMachine':
"\n Get an existing VirtualMachine resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The unique name of the resulting resource.\n :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.\n :param pulumi.ResourceOptions opts: Options for the resource.\n "
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = VirtualMachineArgs.__new__(VirtualMachineArgs)
__props__.__dict__['additional_capabilities'] = None
__props__.__dict__['availability_set'] = None
__props__.__dict__['billing_profile'] = None
__props__.__dict__['diagnostics_profile'] = None
__props__.__dict__['eviction_policy'] = None
__props__.__dict__['hardware_profile'] = None
__props__.__dict__['host'] = None
__props__.__dict__['identity'] = None
__props__.__dict__['instance_view'] = None
__props__.__dict__['license_type'] = None
__props__.__dict__['location'] = None
__props__.__dict__['name'] = None
__props__.__dict__['network_profile'] = None
__props__.__dict__['os_profile'] = None
__props__.__dict__['plan'] = None
__props__.__dict__['priority'] = None
__props__.__dict__['provisioning_state'] = None
__props__.__dict__['proximity_placement_group'] = None
__props__.__dict__['resources'] = None
__props__.__dict__['storage_profile'] = None
__props__.__dict__['tags'] = None
__props__.__dict__['type'] = None
__props__.__dict__['virtual_machine_scale_set'] = None
__props__.__dict__['vm_id'] = None
__props__.__dict__['zones'] = None
return VirtualMachine(resource_name, opts=opts, __props__=__props__) | Get an existing VirtualMachine resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | get | polivbr/pulumi-azure-native | 0 | python | @staticmethod
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'VirtualMachine':
"\n Get an existing VirtualMachine resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The unique name of the resulting resource.\n :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.\n :param pulumi.ResourceOptions opts: Options for the resource.\n "
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = VirtualMachineArgs.__new__(VirtualMachineArgs)
__props__.__dict__['additional_capabilities'] = None
__props__.__dict__['availability_set'] = None
__props__.__dict__['billing_profile'] = None
__props__.__dict__['diagnostics_profile'] = None
__props__.__dict__['eviction_policy'] = None
__props__.__dict__['hardware_profile'] = None
__props__.__dict__['host'] = None
__props__.__dict__['identity'] = None
__props__.__dict__['instance_view'] = None
__props__.__dict__['license_type'] = None
__props__.__dict__['location'] = None
__props__.__dict__['name'] = None
__props__.__dict__['network_profile'] = None
__props__.__dict__['os_profile'] = None
__props__.__dict__['plan'] = None
__props__.__dict__['priority'] = None
__props__.__dict__['provisioning_state'] = None
__props__.__dict__['proximity_placement_group'] = None
__props__.__dict__['resources'] = None
__props__.__dict__['storage_profile'] = None
__props__.__dict__['tags'] = None
__props__.__dict__['type'] = None
__props__.__dict__['virtual_machine_scale_set'] = None
__props__.__dict__['vm_id'] = None
__props__.__dict__['zones'] = None
return VirtualMachine(resource_name, opts=opts, __props__=__props__) | @staticmethod
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'VirtualMachine':
"\n Get an existing VirtualMachine resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The unique name of the resulting resource.\n :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.\n :param pulumi.ResourceOptions opts: Options for the resource.\n "
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = VirtualMachineArgs.__new__(VirtualMachineArgs)
__props__.__dict__['additional_capabilities'] = None
__props__.__dict__['availability_set'] = None
__props__.__dict__['billing_profile'] = None
__props__.__dict__['diagnostics_profile'] = None
__props__.__dict__['eviction_policy'] = None
__props__.__dict__['hardware_profile'] = None
__props__.__dict__['host'] = None
__props__.__dict__['identity'] = None
__props__.__dict__['instance_view'] = None
__props__.__dict__['license_type'] = None
__props__.__dict__['location'] = None
__props__.__dict__['name'] = None
__props__.__dict__['network_profile'] = None
__props__.__dict__['os_profile'] = None
__props__.__dict__['plan'] = None
__props__.__dict__['priority'] = None
__props__.__dict__['provisioning_state'] = None
__props__.__dict__['proximity_placement_group'] = None
__props__.__dict__['resources'] = None
__props__.__dict__['storage_profile'] = None
__props__.__dict__['tags'] = None
__props__.__dict__['type'] = None
__props__.__dict__['virtual_machine_scale_set'] = None
__props__.__dict__['vm_id'] = None
__props__.__dict__['zones'] = None
return VirtualMachine(resource_name, opts=opts, __props__=__props__)<|docstring|>Get an existing VirtualMachine resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.<|endoftext|> |
76ad62ff8a84a04c6d0cbc57b04fb3db75663e448dcecb77baf906feb4ed6f52 | @property
@pulumi.getter(name='additionalCapabilities')
def additional_capabilities(self) -> pulumi.Output[Optional['outputs.AdditionalCapabilitiesResponse']]:
'\n Specifies additional capabilities enabled or disabled on the virtual machine.\n '
return pulumi.get(self, 'additional_capabilities') | Specifies additional capabilities enabled or disabled on the virtual machine. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | additional_capabilities | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='additionalCapabilities')
def additional_capabilities(self) -> pulumi.Output[Optional['outputs.AdditionalCapabilitiesResponse']]:
'\n \n '
return pulumi.get(self, 'additional_capabilities') | @property
@pulumi.getter(name='additionalCapabilities')
def additional_capabilities(self) -> pulumi.Output[Optional['outputs.AdditionalCapabilitiesResponse']]:
'\n \n '
return pulumi.get(self, 'additional_capabilities')<|docstring|>Specifies additional capabilities enabled or disabled on the virtual machine.<|endoftext|> |
bca68a20a9edc1f99d44831cf627e7ef18571be3548f9aa747613e1c06401643 | @property
@pulumi.getter(name='availabilitySet')
def availability_set(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.\n '
return pulumi.get(self, 'availability_set') | Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | availability_set | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='availabilitySet')
def availability_set(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n \n '
return pulumi.get(self, 'availability_set') | @property
@pulumi.getter(name='availabilitySet')
def availability_set(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n \n '
return pulumi.get(self, 'availability_set')<|docstring|>Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.<|endoftext|> |
dfb6c497768704a3a0601fcf81b3e18c02e164921d82be7ec9b1156deba8ca5c | @property
@pulumi.getter(name='billingProfile')
def billing_profile(self) -> pulumi.Output[Optional['outputs.BillingProfileResponse']]:
'\n Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.\n '
return pulumi.get(self, 'billing_profile') | Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | billing_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='billingProfile')
def billing_profile(self) -> pulumi.Output[Optional['outputs.BillingProfileResponse']]:
'\n \n '
return pulumi.get(self, 'billing_profile') | @property
@pulumi.getter(name='billingProfile')
def billing_profile(self) -> pulumi.Output[Optional['outputs.BillingProfileResponse']]:
'\n \n '
return pulumi.get(self, 'billing_profile')<|docstring|>Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.<|endoftext|> |
7fd44829c6d641b3626a6343df5dc0855a6119596bb176dd78ec5d464c960f4d | @property
@pulumi.getter(name='diagnosticsProfile')
def diagnostics_profile(self) -> pulumi.Output[Optional['outputs.DiagnosticsProfileResponse']]:
'\n Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.\n '
return pulumi.get(self, 'diagnostics_profile') | Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | diagnostics_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='diagnosticsProfile')
def diagnostics_profile(self) -> pulumi.Output[Optional['outputs.DiagnosticsProfileResponse']]:
'\n \n '
return pulumi.get(self, 'diagnostics_profile') | @property
@pulumi.getter(name='diagnosticsProfile')
def diagnostics_profile(self) -> pulumi.Output[Optional['outputs.DiagnosticsProfileResponse']]:
'\n \n '
return pulumi.get(self, 'diagnostics_profile')<|docstring|>Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.<|endoftext|> |
133a6100dd0fb09de07601ab53041143f4b9ba13a4234ab91154eaee730995a5 | @property
@pulumi.getter(name='evictionPolicy')
def eviction_policy(self) -> pulumi.Output[Optional[str]]:
"\n Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.\n "
return pulumi.get(self, 'eviction_policy') | Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | eviction_policy | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='evictionPolicy')
def eviction_policy(self) -> pulumi.Output[Optional[str]]:
"\n \n "
return pulumi.get(self, 'eviction_policy') | @property
@pulumi.getter(name='evictionPolicy')
def eviction_policy(self) -> pulumi.Output[Optional[str]]:
"\n \n "
return pulumi.get(self, 'eviction_policy')<|docstring|>Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.<|endoftext|> |
996857b25ac57973309cfe07c66baf0ab00b7e45e87c998f1839a7ce2d3d72fe | @property
@pulumi.getter(name='hardwareProfile')
def hardware_profile(self) -> pulumi.Output[Optional['outputs.HardwareProfileResponse']]:
'\n Specifies the hardware settings for the virtual machine.\n '
return pulumi.get(self, 'hardware_profile') | Specifies the hardware settings for the virtual machine. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | hardware_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='hardwareProfile')
def hardware_profile(self) -> pulumi.Output[Optional['outputs.HardwareProfileResponse']]:
'\n \n '
return pulumi.get(self, 'hardware_profile') | @property
@pulumi.getter(name='hardwareProfile')
def hardware_profile(self) -> pulumi.Output[Optional['outputs.HardwareProfileResponse']]:
'\n \n '
return pulumi.get(self, 'hardware_profile')<|docstring|>Specifies the hardware settings for the virtual machine.<|endoftext|> |
9daa88401e31789391dfd880a1bfb8d8478ad9a23e6f85ced3307a85f6c78a4a | @property
@pulumi.getter
def host(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.\n '
return pulumi.get(self, 'host') | Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | host | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def host(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n \n '
return pulumi.get(self, 'host') | @property
@pulumi.getter
def host(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n \n '
return pulumi.get(self, 'host')<|docstring|>Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.<|endoftext|> |
b2721c3a186253ab6867dec20481d596db5feabd0a55714fd0328079c07db484 | @property
@pulumi.getter
def identity(self) -> pulumi.Output[Optional['outputs.VirtualMachineIdentityResponse']]:
'\n The identity of the virtual machine, if configured.\n '
return pulumi.get(self, 'identity') | The identity of the virtual machine, if configured. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | identity | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def identity(self) -> pulumi.Output[Optional['outputs.VirtualMachineIdentityResponse']]:
'\n \n '
return pulumi.get(self, 'identity') | @property
@pulumi.getter
def identity(self) -> pulumi.Output[Optional['outputs.VirtualMachineIdentityResponse']]:
'\n \n '
return pulumi.get(self, 'identity')<|docstring|>The identity of the virtual machine, if configured.<|endoftext|> |
b66a898810a16c14fa6ba39e9f4797cb53f1706d01bc5f6f69c8efb16a3e569c | @property
@pulumi.getter(name='instanceView')
def instance_view(self) -> pulumi.Output['outputs.VirtualMachineInstanceViewResponse']:
'\n The virtual machine instance view.\n '
return pulumi.get(self, 'instance_view') | The virtual machine instance view. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | instance_view | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='instanceView')
def instance_view(self) -> pulumi.Output['outputs.VirtualMachineInstanceViewResponse']:
'\n \n '
return pulumi.get(self, 'instance_view') | @property
@pulumi.getter(name='instanceView')
def instance_view(self) -> pulumi.Output['outputs.VirtualMachineInstanceViewResponse']:
'\n \n '
return pulumi.get(self, 'instance_view')<|docstring|>The virtual machine instance view.<|endoftext|> |
4cdcdfa45a971ff242cf3c5c22fc6f1a11160e65c0df64814a95e107ddc178ea | @property
@pulumi.getter(name='licenseType')
def license_type(self) -> pulumi.Output[Optional[str]]:
'\n Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15\n '
return pulumi.get(self, 'license_type') | Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15 | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | license_type | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='licenseType')
def license_type(self) -> pulumi.Output[Optional[str]]:
'\n \n '
return pulumi.get(self, 'license_type') | @property
@pulumi.getter(name='licenseType')
def license_type(self) -> pulumi.Output[Optional[str]]:
'\n \n '
return pulumi.get(self, 'license_type')<|docstring|>Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15<|endoftext|> |
ab7c30bdb8e7dbd6558f2a98eb0be18867597221df91b5fa721c3d40e6fd215a | @property
@pulumi.getter
def location(self) -> pulumi.Output[str]:
'\n Resource location\n '
return pulumi.get(self, 'location') | Resource location | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | location | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def location(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'location') | @property
@pulumi.getter
def location(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'location')<|docstring|>Resource location<|endoftext|> |
963faa3a3dc9a20e5ecedee003b9543318412dc328f151b72a20a660cea52c73 | @property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
'\n Resource name\n '
return pulumi.get(self, 'name') | Resource name | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | name | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'name') | @property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'name')<|docstring|>Resource name<|endoftext|> |
ecdee4d3a15a6515ac8ea10b1eb5287bc92325f67d5ab1c2f96aa1b9b57a9b4d | @property
@pulumi.getter(name='networkProfile')
def network_profile(self) -> pulumi.Output[Optional['outputs.NetworkProfileResponse']]:
'\n Specifies the network interfaces of the virtual machine.\n '
return pulumi.get(self, 'network_profile') | Specifies the network interfaces of the virtual machine. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | network_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='networkProfile')
def network_profile(self) -> pulumi.Output[Optional['outputs.NetworkProfileResponse']]:
'\n \n '
return pulumi.get(self, 'network_profile') | @property
@pulumi.getter(name='networkProfile')
def network_profile(self) -> pulumi.Output[Optional['outputs.NetworkProfileResponse']]:
'\n \n '
return pulumi.get(self, 'network_profile')<|docstring|>Specifies the network interfaces of the virtual machine.<|endoftext|> |
24a42b119adda4ee47f3a78a33192469ce90cc2202679d31d00836ba940dd4e1 | @property
@pulumi.getter(name='osProfile')
def os_profile(self) -> pulumi.Output[Optional['outputs.OSProfileResponse']]:
'\n Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.\n '
return pulumi.get(self, 'os_profile') | Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | os_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='osProfile')
def os_profile(self) -> pulumi.Output[Optional['outputs.OSProfileResponse']]:
'\n \n '
return pulumi.get(self, 'os_profile') | @property
@pulumi.getter(name='osProfile')
def os_profile(self) -> pulumi.Output[Optional['outputs.OSProfileResponse']]:
'\n \n '
return pulumi.get(self, 'os_profile')<|docstring|>Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.<|endoftext|> |
5a33c2b67f60c5bb509a7e89354a9efe1aeb129d32aa87f2c1a1e7d040f7b8ee | @property
@pulumi.getter
def plan(self) -> pulumi.Output[Optional['outputs.PlanResponse']]:
'\n Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.\n '
return pulumi.get(self, 'plan') | Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | plan | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def plan(self) -> pulumi.Output[Optional['outputs.PlanResponse']]:
'\n \n '
return pulumi.get(self, 'plan') | @property
@pulumi.getter
def plan(self) -> pulumi.Output[Optional['outputs.PlanResponse']]:
'\n \n '
return pulumi.get(self, 'plan')<|docstring|>Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.<|endoftext|> |
109eb14001680ad605d124c76b672e51f97c4896695da717539680323d100320 | @property
@pulumi.getter
def priority(self) -> pulumi.Output[Optional[str]]:
'\n Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01\n '
return pulumi.get(self, 'priority') | Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01 | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | priority | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def priority(self) -> pulumi.Output[Optional[str]]:
'\n \n '
return pulumi.get(self, 'priority') | @property
@pulumi.getter
def priority(self) -> pulumi.Output[Optional[str]]:
'\n \n '
return pulumi.get(self, 'priority')<|docstring|>Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01<|endoftext|> |
ddec9b5b908d9afda53e9f4dacf90f6f9add40f4f8bd1a1379a0db66bc0c489d | @property
@pulumi.getter(name='provisioningState')
def provisioning_state(self) -> pulumi.Output[str]:
'\n The provisioning state, which only appears in the response.\n '
return pulumi.get(self, 'provisioning_state') | The provisioning state, which only appears in the response. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | provisioning_state | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='provisioningState')
def provisioning_state(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'provisioning_state') | @property
@pulumi.getter(name='provisioningState')
def provisioning_state(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'provisioning_state')<|docstring|>The provisioning state, which only appears in the response.<|endoftext|> |
6add8a0c105aa468891cf7786a9639d3cda422a8f737541123cf1e7b4d672d2d | @property
@pulumi.getter(name='proximityPlacementGroup')
def proximity_placement_group(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.\n '
return pulumi.get(self, 'proximity_placement_group') | Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | proximity_placement_group | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='proximityPlacementGroup')
def proximity_placement_group(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n \n '
return pulumi.get(self, 'proximity_placement_group') | @property
@pulumi.getter(name='proximityPlacementGroup')
def proximity_placement_group(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n \n '
return pulumi.get(self, 'proximity_placement_group')<|docstring|>Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.<|endoftext|> |
e14e285cee3a214f61a802e1c484d0471443933ef676d056c61cee567eea447e | @property
@pulumi.getter
def resources(self) -> pulumi.Output[Sequence['outputs.VirtualMachineExtensionResponse']]:
'\n The virtual machine child extension resources.\n '
return pulumi.get(self, 'resources') | The virtual machine child extension resources. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | resources | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def resources(self) -> pulumi.Output[Sequence['outputs.VirtualMachineExtensionResponse']]:
'\n \n '
return pulumi.get(self, 'resources') | @property
@pulumi.getter
def resources(self) -> pulumi.Output[Sequence['outputs.VirtualMachineExtensionResponse']]:
'\n \n '
return pulumi.get(self, 'resources')<|docstring|>The virtual machine child extension resources.<|endoftext|> |
9aeeb523535aeb75cb0052152329d8d1aa572e569e2b7989c4a38b4641b2582e | @property
@pulumi.getter(name='storageProfile')
def storage_profile(self) -> pulumi.Output[Optional['outputs.StorageProfileResponse']]:
'\n Specifies the storage settings for the virtual machine disks.\n '
return pulumi.get(self, 'storage_profile') | Specifies the storage settings for the virtual machine disks. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | storage_profile | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='storageProfile')
def storage_profile(self) -> pulumi.Output[Optional['outputs.StorageProfileResponse']]:
'\n \n '
return pulumi.get(self, 'storage_profile') | @property
@pulumi.getter(name='storageProfile')
def storage_profile(self) -> pulumi.Output[Optional['outputs.StorageProfileResponse']]:
'\n \n '
return pulumi.get(self, 'storage_profile')<|docstring|>Specifies the storage settings for the virtual machine disks.<|endoftext|> |
757fd30833882b38e0466b4a931132c905a72a25bba1e0484da1969f07b07570 | @property
@pulumi.getter
def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]:
'\n Resource tags\n '
return pulumi.get(self, 'tags') | Resource tags | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | tags | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]:
'\n \n '
return pulumi.get(self, 'tags') | @property
@pulumi.getter
def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]:
'\n \n '
return pulumi.get(self, 'tags')<|docstring|>Resource tags<|endoftext|> |
c469ece8cfb7cc97571266590e78a67b25a5bb57b30308347a24479b26e7c70b | @property
@pulumi.getter
def type(self) -> pulumi.Output[str]:
'\n Resource type\n '
return pulumi.get(self, 'type') | Resource type | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | type | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def type(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'type') | @property
@pulumi.getter
def type(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'type')<|docstring|>Resource type<|endoftext|> |
fae99b167273fac90e8475ff74c7350541d00bee89d7fb156059d7e227329dcb | @property
@pulumi.getter(name='virtualMachineScaleSet')
def virtual_machine_scale_set(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01\n '
return pulumi.get(self, 'virtual_machine_scale_set') | Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01 | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | virtual_machine_scale_set | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='virtualMachineScaleSet')
def virtual_machine_scale_set(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n \n '
return pulumi.get(self, 'virtual_machine_scale_set') | @property
@pulumi.getter(name='virtualMachineScaleSet')
def virtual_machine_scale_set(self) -> pulumi.Output[Optional['outputs.SubResourceResponse']]:
'\n \n '
return pulumi.get(self, 'virtual_machine_scale_set')<|docstring|>Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01<|endoftext|> |
0ca8aa0119115ac81ffffdcd2f06d805bd4a1492761978a15fcd2bee24351739 | @property
@pulumi.getter(name='vmId')
def vm_id(self) -> pulumi.Output[str]:
'\n Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.\n '
return pulumi.get(self, 'vm_id') | Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | vm_id | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter(name='vmId')
def vm_id(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'vm_id') | @property
@pulumi.getter(name='vmId')
def vm_id(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'vm_id')<|docstring|>Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.<|endoftext|> |
e3f484ff5abefea70e028e022878ce14b9660cf92a0a364232934b1bbd1a33af | @property
@pulumi.getter
def zones(self) -> pulumi.Output[Optional[Sequence[str]]]:
'\n The virtual machine zones.\n '
return pulumi.get(self, 'zones') | The virtual machine zones. | sdk/python/pulumi_azure_native/compute/v20191201/virtual_machine.py | zones | polivbr/pulumi-azure-native | 0 | python | @property
@pulumi.getter
def zones(self) -> pulumi.Output[Optional[Sequence[str]]]:
'\n \n '
return pulumi.get(self, 'zones') | @property
@pulumi.getter
def zones(self) -> pulumi.Output[Optional[Sequence[str]]]:
'\n \n '
return pulumi.get(self, 'zones')<|docstring|>The virtual machine zones.<|endoftext|> |
063f2a874e8b58a54dd3d6808c12e66127e47b4b3ebdfd2da33a6a474f27437b | def select_model(self, model2load, percent2retrain):
'Selects the desired model to be loaded'
if (0 > percent2retrain > 1):
raise Exception('Invalid train percentage chosen! Value must be between 0-1')
elif (model2load == 'custom'):
return self.custom_model()
elif (model2load == 'mobile'):
return self.mobile_net(percent2retrain)
elif (model2load == 'nasmobile'):
return self.nas_mobile_net(percent2retrain)
elif (model2load == 'dense121'):
return self.dense_net121(percent2retrain)
elif (model2load == 'dense169'):
return self.dense_net169(percent2retrain)
elif (model2load == 'xception'):
return self.xception(percent2retrain)
else:
raise Exception('No valid net has been chosen! Choose one of: (mobile, nasmobile, dense121, dense169, xception)') | Selects the desired model to be loaded | CNN_Model.py | select_model | ManuelPalermo/X-Ray-ConvNet | 15 | python | def select_model(self, model2load, percent2retrain):
if (0 > percent2retrain > 1):
raise Exception('Invalid train percentage chosen! Value must be between 0-1')
elif (model2load == 'custom'):
return self.custom_model()
elif (model2load == 'mobile'):
return self.mobile_net(percent2retrain)
elif (model2load == 'nasmobile'):
return self.nas_mobile_net(percent2retrain)
elif (model2load == 'dense121'):
return self.dense_net121(percent2retrain)
elif (model2load == 'dense169'):
return self.dense_net169(percent2retrain)
elif (model2load == 'xception'):
return self.xception(percent2retrain)
else:
raise Exception('No valid net has been chosen! Choose one of: (mobile, nasmobile, dense121, dense169, xception)') | def select_model(self, model2load, percent2retrain):
if (0 > percent2retrain > 1):
raise Exception('Invalid train percentage chosen! Value must be between 0-1')
elif (model2load == 'custom'):
return self.custom_model()
elif (model2load == 'mobile'):
return self.mobile_net(percent2retrain)
elif (model2load == 'nasmobile'):
return self.nas_mobile_net(percent2retrain)
elif (model2load == 'dense121'):
return self.dense_net121(percent2retrain)
elif (model2load == 'dense169'):
return self.dense_net169(percent2retrain)
elif (model2load == 'xception'):
return self.xception(percent2retrain)
else:
raise Exception('No valid net has been chosen! Choose one of: (mobile, nasmobile, dense121, dense169, xception)')<|docstring|>Selects the desired model to be loaded<|endoftext|> |
166d132e91c8989274dce37f09804bfd9075a1b116bb08d16a3e9488b7d12829 | def mobile_net(self, percent2retrain):
'Returns a mobilenet architecture NN'
mobile_net_model = mobilenetv2.MobileNetV2(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in mobile_net_model.layers[:(- int((len(mobile_net_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(mobile_net_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | Returns a mobilenet architecture NN | CNN_Model.py | mobile_net | ManuelPalermo/X-Ray-ConvNet | 15 | python | def mobile_net(self, percent2retrain):
mobile_net_model = mobilenetv2.MobileNetV2(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in mobile_net_model.layers[:(- int((len(mobile_net_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(mobile_net_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | def mobile_net(self, percent2retrain):
mobile_net_model = mobilenetv2.MobileNetV2(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in mobile_net_model.layers[:(- int((len(mobile_net_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(mobile_net_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model<|docstring|>Returns a mobilenet architecture NN<|endoftext|> |
8df2fd6f912d842b9ccc6db42b4880d95ce367dd09b63d70b3b80737c686783d | def nas_mobile_net(self, percent2retrain):
'Returns a mobilenet architecture NN'
nas_mobile_model = NASNetMobile(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in nas_mobile_model.layers[:(- int((len(nas_mobile_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(nas_mobile_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | Returns a mobilenet architecture NN | CNN_Model.py | nas_mobile_net | ManuelPalermo/X-Ray-ConvNet | 15 | python | def nas_mobile_net(self, percent2retrain):
nas_mobile_model = NASNetMobile(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in nas_mobile_model.layers[:(- int((len(nas_mobile_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(nas_mobile_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | def nas_mobile_net(self, percent2retrain):
nas_mobile_model = NASNetMobile(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in nas_mobile_model.layers[:(- int((len(nas_mobile_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(nas_mobile_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model<|docstring|>Returns a mobilenet architecture NN<|endoftext|> |
051dea6265cdd0230ca720fc3b7db7a6abbb4dc6ff3cd39ec9154fb03ecc6acb | def dense_net121(self, percent2retrain):
'Returns a Densenet121 architecture NN'
dense_model = densenet.DenseNet121(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in dense_model.layers[:(- int((len(dense_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(dense_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | Returns a Densenet121 architecture NN | CNN_Model.py | dense_net121 | ManuelPalermo/X-Ray-ConvNet | 15 | python | def dense_net121(self, percent2retrain):
dense_model = densenet.DenseNet121(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in dense_model.layers[:(- int((len(dense_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(dense_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | def dense_net121(self, percent2retrain):
dense_model = densenet.DenseNet121(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in dense_model.layers[:(- int((len(dense_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(dense_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model<|docstring|>Returns a Densenet121 architecture NN<|endoftext|> |
662382a543f36a51c32f8e731a0b8bcf2315fac90f9dbd92f63b1084a5f74085 | def dense_net169(self, percent2retrain):
'Returns a Densenet169 architecture NN'
dense_model = densenet.DenseNet169(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in dense_model.layers[:(- int((len(dense_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(dense_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | Returns a Densenet169 architecture NN | CNN_Model.py | dense_net169 | ManuelPalermo/X-Ray-ConvNet | 15 | python | def dense_net169(self, percent2retrain):
dense_model = densenet.DenseNet169(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in dense_model.layers[:(- int((len(dense_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(dense_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | def dense_net169(self, percent2retrain):
dense_model = densenet.DenseNet169(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in dense_model.layers[:(- int((len(dense_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(dense_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model<|docstring|>Returns a Densenet169 architecture NN<|endoftext|> |
e40cf389b8bed78a8e2580ee78ba59983b100a7bd04e42b93e1d871c49952a1b | def xception(self, percent2retrain):
'Returns a Xception architecture NN'
xception_model = Xception(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in xception_model.layers[:(- int((len(xception_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(xception_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | Returns a Xception architecture NN | CNN_Model.py | xception | ManuelPalermo/X-Ray-ConvNet | 15 | python | def xception(self, percent2retrain):
xception_model = Xception(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in xception_model.layers[:(- int((len(xception_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(xception_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | def xception(self, percent2retrain):
xception_model = Xception(input_shape=self.input_dim, weights='imagenet', include_top=False)
if (percent2retrain < 1):
for layer in xception_model.layers[:(- int((len(xception_model.layers) * percent2retrain)))]:
layer.trainable = False
model = Sequential()
model.add(xception_model)
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model<|docstring|>Returns a Xception architecture NN<|endoftext|> |
f52e89aecb18a1e4927177a001229e9a1c2558bcac4846488b396257c0378647 | def custom_model(self):
'Creates the keras model for binary output'
model = Sequential()
model.add(Conv2D(filters=32, kernel_size=(3, 3), padding='Same', activation='relu', input_shape=self.input_dim))
model.add(Conv2D(filters=32, kernel_size=(3, 3), padding='Same'))
model.add(Conv2D(filters=32, kernel_size=(3, 3), padding='Same'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=256, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=256, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | Creates the keras model for binary output | CNN_Model.py | custom_model | ManuelPalermo/X-Ray-ConvNet | 15 | python | def custom_model(self):
model = Sequential()
model.add(Conv2D(filters=32, kernel_size=(3, 3), padding='Same', activation='relu', input_shape=self.input_dim))
model.add(Conv2D(filters=32, kernel_size=(3, 3), padding='Same'))
model.add(Conv2D(filters=32, kernel_size=(3, 3), padding='Same'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=256, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=256, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model | def custom_model(self):
model = Sequential()
model.add(Conv2D(filters=32, kernel_size=(3, 3), padding='Same', activation='relu', input_shape=self.input_dim))
model.add(Conv2D(filters=32, kernel_size=(3, 3), padding='Same'))
model.add(Conv2D(filters=32, kernel_size=(3, 3), padding='Same'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(Conv2D(filters=128, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=256, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Conv2D(filters=256, kernel_size=(3, 3), padding='Same', activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(MaxPool2D(pool_size=(2, 2)))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(self.n_classes, activation='sigmoid'))
return model<|docstring|>Creates the keras model for binary output<|endoftext|> |
a51ebfa7747014fc3f735d8d01ac2e9088bad8eccefb9d367569d3e47ee212e4 | def get_model(self):
'Returns the created model'
return self.model | Returns the created model | CNN_Model.py | get_model | ManuelPalermo/X-Ray-ConvNet | 15 | python | def get_model(self):
return self.model | def get_model(self):
return self.model<|docstring|>Returns the created model<|endoftext|> |
03d207caeaf942cae46c69090f9d4633bd01fc53055adc0b7adb6574fc31e07e | def getRowItems(self):
'Returns the list of items used for a specific row.\n\n The first item should be this class.\n\n :rtype: List[qt.QStandardItem]\n '
raise NotImplementedError() | Returns the list of items used for a specific row.
The first item should be this class.
:rtype: List[qt.QStandardItem] | src/silx/app/view/CustomNxdataWidget.py | getRowItems | tifuchs/silx | 94 | python | def getRowItems(self):
'Returns the list of items used for a specific row.\n\n The first item should be this class.\n\n :rtype: List[qt.QStandardItem]\n '
raise NotImplementedError() | def getRowItems(self):
'Returns the list of items used for a specific row.\n\n The first item should be this class.\n\n :rtype: List[qt.QStandardItem]\n '
raise NotImplementedError()<|docstring|>Returns the list of items used for a specific row.
The first item should be this class.
:rtype: List[qt.QStandardItem]<|endoftext|> |
d79015952ab712cef587ddfd6dc7776a26c6a38750276bd12c7e38a65b556873 | def __init__(self, label='', dataset=None):
'Constructor'
super(_DatasetItemRow, self).__init__(label)
self.setEditable(False)
self.setDropEnabled(False)
self.setDragEnabled(False)
self.__name = qt.QStandardItem()
self.__name.setEditable(False)
self.__name.setDropEnabled(True)
self.__type = qt.QStandardItem()
self.__type.setEditable(False)
self.__type.setDropEnabled(False)
self.__type.setDragEnabled(False)
self.__shape = qt.QStandardItem()
self.__shape.setEditable(False)
self.__shape.setDropEnabled(False)
self.__shape.setDragEnabled(False)
self.setDataset(dataset) | Constructor | src/silx/app/view/CustomNxdataWidget.py | __init__ | tifuchs/silx | 94 | python | def __init__(self, label=, dataset=None):
super(_DatasetItemRow, self).__init__(label)
self.setEditable(False)
self.setDropEnabled(False)
self.setDragEnabled(False)
self.__name = qt.QStandardItem()
self.__name.setEditable(False)
self.__name.setDropEnabled(True)
self.__type = qt.QStandardItem()
self.__type.setEditable(False)
self.__type.setDropEnabled(False)
self.__type.setDragEnabled(False)
self.__shape = qt.QStandardItem()
self.__shape.setEditable(False)
self.__shape.setDropEnabled(False)
self.__shape.setDragEnabled(False)
self.setDataset(dataset) | def __init__(self, label=, dataset=None):
super(_DatasetItemRow, self).__init__(label)
self.setEditable(False)
self.setDropEnabled(False)
self.setDragEnabled(False)
self.__name = qt.QStandardItem()
self.__name.setEditable(False)
self.__name.setDropEnabled(True)
self.__type = qt.QStandardItem()
self.__type.setEditable(False)
self.__type.setDropEnabled(False)
self.__type.setDragEnabled(False)
self.__shape = qt.QStandardItem()
self.__shape.setEditable(False)
self.__shape.setDropEnabled(False)
self.__shape.setDragEnabled(False)
self.setDataset(dataset)<|docstring|>Constructor<|endoftext|> |
39445d1fadede7c613725246adf223d45599e7f7d4a779de94e9bc58ded9d9f1 | def getDefaultFormatter(self):
'Get the formatter used to display dataset informations.\n\n :rtype: Hdf5Formatter\n '
return _hdf5Formatter | Get the formatter used to display dataset informations.
:rtype: Hdf5Formatter | src/silx/app/view/CustomNxdataWidget.py | getDefaultFormatter | tifuchs/silx | 94 | python | def getDefaultFormatter(self):
'Get the formatter used to display dataset informations.\n\n :rtype: Hdf5Formatter\n '
return _hdf5Formatter | def getDefaultFormatter(self):
'Get the formatter used to display dataset informations.\n\n :rtype: Hdf5Formatter\n '
return _hdf5Formatter<|docstring|>Get the formatter used to display dataset informations.
:rtype: Hdf5Formatter<|endoftext|> |
4dbeb788d575360a0201ea5ffeb8afe97434d7b752c1c42676634b7e9c15b5e6 | def setDataset(self, dataset):
'Set the dataset stored in this item.\n\n :param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:\n The dataset to store.\n '
self.__dataset = dataset
if (self.__dataset is not None):
name = self.__dataset.name
if silx.io.is_dataset(dataset):
type_ = self.getDefaultFormatter().humanReadableType(dataset)
shape = self.getDefaultFormatter().humanReadableShape(dataset)
if (dataset.shape is None):
icon_name = 'item-none'
elif (len(dataset.shape) < 4):
icon_name = ('item-%ddim' % len(dataset.shape))
else:
icon_name = 'item-ndim'
icon = icons.getQIcon(icon_name)
else:
type_ = ''
shape = ''
icon = qt.QIcon()
else:
name = ''
type_ = ''
shape = ''
icon = qt.QIcon()
self.__icon = icon
self.__name.setText(name)
self.__name.setDragEnabled((self.__dataset is not None))
self.__name.setIcon(self.__icon)
self.__type.setText(type_)
self.__shape.setText(shape)
parent = self.parent()
if (parent is not None):
self.parent()._datasetUpdated() | Set the dataset stored in this item.
:param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:
The dataset to store. | src/silx/app/view/CustomNxdataWidget.py | setDataset | tifuchs/silx | 94 | python | def setDataset(self, dataset):
'Set the dataset stored in this item.\n\n :param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:\n The dataset to store.\n '
self.__dataset = dataset
if (self.__dataset is not None):
name = self.__dataset.name
if silx.io.is_dataset(dataset):
type_ = self.getDefaultFormatter().humanReadableType(dataset)
shape = self.getDefaultFormatter().humanReadableShape(dataset)
if (dataset.shape is None):
icon_name = 'item-none'
elif (len(dataset.shape) < 4):
icon_name = ('item-%ddim' % len(dataset.shape))
else:
icon_name = 'item-ndim'
icon = icons.getQIcon(icon_name)
else:
type_ =
shape =
icon = qt.QIcon()
else:
name =
type_ =
shape =
icon = qt.QIcon()
self.__icon = icon
self.__name.setText(name)
self.__name.setDragEnabled((self.__dataset is not None))
self.__name.setIcon(self.__icon)
self.__type.setText(type_)
self.__shape.setText(shape)
parent = self.parent()
if (parent is not None):
self.parent()._datasetUpdated() | def setDataset(self, dataset):
'Set the dataset stored in this item.\n\n :param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:\n The dataset to store.\n '
self.__dataset = dataset
if (self.__dataset is not None):
name = self.__dataset.name
if silx.io.is_dataset(dataset):
type_ = self.getDefaultFormatter().humanReadableType(dataset)
shape = self.getDefaultFormatter().humanReadableShape(dataset)
if (dataset.shape is None):
icon_name = 'item-none'
elif (len(dataset.shape) < 4):
icon_name = ('item-%ddim' % len(dataset.shape))
else:
icon_name = 'item-ndim'
icon = icons.getQIcon(icon_name)
else:
type_ =
shape =
icon = qt.QIcon()
else:
name =
type_ =
shape =
icon = qt.QIcon()
self.__icon = icon
self.__name.setText(name)
self.__name.setDragEnabled((self.__dataset is not None))
self.__name.setIcon(self.__icon)
self.__type.setText(type_)
self.__shape.setText(shape)
parent = self.parent()
if (parent is not None):
self.parent()._datasetUpdated()<|docstring|>Set the dataset stored in this item.
:param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:
The dataset to store.<|endoftext|> |
43200f02cc14c954ffd4a313fb20e2760e91381ad7562866a27809cd84998f11 | def getDataset(self):
'Returns the dataset stored within the item.'
return self.__dataset | Returns the dataset stored within the item. | src/silx/app/view/CustomNxdataWidget.py | getDataset | tifuchs/silx | 94 | python | def getDataset(self):
return self.__dataset | def getDataset(self):
return self.__dataset<|docstring|>Returns the dataset stored within the item.<|endoftext|> |
a232d1c817dd89c06a348cb21d1aaccc014b29dfedcd2cac8afd05f17cd7f502 | def getRowItems(self):
'Returns the list of items used for a specific row.\n\n The first item should be this class.\n\n :rtype: List[qt.QStandardItem]\n '
return [self, self.__name, self.__type, self.__shape] | Returns the list of items used for a specific row.
The first item should be this class.
:rtype: List[qt.QStandardItem] | src/silx/app/view/CustomNxdataWidget.py | getRowItems | tifuchs/silx | 94 | python | def getRowItems(self):
'Returns the list of items used for a specific row.\n\n The first item should be this class.\n\n :rtype: List[qt.QStandardItem]\n '
return [self, self.__name, self.__type, self.__shape] | def getRowItems(self):
'Returns the list of items used for a specific row.\n\n The first item should be this class.\n\n :rtype: List[qt.QStandardItem]\n '
return [self, self.__name, self.__type, self.__shape]<|docstring|>Returns the list of items used for a specific row.
The first item should be this class.
:rtype: List[qt.QStandardItem]<|endoftext|> |
afd424c351bd9b5711bc7b47c89f04d656a7894b709b641e572d128b7f24ccd5 | def __init__(self):
'Constructor'
super(_DatasetAxisItemRow, self).__init__() | Constructor | src/silx/app/view/CustomNxdataWidget.py | __init__ | tifuchs/silx | 94 | python | def __init__(self):
super(_DatasetAxisItemRow, self).__init__() | def __init__(self):
super(_DatasetAxisItemRow, self).__init__()<|docstring|>Constructor<|endoftext|> |
4aeef5857408d82354e3801e3de109143ddbf9fb2ead5d8b1e3f8ae6fcf4a283 | def setAxisId(self, axisId):
'Set the id of the axis (the first axis is 0)\n\n :param int axisId: Identifier of this axis.\n '
self.__axisId = axisId
label = ('Axis %d' % (axisId + 1))
self.setText(label) | Set the id of the axis (the first axis is 0)
:param int axisId: Identifier of this axis. | src/silx/app/view/CustomNxdataWidget.py | setAxisId | tifuchs/silx | 94 | python | def setAxisId(self, axisId):
'Set the id of the axis (the first axis is 0)\n\n :param int axisId: Identifier of this axis.\n '
self.__axisId = axisId
label = ('Axis %d' % (axisId + 1))
self.setText(label) | def setAxisId(self, axisId):
'Set the id of the axis (the first axis is 0)\n\n :param int axisId: Identifier of this axis.\n '
self.__axisId = axisId
label = ('Axis %d' % (axisId + 1))
self.setText(label)<|docstring|>Set the id of the axis (the first axis is 0)
:param int axisId: Identifier of this axis.<|endoftext|> |
51c8d0a79ecf73174b6ffa7e55b7ae853978f0a38bc478a67abde0fe05b3a80e | def getAxisId(self):
'Returns the identifier of this axis.\n\n :rtype: int\n '
return self.__axisId | Returns the identifier of this axis.
:rtype: int | src/silx/app/view/CustomNxdataWidget.py | getAxisId | tifuchs/silx | 94 | python | def getAxisId(self):
'Returns the identifier of this axis.\n\n :rtype: int\n '
return self.__axisId | def getAxisId(self):
'Returns the identifier of this axis.\n\n :rtype: int\n '
return self.__axisId<|docstring|>Returns the identifier of this axis.
:rtype: int<|endoftext|> |
445b877b172d124fd73fd4835efc0b34d051f64444b8102a950606e66c8ad20c | def __init__(self):
'Constructor'
qt.QStandardItem.__init__(self)
self.__error = None
self.__title = None
self.__axes = []
self.__virtual = None
item = _DatasetItemRow('Signal', None)
self.appendRow(item.getRowItems())
self.__signal = item
self.setEditable(False)
self.setDragEnabled(False)
self.setDropEnabled(False)
self.__setError(None) | Constructor | src/silx/app/view/CustomNxdataWidget.py | __init__ | tifuchs/silx | 94 | python | def __init__(self):
qt.QStandardItem.__init__(self)
self.__error = None
self.__title = None
self.__axes = []
self.__virtual = None
item = _DatasetItemRow('Signal', None)
self.appendRow(item.getRowItems())
self.__signal = item
self.setEditable(False)
self.setDragEnabled(False)
self.setDropEnabled(False)
self.__setError(None) | def __init__(self):
qt.QStandardItem.__init__(self)
self.__error = None
self.__title = None
self.__axes = []
self.__virtual = None
item = _DatasetItemRow('Signal', None)
self.appendRow(item.getRowItems())
self.__signal = item
self.setEditable(False)
self.setDragEnabled(False)
self.setDropEnabled(False)
self.__setError(None)<|docstring|>Constructor<|endoftext|> |
99cea469f8d87b2acc8066b989ac59e3405d6b77bfe65ba32942691deb5d45d7 | def getRowItems(self):
'Returns the list of items used for a specific row.\n\n The first item should be this class.\n\n :rtype: List[qt.QStandardItem]\n '
row = [self]
for _ in range(3):
item = qt.QStandardItem('')
item.setEditable(False)
item.setDragEnabled(False)
item.setDropEnabled(False)
row.append(item)
return row | Returns the list of items used for a specific row.
The first item should be this class.
:rtype: List[qt.QStandardItem] | src/silx/app/view/CustomNxdataWidget.py | getRowItems | tifuchs/silx | 94 | python | def getRowItems(self):
'Returns the list of items used for a specific row.\n\n The first item should be this class.\n\n :rtype: List[qt.QStandardItem]\n '
row = [self]
for _ in range(3):
item = qt.QStandardItem()
item.setEditable(False)
item.setDragEnabled(False)
item.setDropEnabled(False)
row.append(item)
return row | def getRowItems(self):
'Returns the list of items used for a specific row.\n\n The first item should be this class.\n\n :rtype: List[qt.QStandardItem]\n '
row = [self]
for _ in range(3):
item = qt.QStandardItem()
item.setEditable(False)
item.setDragEnabled(False)
item.setDropEnabled(False)
row.append(item)
return row<|docstring|>Returns the list of items used for a specific row.
The first item should be this class.
:rtype: List[qt.QStandardItem]<|endoftext|> |
6e246d2df4c335773ee0069152252c90f3482814bf1e4cdbfa8054697a8e099e | def _datasetUpdated(self):
'Called when the NXdata contained of the item have changed.\n\n It invalidates the NXdata stored and send an event `sigNxdataUpdated`.\n '
self.__virtual = None
self.__setError(None)
model = self.model()
if (model is not None):
model.sigNxdataUpdated.emit(self.index()) | Called when the NXdata contained of the item have changed.
It invalidates the NXdata stored and send an event `sigNxdataUpdated`. | src/silx/app/view/CustomNxdataWidget.py | _datasetUpdated | tifuchs/silx | 94 | python | def _datasetUpdated(self):
'Called when the NXdata contained of the item have changed.\n\n It invalidates the NXdata stored and send an event `sigNxdataUpdated`.\n '
self.__virtual = None
self.__setError(None)
model = self.model()
if (model is not None):
model.sigNxdataUpdated.emit(self.index()) | def _datasetUpdated(self):
'Called when the NXdata contained of the item have changed.\n\n It invalidates the NXdata stored and send an event `sigNxdataUpdated`.\n '
self.__virtual = None
self.__setError(None)
model = self.model()
if (model is not None):
model.sigNxdataUpdated.emit(self.index())<|docstring|>Called when the NXdata contained of the item have changed.
It invalidates the NXdata stored and send an event `sigNxdataUpdated`.<|endoftext|> |
f851f5c6e884eea8dfa7808bffe9293a9823ca1125104c3fc722b2aac6108865 | def createVirtualGroup(self):
'Returns a new virtual Group using a NeXus NXdata structure to store\n data\n\n :rtype: silx.io.commonh5.Group\n '
name = ''
if (self.__title is not None):
name = self.__title
virtual = commonh5.Group(name)
virtual.attrs['NX_class'] = 'NXdata'
if (self.__title is not None):
virtual.attrs['title'] = self.__title
if (self.__signal is not None):
signal = self.__signal.getDataset()
if (signal is not None):
node = commonh5.DatasetProxy('signal', target=signal)
virtual.attrs['signal'] = 'signal'
virtual.add_node(node)
axesAttr = []
for (i, axis) in enumerate(self.__axes):
if (axis is None):
name = '.'
else:
axis = axis.getDataset()
if (axis is None):
name = '.'
else:
name = ('axis%d' % i)
node = commonh5.DatasetProxy(name, target=axis)
virtual.add_node(node)
axesAttr.append(name)
if (axesAttr != []):
virtual.attrs['axes'] = numpy.array(axesAttr)
validator = silx.io.nxdata.NXdata(virtual)
if (not validator.is_valid):
message = '<html>'
message += 'This NXdata is not consistant'
message += '<ul>'
for issue in validator.issues:
message += ('<li>%s</li>' % issue)
message += '</ul>'
message += '</html>'
self.__setError(message)
else:
self.__setError(None)
return virtual | Returns a new virtual Group using a NeXus NXdata structure to store
data
:rtype: silx.io.commonh5.Group | src/silx/app/view/CustomNxdataWidget.py | createVirtualGroup | tifuchs/silx | 94 | python | def createVirtualGroup(self):
'Returns a new virtual Group using a NeXus NXdata structure to store\n data\n\n :rtype: silx.io.commonh5.Group\n '
name =
if (self.__title is not None):
name = self.__title
virtual = commonh5.Group(name)
virtual.attrs['NX_class'] = 'NXdata'
if (self.__title is not None):
virtual.attrs['title'] = self.__title
if (self.__signal is not None):
signal = self.__signal.getDataset()
if (signal is not None):
node = commonh5.DatasetProxy('signal', target=signal)
virtual.attrs['signal'] = 'signal'
virtual.add_node(node)
axesAttr = []
for (i, axis) in enumerate(self.__axes):
if (axis is None):
name = '.'
else:
axis = axis.getDataset()
if (axis is None):
name = '.'
else:
name = ('axis%d' % i)
node = commonh5.DatasetProxy(name, target=axis)
virtual.add_node(node)
axesAttr.append(name)
if (axesAttr != []):
virtual.attrs['axes'] = numpy.array(axesAttr)
validator = silx.io.nxdata.NXdata(virtual)
if (not validator.is_valid):
message = '<html>'
message += 'This NXdata is not consistant'
message += '<ul>'
for issue in validator.issues:
message += ('<li>%s</li>' % issue)
message += '</ul>'
message += '</html>'
self.__setError(message)
else:
self.__setError(None)
return virtual | def createVirtualGroup(self):
'Returns a new virtual Group using a NeXus NXdata structure to store\n data\n\n :rtype: silx.io.commonh5.Group\n '
name =
if (self.__title is not None):
name = self.__title
virtual = commonh5.Group(name)
virtual.attrs['NX_class'] = 'NXdata'
if (self.__title is not None):
virtual.attrs['title'] = self.__title
if (self.__signal is not None):
signal = self.__signal.getDataset()
if (signal is not None):
node = commonh5.DatasetProxy('signal', target=signal)
virtual.attrs['signal'] = 'signal'
virtual.add_node(node)
axesAttr = []
for (i, axis) in enumerate(self.__axes):
if (axis is None):
name = '.'
else:
axis = axis.getDataset()
if (axis is None):
name = '.'
else:
name = ('axis%d' % i)
node = commonh5.DatasetProxy(name, target=axis)
virtual.add_node(node)
axesAttr.append(name)
if (axesAttr != []):
virtual.attrs['axes'] = numpy.array(axesAttr)
validator = silx.io.nxdata.NXdata(virtual)
if (not validator.is_valid):
message = '<html>'
message += 'This NXdata is not consistant'
message += '<ul>'
for issue in validator.issues:
message += ('<li>%s</li>' % issue)
message += '</ul>'
message += '</html>'
self.__setError(message)
else:
self.__setError(None)
return virtual<|docstring|>Returns a new virtual Group using a NeXus NXdata structure to store
data
:rtype: silx.io.commonh5.Group<|endoftext|> |
cfcd25999510f3efc9820efd677a9bbfa3c3c1b16d120dc2674574f870b8eb5c | def isValid(self):
'Returns true if the stored NXdata is valid\n\n :rtype: bool\n '
return (self.__error is None) | Returns true if the stored NXdata is valid
:rtype: bool | src/silx/app/view/CustomNxdataWidget.py | isValid | tifuchs/silx | 94 | python | def isValid(self):
'Returns true if the stored NXdata is valid\n\n :rtype: bool\n '
return (self.__error is None) | def isValid(self):
'Returns true if the stored NXdata is valid\n\n :rtype: bool\n '
return (self.__error is None)<|docstring|>Returns true if the stored NXdata is valid
:rtype: bool<|endoftext|> |
c123774864e3765143db2df61051b8d206d75cacb49d6cbf574615d641b6a708 | def getVirtualGroup(self):
'Returns a cached virtual Group using a NeXus NXdata structure to\n store data.\n\n If the stored NXdata was invalidated, :meth:`createVirtualGroup` is\n internally called to update the cache.\n\n :rtype: silx.io.commonh5.Group\n '
if (self.__virtual is None):
self.__virtual = self.createVirtualGroup()
return self.__virtual | Returns a cached virtual Group using a NeXus NXdata structure to
store data.
If the stored NXdata was invalidated, :meth:`createVirtualGroup` is
internally called to update the cache.
:rtype: silx.io.commonh5.Group | src/silx/app/view/CustomNxdataWidget.py | getVirtualGroup | tifuchs/silx | 94 | python | def getVirtualGroup(self):
'Returns a cached virtual Group using a NeXus NXdata structure to\n store data.\n\n If the stored NXdata was invalidated, :meth:`createVirtualGroup` is\n internally called to update the cache.\n\n :rtype: silx.io.commonh5.Group\n '
if (self.__virtual is None):
self.__virtual = self.createVirtualGroup()
return self.__virtual | def getVirtualGroup(self):
'Returns a cached virtual Group using a NeXus NXdata structure to\n store data.\n\n If the stored NXdata was invalidated, :meth:`createVirtualGroup` is\n internally called to update the cache.\n\n :rtype: silx.io.commonh5.Group\n '
if (self.__virtual is None):
self.__virtual = self.createVirtualGroup()
return self.__virtual<|docstring|>Returns a cached virtual Group using a NeXus NXdata structure to
store data.
If the stored NXdata was invalidated, :meth:`createVirtualGroup` is
internally called to update the cache.
:rtype: silx.io.commonh5.Group<|endoftext|> |
ef04e6249317f927dea7392f2195a1c8576d126f8b8da7dd9e8adf5f5470d966 | def getTitle(self):
'Returns the title of the NXdata\n\n :rtype: str\n '
return self.text() | Returns the title of the NXdata
:rtype: str | src/silx/app/view/CustomNxdataWidget.py | getTitle | tifuchs/silx | 94 | python | def getTitle(self):
'Returns the title of the NXdata\n\n :rtype: str\n '
return self.text() | def getTitle(self):
'Returns the title of the NXdata\n\n :rtype: str\n '
return self.text()<|docstring|>Returns the title of the NXdata
:rtype: str<|endoftext|> |
017cb5891e28833ee301de86dbd50007044380731e963c66b44f444351b2f246 | def setTitle(self, title):
'Set the title of the NXdata\n\n :param str title: The title of this NXdata\n '
self.setText(title) | Set the title of the NXdata
:param str title: The title of this NXdata | src/silx/app/view/CustomNxdataWidget.py | setTitle | tifuchs/silx | 94 | python | def setTitle(self, title):
'Set the title of the NXdata\n\n :param str title: The title of this NXdata\n '
self.setText(title) | def setTitle(self, title):
'Set the title of the NXdata\n\n :param str title: The title of this NXdata\n '
self.setText(title)<|docstring|>Set the title of the NXdata
:param str title: The title of this NXdata<|endoftext|> |
9d9526dc879677f69f0956b5c008d14dfda18e895211ddbac6c3be5064dce195 | def __setError(self, error):
'Set the error message in case of the current state of the stored\n NXdata is not valid.\n\n :param str error: Message to display\n '
self.__error = error
style = qt.QApplication.style()
if (error is None):
message = ''
icon = style.standardIcon(qt.QStyle.SP_DirLinkIcon)
else:
message = error
icon = style.standardIcon(qt.QStyle.SP_MessageBoxCritical)
self.setIcon(icon)
self.setToolTip(message) | Set the error message in case of the current state of the stored
NXdata is not valid.
:param str error: Message to display | src/silx/app/view/CustomNxdataWidget.py | __setError | tifuchs/silx | 94 | python | def __setError(self, error):
'Set the error message in case of the current state of the stored\n NXdata is not valid.\n\n :param str error: Message to display\n '
self.__error = error
style = qt.QApplication.style()
if (error is None):
message =
icon = style.standardIcon(qt.QStyle.SP_DirLinkIcon)
else:
message = error
icon = style.standardIcon(qt.QStyle.SP_MessageBoxCritical)
self.setIcon(icon)
self.setToolTip(message) | def __setError(self, error):
'Set the error message in case of the current state of the stored\n NXdata is not valid.\n\n :param str error: Message to display\n '
self.__error = error
style = qt.QApplication.style()
if (error is None):
message =
icon = style.standardIcon(qt.QStyle.SP_DirLinkIcon)
else:
message = error
icon = style.standardIcon(qt.QStyle.SP_MessageBoxCritical)
self.setIcon(icon)
self.setToolTip(message)<|docstring|>Set the error message in case of the current state of the stored
NXdata is not valid.
:param str error: Message to display<|endoftext|> |
97378b74f9bfbda74240ff6dc274c466015b6aff00646fac463ef5a2ae31386a | def getError(self):
'Returns the error message in case the NXdata is not valid.\n\n :rtype: str'
return self.__error | Returns the error message in case the NXdata is not valid.
:rtype: str | src/silx/app/view/CustomNxdataWidget.py | getError | tifuchs/silx | 94 | python | def getError(self):
'Returns the error message in case the NXdata is not valid.\n\n :rtype: str'
return self.__error | def getError(self):
'Returns the error message in case the NXdata is not valid.\n\n :rtype: str'
return self.__error<|docstring|>Returns the error message in case the NXdata is not valid.
:rtype: str<|endoftext|> |
1aaae119ef3a057c816a1fd1241fa99b4980eb3303dd7e1236a9c5628193c58a | def setSignalDataset(self, dataset):
'Set the dataset to use as signal with this NXdata.\n\n :param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:\n The dataset to use as signal.\n '
self.__signal.setDataset(dataset)
self._datasetUpdated() | Set the dataset to use as signal with this NXdata.
:param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:
The dataset to use as signal. | src/silx/app/view/CustomNxdataWidget.py | setSignalDataset | tifuchs/silx | 94 | python | def setSignalDataset(self, dataset):
'Set the dataset to use as signal with this NXdata.\n\n :param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:\n The dataset to use as signal.\n '
self.__signal.setDataset(dataset)
self._datasetUpdated() | def setSignalDataset(self, dataset):
'Set the dataset to use as signal with this NXdata.\n\n :param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:\n The dataset to use as signal.\n '
self.__signal.setDataset(dataset)
self._datasetUpdated()<|docstring|>Set the dataset to use as signal with this NXdata.
:param Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] dataset:
The dataset to use as signal.<|endoftext|> |
5356a403d2627de4a00d92dba065429ecdc45870d130bd0ca2ce521d999cd7f9 | def getSignalDataset(self):
'Returns the dataset used as signal.\n\n :rtype: Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset]\n '
return self.__signal.getDataset() | Returns the dataset used as signal.
:rtype: Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset] | src/silx/app/view/CustomNxdataWidget.py | getSignalDataset | tifuchs/silx | 94 | python | def getSignalDataset(self):
'Returns the dataset used as signal.\n\n :rtype: Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset]\n '
return self.__signal.getDataset() | def getSignalDataset(self):
'Returns the dataset used as signal.\n\n :rtype: Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset]\n '
return self.__signal.getDataset()<|docstring|>Returns the dataset used as signal.
:rtype: Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset]<|endoftext|> |
5c4fb90689e0bcfe08b3ac664b27d9eda1791347a02d0e93b7fdbafbf4c2afae | def setAxesDatasets(self, datasets):
'Set all the available dataset used as axes.\n\n Axes will be created or removed from the GUI in order to provide the\n same amount of requested axes.\n\n A `None` element is an axes with no dataset.\n\n :param List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]] datasets:\n List of dataset to use as axes.\n '
for (i, dataset) in enumerate(datasets):
if (i < len(self.__axes)):
mustAppend = False
item = self.__axes[i]
else:
mustAppend = True
item = _DatasetAxisItemRow()
item.setAxisId(i)
item.setDataset(dataset)
if mustAppend:
self.__axes.append(item)
self.appendRow(item.getRowItems())
for i in range(len(datasets), len(self.__axes)):
item = self.__axes.pop(len(datasets))
self.removeRow(item.row())
self._datasetUpdated() | Set all the available dataset used as axes.
Axes will be created or removed from the GUI in order to provide the
same amount of requested axes.
A `None` element is an axes with no dataset.
:param List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]] datasets:
List of dataset to use as axes. | src/silx/app/view/CustomNxdataWidget.py | setAxesDatasets | tifuchs/silx | 94 | python | def setAxesDatasets(self, datasets):
'Set all the available dataset used as axes.\n\n Axes will be created or removed from the GUI in order to provide the\n same amount of requested axes.\n\n A `None` element is an axes with no dataset.\n\n :param List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]] datasets:\n List of dataset to use as axes.\n '
for (i, dataset) in enumerate(datasets):
if (i < len(self.__axes)):
mustAppend = False
item = self.__axes[i]
else:
mustAppend = True
item = _DatasetAxisItemRow()
item.setAxisId(i)
item.setDataset(dataset)
if mustAppend:
self.__axes.append(item)
self.appendRow(item.getRowItems())
for i in range(len(datasets), len(self.__axes)):
item = self.__axes.pop(len(datasets))
self.removeRow(item.row())
self._datasetUpdated() | def setAxesDatasets(self, datasets):
'Set all the available dataset used as axes.\n\n Axes will be created or removed from the GUI in order to provide the\n same amount of requested axes.\n\n A `None` element is an axes with no dataset.\n\n :param List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]] datasets:\n List of dataset to use as axes.\n '
for (i, dataset) in enumerate(datasets):
if (i < len(self.__axes)):
mustAppend = False
item = self.__axes[i]
else:
mustAppend = True
item = _DatasetAxisItemRow()
item.setAxisId(i)
item.setDataset(dataset)
if mustAppend:
self.__axes.append(item)
self.appendRow(item.getRowItems())
for i in range(len(datasets), len(self.__axes)):
item = self.__axes.pop(len(datasets))
self.removeRow(item.row())
self._datasetUpdated()<|docstring|>Set all the available dataset used as axes.
Axes will be created or removed from the GUI in order to provide the
same amount of requested axes.
A `None` element is an axes with no dataset.
:param List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]] datasets:
List of dataset to use as axes.<|endoftext|> |
3fa2be1ed13bf5ab35e0c22fa206541f1e0e25f1ffabc60bdb162aa4dbd0571f | def getAxesDatasets(self):
'Returns available axes as dataset.\n\n A `None` element is an axes with no dataset.\n\n :rtype: List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]]\n '
datasets = []
for axis in self.__axes:
datasets.append(axis.getDataset())
return datasets | Returns available axes as dataset.
A `None` element is an axes with no dataset.
:rtype: List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]] | src/silx/app/view/CustomNxdataWidget.py | getAxesDatasets | tifuchs/silx | 94 | python | def getAxesDatasets(self):
'Returns available axes as dataset.\n\n A `None` element is an axes with no dataset.\n\n :rtype: List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]]\n '
datasets = []
for axis in self.__axes:
datasets.append(axis.getDataset())
return datasets | def getAxesDatasets(self):
'Returns available axes as dataset.\n\n A `None` element is an axes with no dataset.\n\n :rtype: List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]]\n '
datasets = []
for axis in self.__axes:
datasets.append(axis.getDataset())
return datasets<|docstring|>Returns available axes as dataset.
A `None` element is an axes with no dataset.
:rtype: List[Union[numpy.ndarray,h5py.Dataset,silx.io.commonh5.Dataset,None]]<|endoftext|> |
d68c5ad68c0cbd7fa482ee69e60b34a25e5323dab37142bf9d704ae3c2a26604 | def __init__(self, parent=None):
'Constructor'
qt.QStandardItemModel.__init__(self, parent)
root = self.invisibleRootItem()
root.setDropEnabled(True)
root.setDragEnabled(False) | Constructor | src/silx/app/view/CustomNxdataWidget.py | __init__ | tifuchs/silx | 94 | python | def __init__(self, parent=None):
qt.QStandardItemModel.__init__(self, parent)
root = self.invisibleRootItem()
root.setDropEnabled(True)
root.setDragEnabled(False) | def __init__(self, parent=None):
qt.QStandardItemModel.__init__(self, parent)
root = self.invisibleRootItem()
root.setDropEnabled(True)
root.setDragEnabled(False)<|docstring|>Constructor<|endoftext|> |
3d129a7b959113bf113aa5e5ea7f2a894e19bf0951aa7ec0ef2a509fe1897105 | def supportedDropActions(self):
'Inherited method to redefine supported drop actions.'
return (qt.Qt.CopyAction | qt.Qt.MoveAction) | Inherited method to redefine supported drop actions. | src/silx/app/view/CustomNxdataWidget.py | supportedDropActions | tifuchs/silx | 94 | python | def supportedDropActions(self):
return (qt.Qt.CopyAction | qt.Qt.MoveAction) | def supportedDropActions(self):
return (qt.Qt.CopyAction | qt.Qt.MoveAction)<|docstring|>Inherited method to redefine supported drop actions.<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.