From 250ca20ef03ac37ac98ae9cff5fae4c14fb8b050 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 29 Oct 2024 04:03:06 -0700 Subject: [PATCH] [Automation] Collect examples from azure-sdk-for-go#sdk/resourcemanager/iotoperations/armiotoperations/v0.1.0 --- ...erAuthentication_CreateOrUpdate_Complex.go | 137 +++++++ ...Authentication_CreateOrUpdate_Complex.json | 1 + ...ntication_CreateOrUpdate_MaximumSet_Gen.go | 129 +++++++ ...ication_CreateOrUpdate_MaximumSet_Gen.json | 1 + ...kerAuthentication_Delete_MaximumSet_Gen.go | 30 ++ ...rAuthentication_Delete_MaximumSet_Gen.json | 1 + ...BrokerAuthentication_Get_MaximumSet_Gen.go | 84 +++++ ...okerAuthentication_Get_MaximumSet_Gen.json | 1 + ...tion_ListByResourceGroup_MaximumSet_Gen.go | 94 +++++ ...on_ListByResourceGroup_MaximumSet_Gen.json | 1 + ...kerAuthorization_CreateOrUpdate_Complex.go | 179 +++++++++ ...rAuthorization_CreateOrUpdate_Complex.json | 1 + ...orization_CreateOrUpdate_MaximumSet_Gen.go | 143 +++++++ ...ization_CreateOrUpdate_MaximumSet_Gen.json | 1 + ...okerAuthorization_CreateOrUpdate_Simple.go | 141 +++++++ ...erAuthorization_CreateOrUpdate_Simple.json | 1 + ...okerAuthorization_Delete_MaximumSet_Gen.go | 30 ++ ...erAuthorization_Delete_MaximumSet_Gen.json | 1 + .../BrokerAuthorization_Get_MaximumSet_Gen.go | 91 +++++ ...rokerAuthorization_Get_MaximumSet_Gen.json | 1 + ...tion_ListByResourceGroup_MaximumSet_Gen.go | 101 +++++ ...on_ListByResourceGroup_MaximumSet_Gen.json | 1 + .../BrokerListener_CreateOrUpdate_Complex.go | 138 +++++++ ...BrokerListener_CreateOrUpdate_Complex.json | 1 + ...rListener_CreateOrUpdate_MaximumSet_Gen.go | 141 +++++++ ...istener_CreateOrUpdate_MaximumSet_Gen.json | 1 + .../BrokerListener_CreateOrUpdate_Simple.go | 75 ++++ .../BrokerListener_CreateOrUpdate_Simple.json | 1 + .../BrokerListener_Delete_MaximumSet_Gen.go | 30 ++ .../BrokerListener_Delete_MaximumSet_Gen.json | 1 + .../BrokerListener_Get_MaximumSet_Gen.go | 90 +++++ .../BrokerListener_Get_MaximumSet_Gen.json | 1 + ...ener_ListByResourceGroup_MaximumSet_Gen.go | 100 +++++ ...er_ListByResourceGroup_MaximumSet_Gen.json | 1 + .../Broker_CreateOrUpdate_Complex.go | 99 +++++ .../Broker_CreateOrUpdate_Complex.json | 1 + .../Broker_CreateOrUpdate_MaximumSet_Gen.go | 351 ++++++++++++++++++ .../Broker_CreateOrUpdate_MaximumSet_Gen.json | 1 + .../Broker_CreateOrUpdate_Minimal.go | 208 +++++++++++ .../Broker_CreateOrUpdate_Minimal.json | 1 + .../Broker_CreateOrUpdate_Simple.go | 222 +++++++++++ .../Broker_CreateOrUpdate_Simple.json | 1 + .../Broker_Delete_MaximumSet_Gen.go | 30 ++ .../Broker_Delete_MaximumSet_Gen.json | 1 + .../examples-go/Broker_Get_MaximumSet_Gen.go | 195 ++++++++++ .../Broker_Get_MaximumSet_Gen.json | 1 + ...oker_ListByResourceGroup_MaximumSet_Gen.go | 205 ++++++++++ ...er_ListByResourceGroup_MaximumSet_Gen.json | 1 + .../DataflowEndpoint_CreateOrUpdate_ADLSv2.go | 83 +++++ ...ataflowEndpoint_CreateOrUpdate_ADLSv2.json | 1 + .../DataflowEndpoint_CreateOrUpdate_ADX.go | 90 +++++ .../DataflowEndpoint_CreateOrUpdate_ADX.json | 1 + .../DataflowEndpoint_CreateOrUpdate_AIO.go | 89 +++++ .../DataflowEndpoint_CreateOrUpdate_AIO.json | 1 + ...taflowEndpoint_CreateOrUpdate_EventGrid.go | 86 +++++ ...flowEndpoint_CreateOrUpdate_EventGrid.json | 1 + ...ataflowEndpoint_CreateOrUpdate_EventHub.go | 88 +++++ ...aflowEndpoint_CreateOrUpdate_EventHub.json | 1 + .../DataflowEndpoint_CreateOrUpdate_Fabric.go | 90 +++++ ...ataflowEndpoint_CreateOrUpdate_Fabric.json | 1 + .../DataflowEndpoint_CreateOrUpdate_Kafka.go | 117 ++++++ ...DataflowEndpoint_CreateOrUpdate_Kafka.json | 1 + ...lowEndpoint_CreateOrUpdate_LocalStorage.go | 71 ++++ ...wEndpoint_CreateOrUpdate_LocalStorage.json | 1 + .../DataflowEndpoint_CreateOrUpdate_MQTT.go | 103 +++++ .../DataflowEndpoint_CreateOrUpdate_MQTT.json | 1 + ...wEndpoint_CreateOrUpdate_MaximumSet_Gen.go | 331 +++++++++++++++++ ...ndpoint_CreateOrUpdate_MaximumSet_Gen.json | 1 + .../DataflowEndpoint_Delete_MaximumSet_Gen.go | 30 ++ ...ataflowEndpoint_Delete_MaximumSet_Gen.json | 1 + .../DataflowEndpoint_Get_MaximumSet_Gen.go | 185 +++++++++ .../DataflowEndpoint_Get_MaximumSet_Gen.json | 1 + ...oint_ListByResourceGroup_MaximumSet_Gen.go | 195 ++++++++++ ...nt_ListByResourceGroup_MaximumSet_Gen.json | 1 + ...owProfile_CreateOrUpdate_MaximumSet_Gen.go | 81 ++++ ...Profile_CreateOrUpdate_MaximumSet_Gen.json | 1 + .../DataflowProfile_CreateOrUpdate_Minimal.go | 65 ++++ ...ataflowProfile_CreateOrUpdate_Minimal.json | 1 + .../DataflowProfile_CreateOrUpdate_Multi.go | 65 ++++ .../DataflowProfile_CreateOrUpdate_Multi.json | 1 + .../DataflowProfile_Delete_MaximumSet_Gen.go | 30 ++ ...DataflowProfile_Delete_MaximumSet_Gen.json | 1 + .../DataflowProfile_Get_MaximumSet_Gen.go | 60 +++ .../DataflowProfile_Get_MaximumSet_Gen.json | 1 + ...file_ListByResourceGroup_MaximumSet_Gen.go | 70 ++++ ...le_ListByResourceGroup_MaximumSet_Gen.json | 1 + ...CreateOrUpdate_ComplexContextualization.go | 165 ++++++++ ...eateOrUpdate_ComplexContextualization.json | 1 + ...Dataflow_CreateOrUpdate_ComplexEventHub.go | 198 ++++++++++ ...taflow_CreateOrUpdate_ComplexEventHub.json | 1 + .../Dataflow_CreateOrUpdate_FilterToTopic.go | 157 ++++++++ ...Dataflow_CreateOrUpdate_FilterToTopic.json | 1 + .../Dataflow_CreateOrUpdate_MaximumSet_Gen.go | 175 +++++++++ ...ataflow_CreateOrUpdate_MaximumSet_Gen.json | 1 + ...Dataflow_CreateOrUpdate_SimpleEventGrid.go | 105 ++++++ ...taflow_CreateOrUpdate_SimpleEventGrid.json | 1 + .../Dataflow_CreateOrUpdate_SimpleFabric.go | 119 ++++++ .../Dataflow_CreateOrUpdate_SimpleFabric.json | 1 + .../Dataflow_Delete_MaximumSet_Gen.go | 30 ++ .../Dataflow_Delete_MaximumSet_Gen.json | 1 + .../Dataflow_Get_MaximumSet_Gen.go | 107 ++++++ .../Dataflow_Get_MaximumSet_Gen.json | 1 + ...ow_ListByProfileResource_MaximumSet_Gen.go | 117 ++++++ ..._ListByProfileResource_MaximumSet_Gen.json | 1 + .../Instance_CreateOrUpdate_MaximumSet_Gen.go | 88 +++++ ...nstance_CreateOrUpdate_MaximumSet_Gen.json | 1 + .../Instance_Delete_MaximumSet_Gen.go | 30 ++ .../Instance_Delete_MaximumSet_Gen.json | 1 + .../Instance_Get_MaximumSet_Gen.go | 66 ++++ .../Instance_Get_MaximumSet_Gen.json | 1 + ...ance_ListByResourceGroup_MaximumSet_Gen.go | 76 ++++ ...ce_ListByResourceGroup_MaximumSet_Gen.json | 1 + ...tance_ListBySubscription_MaximumSet_Gen.go | 76 ++++ ...nce_ListBySubscription_MaximumSet_Gen.json | 1 + .../Instance_Update_MaximumSet_Gen.go | 73 ++++ .../Instance_Update_MaximumSet_Gen.json | 1 + .../Operations_List_MaximumSet_Gen.go | 53 +++ .../Operations_List_MaximumSet_Gen.json | 1 + 118 files changed, 6666 insertions(+) create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_Complex.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_Complex.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Delete_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Delete_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Get_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Get_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Complex.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Complex.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Simple.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Simple.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Delete_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Delete_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Get_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Get_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Complex.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Complex.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Simple.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Simple.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Delete_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Delete_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Get_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Get_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_ListByResourceGroup_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Complex.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Complex.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Minimal.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Minimal.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Simple.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Simple.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Delete_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Delete_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Get_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Get_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_ListByResourceGroup_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADLSv2.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADLSv2.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADX.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADX.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_AIO.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_AIO.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventGrid.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventGrid.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventHub.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventHub.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Fabric.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Fabric.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Kafka.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Kafka.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_LocalStorage.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_LocalStorage.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MQTT.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MQTT.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Delete_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Delete_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Get_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Get_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Minimal.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Minimal.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Multi.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Multi.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Delete_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Delete_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Get_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Get_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexContextualization.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexContextualization.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexEventHub.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexEventHub.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_FilterToTopic.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_FilterToTopic.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleEventGrid.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleEventGrid.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleFabric.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleFabric.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Delete_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Delete_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Get_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Get_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_ListByProfileResource_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_ListByProfileResource_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_CreateOrUpdate_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_CreateOrUpdate_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Delete_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Delete_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Get_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Get_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListByResourceGroup_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListBySubscription_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListBySubscription_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Update_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Update_MaximumSet_Gen.json create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Operations_List_MaximumSet_Gen.go create mode 100644 specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Operations_List_MaximumSet_Gen.json diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_Complex.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_Complex.go new file mode 100644 index 0000000000..06efb23343 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_Complex.go @@ -0,0 +1,137 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json +func ExampleBrokerAuthenticationClient_BeginCreateOrUpdate_brokerAuthenticationCreateOrUpdateComplex() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerAuthenticationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthenticationResource{ + Properties: &armiotoperations.BrokerAuthenticationProperties{ + AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{ + { + Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodServiceAccountToken), + ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{ + Audiences: []*string{ + to.Ptr("aio-internal"), + }, + }, + }, + { + Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodX509), + X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{ + TrustedClientCaCert: to.Ptr("my-ca"), + AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + "root": { + Subject: to.Ptr("CN = Contoso Root CA Cert, OU = Engineering, C = US"), + Attributes: map[string]*string{ + "organization": to.Ptr("contoso"), + }, + }, + "intermediate": { + Subject: to.Ptr("CN = Contoso Intermediate CA"), + Attributes: map[string]*string{ + "city": to.Ptr("seattle"), + "foo": to.Ptr("bar"), + }, + }, + "smart-fan": { + Subject: to.Ptr("CN = smart-fan"), + Attributes: map[string]*string{ + "building": to.Ptr("17"), + }, + }, + }, + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerAuthenticationClientCreateOrUpdateResponse{ + // BrokerAuthenticationResource: &armiotoperations.BrokerAuthenticationResource{ + // Properties: &armiotoperations.BrokerAuthenticationProperties{ + // AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{ + // { + // Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodServiceAccountToken), + // ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{ + // Audiences: []*string{ + // to.Ptr("aio-internal"), + // }, + // }, + // }, + // { + // Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodX509), + // X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{ + // TrustedClientCaCert: to.Ptr("my-ca"), + // AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // "root": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // Subject: to.Ptr("CN = Contoso Root CA Cert, OU = Engineering, C = US"), + // Attributes: map[string]*string{ + // "organization": to.Ptr("contoso"), + // }, + // }, + // "intermediate": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // Subject: to.Ptr("CN = Contoso Intermediate CA"), + // Attributes: map[string]*string{ + // "city": to.Ptr("seattle"), + // "foo": to.Ptr("bar"), + // }, + // }, + // "smart-fan": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // Subject: to.Ptr("CN = smart-fan"), + // Attributes: map[string]*string{ + // "building": to.Ptr("17"), + // }, + // }, + // }, + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123"), + // Name: to.Ptr("lwucizfvtsdpx"), + // Type: to.Ptr("kvtilkgcxanlfozrd"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_Complex.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_Complex.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_Complex.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.go new file mode 100644 index 0000000000..d2c8aa38b4 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.go @@ -0,0 +1,129 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json +func ExampleBrokerAuthenticationClient_BeginCreateOrUpdate_brokerAuthenticationCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerAuthenticationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthenticationResource{ + Properties: &armiotoperations.BrokerAuthenticationProperties{ + AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{ + { + Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodCustom), + CustomSettings: &armiotoperations.BrokerAuthenticatorMethodCustom{ + Auth: &armiotoperations.BrokerAuthenticatorCustomAuth{ + X509: &armiotoperations.X509ManualCertificate{ + SecretRef: to.Ptr("secret-name"), + }, + }, + CaCertConfigMap: to.Ptr("pdecudefqyolvncbus"), + Endpoint: to.Ptr("https://www.example.com"), + Headers: map[string]*string{ + "key8518": to.Ptr("bwityjy"), + }, + }, + ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{ + Audiences: []*string{ + to.Ptr("jqyhyqatuydg"), + }, + }, + X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{ + AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + "key3384": { + Attributes: map[string]*string{ + "key186": to.Ptr("ucpajramsz"), + }, + Subject: to.Ptr("jpgwctfeixitptfgfnqhua"), + }, + }, + TrustedClientCaCert: to.Ptr("vlctsqddl"), + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerAuthenticationClientCreateOrUpdateResponse{ + // BrokerAuthenticationResource: &armiotoperations.BrokerAuthenticationResource{ + // Properties: &armiotoperations.BrokerAuthenticationProperties{ + // AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{ + // { + // Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodCustom), + // CustomSettings: &armiotoperations.BrokerAuthenticatorMethodCustom{ + // Auth: &armiotoperations.BrokerAuthenticatorCustomAuth{ + // X509: &armiotoperations.X509ManualCertificate{ + // SecretRef: to.Ptr("secret-name"), + // }, + // }, + // CaCertConfigMap: to.Ptr("pdecudefqyolvncbus"), + // Endpoint: to.Ptr("https://www.example.com"), + // Headers: map[string]*string{ + // "key8518": to.Ptr("bwityjy"), + // }, + // }, + // ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{ + // Audiences: []*string{ + // to.Ptr("jqyhyqatuydg"), + // }, + // }, + // X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{ + // AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // "key3384": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // Attributes: map[string]*string{ + // "key186": to.Ptr("ucpajramsz"), + // }, + // Subject: to.Ptr("jpgwctfeixitptfgfnqhua"), + // }, + // }, + // TrustedClientCaCert: to.Ptr("vlctsqddl"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123"), + // Name: to.Ptr("lwucizfvtsdpx"), + // Type: to.Ptr("kvtilkgcxanlfozrd"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Delete_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Delete_MaximumSet_Gen.go new file mode 100644 index 0000000000..fcadd4870a --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Delete_MaximumSet_Gen.go @@ -0,0 +1,30 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json +func ExampleBrokerAuthenticationClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerAuthenticationClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Delete_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Delete_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Get_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Get_MaximumSet_Gen.go new file mode 100644 index 0000000000..b98884251e --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Get_MaximumSet_Gen.go @@ -0,0 +1,84 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json +func ExampleBrokerAuthenticationClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewBrokerAuthenticationClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerAuthenticationClientGetResponse{ + // BrokerAuthenticationResource: &armiotoperations.BrokerAuthenticationResource{ + // Properties: &armiotoperations.BrokerAuthenticationProperties{ + // AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{ + // { + // Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodCustom), + // CustomSettings: &armiotoperations.BrokerAuthenticatorMethodCustom{ + // Auth: &armiotoperations.BrokerAuthenticatorCustomAuth{ + // X509: &armiotoperations.X509ManualCertificate{ + // SecretRef: to.Ptr("secret-name"), + // }, + // }, + // CaCertConfigMap: to.Ptr("pdecudefqyolvncbus"), + // Endpoint: to.Ptr("https://www.example.com"), + // Headers: map[string]*string{ + // "key8518": to.Ptr("bwityjy"), + // }, + // }, + // ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{ + // Audiences: []*string{ + // to.Ptr("jqyhyqatuydg"), + // }, + // }, + // X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{ + // AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // "key3384": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // Attributes: map[string]*string{ + // "key186": to.Ptr("ucpajramsz"), + // }, + // Subject: to.Ptr("jpgwctfeixitptfgfnqhua"), + // }, + // }, + // TrustedClientCaCert: to.Ptr("vlctsqddl"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123"), + // Name: to.Ptr("lwucizfvtsdpx"), + // Type: to.Ptr("kvtilkgcxanlfozrd"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Get_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_Get_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.go new file mode 100644 index 0000000000..53e505e08f --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.go @@ -0,0 +1,94 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json +func ExampleBrokerAuthenticationClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewBrokerAuthenticationClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", "resource-name123", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.BrokerAuthenticationClientListByResourceGroupResponse{ + // BrokerAuthenticationResourceListResult: armiotoperations.BrokerAuthenticationResourceListResult{ + // Value: []*armiotoperations.BrokerAuthenticationResource{ + // { + // Properties: &armiotoperations.BrokerAuthenticationProperties{ + // AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{ + // { + // Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodCustom), + // CustomSettings: &armiotoperations.BrokerAuthenticatorMethodCustom{ + // Auth: &armiotoperations.BrokerAuthenticatorCustomAuth{ + // X509: &armiotoperations.X509ManualCertificate{ + // SecretRef: to.Ptr("secret-name"), + // }, + // }, + // CaCertConfigMap: to.Ptr("pdecudefqyolvncbus"), + // Endpoint: to.Ptr("https://www.example.com"), + // Headers: map[string]*string{ + // "key8518": to.Ptr("bwityjy"), + // }, + // }, + // ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{ + // Audiences: []*string{ + // to.Ptr("jqyhyqatuydg"), + // }, + // }, + // X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{ + // AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // "key3384": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{ + // Attributes: map[string]*string{ + // "key186": to.Ptr("ucpajramsz"), + // }, + // Subject: to.Ptr("jpgwctfeixitptfgfnqhua"), + // }, + // }, + // TrustedClientCaCert: to.Ptr("vlctsqddl"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123"), + // Name: to.Ptr("lwucizfvtsdpx"), + // Type: to.Ptr("kvtilkgcxanlfozrd"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Complex.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Complex.go new file mode 100644 index 0000000000..8b5ba20749 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Complex.go @@ -0,0 +1,179 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json +func ExampleBrokerAuthorizationClient_BeginCreateOrUpdate_brokerAuthorizationCreateOrUpdateComplex() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerAuthorizationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthorizationResource{ + Properties: &armiotoperations.BrokerAuthorizationProperties{ + AuthorizationPolicies: &armiotoperations.AuthorizationConfig{ + Cache: to.Ptr(armiotoperations.OperationalModeEnabled), + Rules: []*armiotoperations.AuthorizationRule{ + { + Principals: &armiotoperations.PrincipalDefinition{ + Usernames: []*string{ + to.Ptr("temperature-sensor"), + to.Ptr("humidity-sensor"), + }, + Attributes: []map[string]*string{ + { + "building": to.Ptr("17"), + "organization": to.Ptr("contoso"), + }, + }, + }, + BrokerResources: []*armiotoperations.BrokerResourceRule{ + { + Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect), + ClientIDs: []*string{ + to.Ptr("{principal.attributes.building}*"), + }, + }, + { + Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsPublish), + Topics: []*string{ + to.Ptr("sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*"), + }, + }, + { + Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsSubscribe), + Topics: []*string{ + to.Ptr("commands/{principal.attributes.organization}"), + }, + }, + }, + StateStoreResources: []*armiotoperations.StateStoreResourceRule{ + { + Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead), + KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern), + Keys: []*string{ + to.Ptr("myreadkey"), + to.Ptr("myotherkey?"), + to.Ptr("mynumerickeysuffix[0-9]"), + to.Ptr("clients:{principal.clientId}:*"), + }, + }, + { + Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsReadWrite), + KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesBinary), + Keys: []*string{ + to.Ptr("MTE2IDEwMSAxMTUgMTE2"), + }, + }, + }, + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerAuthorizationClientCreateOrUpdateResponse{ + // BrokerAuthorizationResource: &armiotoperations.BrokerAuthorizationResource{ + // Properties: &armiotoperations.BrokerAuthorizationProperties{ + // AuthorizationPolicies: &armiotoperations.AuthorizationConfig{ + // Cache: to.Ptr(armiotoperations.OperationalModeEnabled), + // Rules: []*armiotoperations.AuthorizationRule{ + // { + // Principals: &armiotoperations.PrincipalDefinition{ + // Usernames: []*string{ + // to.Ptr("temperature-sensor"), + // to.Ptr("humidity-sensor"), + // }, + // Attributes: []map[string]*string{ + // map[string]*string{ + // "building": to.Ptr("17"), + // "organization": to.Ptr("contoso"), + // }, + // }, + // }, + // BrokerResources: []*armiotoperations.BrokerResourceRule{ + // { + // Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect), + // ClientIDs: []*string{ + // to.Ptr("{principal.attributes.building}*"), + // }, + // }, + // { + // Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsPublish), + // Topics: []*string{ + // to.Ptr("sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*"), + // }, + // }, + // { + // Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsSubscribe), + // Topics: []*string{ + // to.Ptr("commands/{principal.attributes.organization}"), + // }, + // }, + // }, + // StateStoreResources: []*armiotoperations.StateStoreResourceRule{ + // { + // Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead), + // KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern), + // Keys: []*string{ + // to.Ptr("myreadkey"), + // to.Ptr("myotherkey?"), + // to.Ptr("mynumerickeysuffix[0-9]"), + // to.Ptr("clients:{principal.clientId}:*"), + // }, + // }, + // { + // Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsReadWrite), + // KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesBinary), + // Keys: []*string{ + // to.Ptr("MTE2IDEwMSAxMTUgMTE2"), + // }, + // }, + // }, + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123"), + // Name: to.Ptr("anqrqsvrjmlvzkrbuav"), + // Type: to.Ptr("yjlsfarshqoxojvgmy"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Complex.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Complex.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Complex.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.go new file mode 100644 index 0000000000..9e72560429 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.go @@ -0,0 +1,143 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json +func ExampleBrokerAuthorizationClient_BeginCreateOrUpdate_brokerAuthorizationCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerAuthorizationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthorizationResource{ + Properties: &armiotoperations.BrokerAuthorizationProperties{ + AuthorizationPolicies: &armiotoperations.AuthorizationConfig{ + Cache: to.Ptr(armiotoperations.OperationalModeEnabled), + Rules: []*armiotoperations.AuthorizationRule{ + { + BrokerResources: []*armiotoperations.BrokerResourceRule{ + { + Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect), + ClientIDs: []*string{ + to.Ptr("nlc"), + }, + Topics: []*string{ + to.Ptr("wvuca"), + }, + }, + }, + Principals: &armiotoperations.PrincipalDefinition{ + Attributes: []map[string]*string{ + { + "key5526": to.Ptr("nydhzdhbldygqcn"), + }, + }, + ClientIDs: []*string{ + to.Ptr("smopeaeddsygz"), + }, + Usernames: []*string{ + to.Ptr("iozngyqndrteikszkbasinzdjtm"), + }, + }, + StateStoreResources: []*armiotoperations.StateStoreResourceRule{ + { + KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern), + Keys: []*string{ + to.Ptr("tkounsqtwvzyaklxjqoerpu"), + }, + Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead), + }, + }, + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerAuthorizationClientCreateOrUpdateResponse{ + // BrokerAuthorizationResource: &armiotoperations.BrokerAuthorizationResource{ + // Properties: &armiotoperations.BrokerAuthorizationProperties{ + // AuthorizationPolicies: &armiotoperations.AuthorizationConfig{ + // Cache: to.Ptr(armiotoperations.OperationalModeEnabled), + // Rules: []*armiotoperations.AuthorizationRule{ + // { + // BrokerResources: []*armiotoperations.BrokerResourceRule{ + // { + // Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect), + // ClientIDs: []*string{ + // to.Ptr("nlc"), + // }, + // Topics: []*string{ + // to.Ptr("wvuca"), + // }, + // }, + // }, + // Principals: &armiotoperations.PrincipalDefinition{ + // Attributes: []map[string]*string{ + // map[string]*string{ + // "key5526": to.Ptr("nydhzdhbldygqcn"), + // }, + // }, + // ClientIDs: []*string{ + // to.Ptr("smopeaeddsygz"), + // }, + // Usernames: []*string{ + // to.Ptr("iozngyqndrteikszkbasinzdjtm"), + // }, + // }, + // StateStoreResources: []*armiotoperations.StateStoreResourceRule{ + // { + // KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern), + // Keys: []*string{ + // to.Ptr("tkounsqtwvzyaklxjqoerpu"), + // }, + // Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead), + // }, + // }, + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123"), + // Name: to.Ptr("anqrqsvrjmlvzkrbuav"), + // Type: to.Ptr("yjlsfarshqoxojvgmy"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Simple.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Simple.go new file mode 100644 index 0000000000..d8ade8463d --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Simple.go @@ -0,0 +1,141 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Simple.json +func ExampleBrokerAuthorizationClient_BeginCreateOrUpdate_brokerAuthorizationCreateOrUpdateSimple() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerAuthorizationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthorizationResource{ + Properties: &armiotoperations.BrokerAuthorizationProperties{ + AuthorizationPolicies: &armiotoperations.AuthorizationConfig{ + Cache: to.Ptr(armiotoperations.OperationalModeEnabled), + Rules: []*armiotoperations.AuthorizationRule{ + { + Principals: &armiotoperations.PrincipalDefinition{ + ClientIDs: []*string{ + to.Ptr("my-client-id"), + }, + Attributes: []map[string]*string{ + { + "floor": to.Ptr("floor1"), + "site": to.Ptr("site1"), + }, + }, + }, + BrokerResources: []*armiotoperations.BrokerResourceRule{ + { + Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect), + }, + { + Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsSubscribe), + Topics: []*string{ + to.Ptr("topic"), + to.Ptr("topic/with/wildcard/#"), + }, + }, + }, + StateStoreResources: []*armiotoperations.StateStoreResourceRule{ + { + Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsReadWrite), + KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern), + Keys: []*string{ + to.Ptr("*"), + }, + }, + }, + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerAuthorizationClientCreateOrUpdateResponse{ + // BrokerAuthorizationResource: &armiotoperations.BrokerAuthorizationResource{ + // Properties: &armiotoperations.BrokerAuthorizationProperties{ + // AuthorizationPolicies: &armiotoperations.AuthorizationConfig{ + // Cache: to.Ptr(armiotoperations.OperationalModeEnabled), + // Rules: []*armiotoperations.AuthorizationRule{ + // { + // Principals: &armiotoperations.PrincipalDefinition{ + // ClientIDs: []*string{ + // to.Ptr("my-client-id"), + // }, + // Attributes: []map[string]*string{ + // map[string]*string{ + // "floor": to.Ptr("floor1"), + // "site": to.Ptr("site1"), + // }, + // }, + // }, + // BrokerResources: []*armiotoperations.BrokerResourceRule{ + // { + // Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect), + // }, + // { + // Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsSubscribe), + // Topics: []*string{ + // to.Ptr("topic"), + // to.Ptr("topic/with/wildcard/#"), + // }, + // }, + // }, + // StateStoreResources: []*armiotoperations.StateStoreResourceRule{ + // { + // Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsReadWrite), + // KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern), + // Keys: []*string{ + // to.Ptr("*"), + // }, + // }, + // }, + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123"), + // Name: to.Ptr("anqrqsvrjmlvzkrbuav"), + // Type: to.Ptr("yjlsfarshqoxojvgmy"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Simple.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Simple.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_CreateOrUpdate_Simple.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Delete_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Delete_MaximumSet_Gen.go new file mode 100644 index 0000000000..20533a3be1 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Delete_MaximumSet_Gen.go @@ -0,0 +1,30 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json +func ExampleBrokerAuthorizationClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerAuthorizationClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Delete_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Delete_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Get_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Get_MaximumSet_Gen.go new file mode 100644 index 0000000000..4e77cd5215 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Get_MaximumSet_Gen.go @@ -0,0 +1,91 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json +func ExampleBrokerAuthorizationClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewBrokerAuthorizationClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerAuthorizationClientGetResponse{ + // BrokerAuthorizationResource: &armiotoperations.BrokerAuthorizationResource{ + // Properties: &armiotoperations.BrokerAuthorizationProperties{ + // AuthorizationPolicies: &armiotoperations.AuthorizationConfig{ + // Cache: to.Ptr(armiotoperations.OperationalModeEnabled), + // Rules: []*armiotoperations.AuthorizationRule{ + // { + // BrokerResources: []*armiotoperations.BrokerResourceRule{ + // { + // Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect), + // ClientIDs: []*string{ + // to.Ptr("nlc"), + // }, + // Topics: []*string{ + // to.Ptr("wvuca"), + // }, + // }, + // }, + // Principals: &armiotoperations.PrincipalDefinition{ + // Attributes: []map[string]*string{ + // map[string]*string{ + // "key5526": to.Ptr("nydhzdhbldygqcn"), + // }, + // }, + // ClientIDs: []*string{ + // to.Ptr("smopeaeddsygz"), + // }, + // Usernames: []*string{ + // to.Ptr("iozngyqndrteikszkbasinzdjtm"), + // }, + // }, + // StateStoreResources: []*armiotoperations.StateStoreResourceRule{ + // { + // KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern), + // Keys: []*string{ + // to.Ptr("tkounsqtwvzyaklxjqoerpu"), + // }, + // Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead), + // }, + // }, + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123"), + // Name: to.Ptr("anqrqsvrjmlvzkrbuav"), + // Type: to.Ptr("yjlsfarshqoxojvgmy"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Get_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_Get_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.go new file mode 100644 index 0000000000..4a2e79fe1f --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.go @@ -0,0 +1,101 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json +func ExampleBrokerAuthorizationClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewBrokerAuthorizationClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", "resource-name123", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.BrokerAuthorizationClientListByResourceGroupResponse{ + // BrokerAuthorizationResourceListResult: armiotoperations.BrokerAuthorizationResourceListResult{ + // Value: []*armiotoperations.BrokerAuthorizationResource{ + // { + // Properties: &armiotoperations.BrokerAuthorizationProperties{ + // AuthorizationPolicies: &armiotoperations.AuthorizationConfig{ + // Cache: to.Ptr(armiotoperations.OperationalModeEnabled), + // Rules: []*armiotoperations.AuthorizationRule{ + // { + // BrokerResources: []*armiotoperations.BrokerResourceRule{ + // { + // Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect), + // ClientIDs: []*string{ + // to.Ptr("nlc"), + // }, + // Topics: []*string{ + // to.Ptr("wvuca"), + // }, + // }, + // }, + // Principals: &armiotoperations.PrincipalDefinition{ + // Attributes: []map[string]*string{ + // map[string]*string{ + // "key5526": to.Ptr("nydhzdhbldygqcn"), + // }, + // }, + // ClientIDs: []*string{ + // to.Ptr("smopeaeddsygz"), + // }, + // Usernames: []*string{ + // to.Ptr("iozngyqndrteikszkbasinzdjtm"), + // }, + // }, + // StateStoreResources: []*armiotoperations.StateStoreResourceRule{ + // { + // KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern), + // Keys: []*string{ + // to.Ptr("tkounsqtwvzyaklxjqoerpu"), + // }, + // Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead), + // }, + // }, + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123"), + // Name: to.Ptr("anqrqsvrjmlvzkrbuav"), + // Type: to.Ptr("yjlsfarshqoxojvgmy"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Complex.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Complex.go new file mode 100644 index 0000000000..1a1a52246e --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Complex.go @@ -0,0 +1,138 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json +func ExampleBrokerListenerClient_BeginCreateOrUpdate_brokerListenerCreateOrUpdateComplex() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerListenerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerListenerResource{ + Properties: &armiotoperations.BrokerListenerProperties{ + ServiceType: to.Ptr(armiotoperations.ServiceTypeLoadBalancer), + Ports: []*armiotoperations.ListenerPort{ + { + Port: to.Ptr[int32](8080), + AuthenticationRef: to.Ptr("example-authentication"), + Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets), + }, + { + Port: to.Ptr[int32](8443), + AuthenticationRef: to.Ptr("example-authentication"), + Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets), + TLS: &armiotoperations.TLSCertMethod{ + Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic), + CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{ + IssuerRef: &armiotoperations.CertManagerIssuerRef{ + Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"), + Name: to.Ptr("example-issuer"), + Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer), + }, + }, + }, + }, + { + Port: to.Ptr[int32](1883), + AuthenticationRef: to.Ptr("example-authentication"), + }, + { + Port: to.Ptr[int32](8883), + AuthenticationRef: to.Ptr("example-authentication"), + TLS: &armiotoperations.TLSCertMethod{ + Mode: to.Ptr(armiotoperations.TLSCertMethodModeManual), + Manual: &armiotoperations.X509ManualCertificate{ + SecretRef: to.Ptr("example-secret"), + }, + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerListenerClientCreateOrUpdateResponse{ + // BrokerListenerResource: &armiotoperations.BrokerListenerResource{ + // Properties: &armiotoperations.BrokerListenerProperties{ + // ServiceName: to.Ptr("tpfiszlapdpxktx"), + // ServiceType: to.Ptr(armiotoperations.ServiceTypeLoadBalancer), + // Ports: []*armiotoperations.ListenerPort{ + // { + // Port: to.Ptr[int32](8080), + // AuthenticationRef: to.Ptr("example-authentication"), + // Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets), + // }, + // { + // Port: to.Ptr[int32](8443), + // AuthenticationRef: to.Ptr("example-authentication"), + // Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets), + // TLS: &armiotoperations.TLSCertMethod{ + // Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic), + // CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{ + // IssuerRef: &armiotoperations.CertManagerIssuerRef{ + // Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"), + // Name: to.Ptr("example-issuer"), + // Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer), + // }, + // }, + // }, + // }, + // { + // Port: to.Ptr[int32](1883), + // AuthenticationRef: to.Ptr("example-authentication"), + // }, + // { + // Port: to.Ptr[int32](8883), + // AuthenticationRef: to.Ptr("example-authentication"), + // TLS: &armiotoperations.TLSCertMethod{ + // Mode: to.Ptr(armiotoperations.TLSCertMethodModeManual), + // Manual: &armiotoperations.X509ManualCertificate{ + // SecretRef: to.Ptr("example-secret"), + // }, + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123"), + // Name: to.Ptr("hoqjaachratt"), + // Type: to.Ptr("hizbknwegcdaeh"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Complex.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Complex.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Complex.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_MaximumSet_Gen.go new file mode 100644 index 0000000000..8640db4dfb --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_MaximumSet_Gen.go @@ -0,0 +1,141 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json +func ExampleBrokerListenerClient_BeginCreateOrUpdate_brokerListenerCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerListenerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerListenerResource{ + Properties: &armiotoperations.BrokerListenerProperties{ + ServiceName: to.Ptr("tpfiszlapdpxktx"), + Ports: []*armiotoperations.ListenerPort{ + { + AuthenticationRef: to.Ptr("tjvdroaqqy"), + AuthorizationRef: to.Ptr("inxhvxnwswyrvt"), + NodePort: to.Ptr[int32](7281), + Port: to.Ptr[int32](1268), + Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt), + TLS: &armiotoperations.TLSCertMethod{ + Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic), + CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{ + Duration: to.Ptr("qmpeffoksron"), + SecretName: to.Ptr("oagi"), + RenewBefore: to.Ptr("hutno"), + IssuerRef: &armiotoperations.CertManagerIssuerRef{ + Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"), + Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer), + Name: to.Ptr("ocwoqpgucvjrsuudtjhb"), + }, + PrivateKey: &armiotoperations.CertManagerPrivateKey{ + Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + }, + San: &armiotoperations.SanForCert{ + DNS: []*string{ + to.Ptr("xhvmhrrhgfsapocjeebqtnzarlj"), + }, + IP: []*string{ + to.Ptr("zbgugfzcgsmegevzktsnibyuyp"), + }, + }, + }, + Manual: &armiotoperations.X509ManualCertificate{ + SecretRef: to.Ptr("secret-name"), + }, + }, + }, + }, + ServiceType: to.Ptr(armiotoperations.ServiceTypeClusterIP), + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerListenerClientCreateOrUpdateResponse{ + // BrokerListenerResource: &armiotoperations.BrokerListenerResource{ + // Properties: &armiotoperations.BrokerListenerProperties{ + // ServiceName: to.Ptr("tpfiszlapdpxktx"), + // Ports: []*armiotoperations.ListenerPort{ + // { + // AuthenticationRef: to.Ptr("tjvdroaqqy"), + // AuthorizationRef: to.Ptr("inxhvxnwswyrvt"), + // NodePort: to.Ptr[int32](7281), + // Port: to.Ptr[int32](1268), + // Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt), + // TLS: &armiotoperations.TLSCertMethod{ + // Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic), + // CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{ + // Duration: to.Ptr("qmpeffoksron"), + // SecretName: to.Ptr("oagi"), + // RenewBefore: to.Ptr("hutno"), + // IssuerRef: &armiotoperations.CertManagerIssuerRef{ + // Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"), + // Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer), + // Name: to.Ptr("ocwoqpgucvjrsuudtjhb"), + // }, + // PrivateKey: &armiotoperations.CertManagerPrivateKey{ + // Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + // RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + // }, + // San: &armiotoperations.SanForCert{ + // DNS: []*string{ + // to.Ptr("xhvmhrrhgfsapocjeebqtnzarlj"), + // }, + // IP: []*string{ + // to.Ptr("zbgugfzcgsmegevzktsnibyuyp"), + // }, + // }, + // }, + // Manual: &armiotoperations.X509ManualCertificate{ + // SecretRef: to.Ptr("secret-name"), + // }, + // }, + // }, + // }, + // ServiceType: to.Ptr(armiotoperations.ServiceTypeClusterIP), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123"), + // Name: to.Ptr("hoqjaachratt"), + // Type: to.Ptr("hizbknwegcdaeh"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Simple.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Simple.go new file mode 100644 index 0000000000..f068466adb --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Simple.go @@ -0,0 +1,75 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerListener_CreateOrUpdate_Simple.json +func ExampleBrokerListenerClient_BeginCreateOrUpdate_brokerListenerCreateOrUpdateSimple() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerListenerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerListenerResource{ + Properties: &armiotoperations.BrokerListenerProperties{ + Ports: []*armiotoperations.ListenerPort{ + { + Port: to.Ptr[int32](1883), + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerListenerClientCreateOrUpdateResponse{ + // BrokerListenerResource: &armiotoperations.BrokerListenerResource{ + // Properties: &armiotoperations.BrokerListenerProperties{ + // ServiceName: to.Ptr("tpfiszlapdpxktx"), + // ServiceType: to.Ptr(armiotoperations.ServiceTypeLoadBalancer), + // Ports: []*armiotoperations.ListenerPort{ + // { + // Port: to.Ptr[int32](1883), + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123"), + // Name: to.Ptr("hoqjaachratt"), + // Type: to.Ptr("hizbknwegcdaeh"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Simple.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Simple.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_CreateOrUpdate_Simple.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Delete_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Delete_MaximumSet_Gen.go new file mode 100644 index 0000000000..24f3badbbf --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Delete_MaximumSet_Gen.go @@ -0,0 +1,30 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json +func ExampleBrokerListenerClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerListenerClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Delete_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Delete_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Get_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Get_MaximumSet_Gen.go new file mode 100644 index 0000000000..46e629ea0e --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Get_MaximumSet_Gen.go @@ -0,0 +1,90 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json +func ExampleBrokerListenerClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewBrokerListenerClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerListenerClientGetResponse{ + // BrokerListenerResource: &armiotoperations.BrokerListenerResource{ + // Properties: &armiotoperations.BrokerListenerProperties{ + // ServiceName: to.Ptr("tpfiszlapdpxktx"), + // Ports: []*armiotoperations.ListenerPort{ + // { + // AuthenticationRef: to.Ptr("tjvdroaqqy"), + // AuthorizationRef: to.Ptr("inxhvxnwswyrvt"), + // NodePort: to.Ptr[int32](7281), + // Port: to.Ptr[int32](1268), + // Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt), + // TLS: &armiotoperations.TLSCertMethod{ + // Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic), + // CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{ + // Duration: to.Ptr("qmpeffoksron"), + // SecretName: to.Ptr("oagi"), + // RenewBefore: to.Ptr("hutno"), + // IssuerRef: &armiotoperations.CertManagerIssuerRef{ + // Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"), + // Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer), + // Name: to.Ptr("ocwoqpgucvjrsuudtjhb"), + // }, + // PrivateKey: &armiotoperations.CertManagerPrivateKey{ + // Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + // RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + // }, + // San: &armiotoperations.SanForCert{ + // DNS: []*string{ + // to.Ptr("xhvmhrrhgfsapocjeebqtnzarlj"), + // }, + // IP: []*string{ + // to.Ptr("zbgugfzcgsmegevzktsnibyuyp"), + // }, + // }, + // }, + // Manual: &armiotoperations.X509ManualCertificate{ + // SecretRef: to.Ptr("secret-name"), + // }, + // }, + // }, + // }, + // ServiceType: to.Ptr(armiotoperations.ServiceTypeClusterIP), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123"), + // Name: to.Ptr("hoqjaachratt"), + // Type: to.Ptr("hizbknwegcdaeh"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Get_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_Get_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_ListByResourceGroup_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_ListByResourceGroup_MaximumSet_Gen.go new file mode 100644 index 0000000000..4532912531 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_ListByResourceGroup_MaximumSet_Gen.go @@ -0,0 +1,100 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json +func ExampleBrokerListenerClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewBrokerListenerClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", "resource-name123", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.BrokerListenerClientListByResourceGroupResponse{ + // BrokerListenerResourceListResult: armiotoperations.BrokerListenerResourceListResult{ + // Value: []*armiotoperations.BrokerListenerResource{ + // { + // Properties: &armiotoperations.BrokerListenerProperties{ + // ServiceName: to.Ptr("tpfiszlapdpxktx"), + // Ports: []*armiotoperations.ListenerPort{ + // { + // AuthenticationRef: to.Ptr("tjvdroaqqy"), + // AuthorizationRef: to.Ptr("inxhvxnwswyrvt"), + // NodePort: to.Ptr[int32](7281), + // Port: to.Ptr[int32](1268), + // Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt), + // TLS: &armiotoperations.TLSCertMethod{ + // Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic), + // CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{ + // Duration: to.Ptr("qmpeffoksron"), + // SecretName: to.Ptr("oagi"), + // RenewBefore: to.Ptr("hutno"), + // IssuerRef: &armiotoperations.CertManagerIssuerRef{ + // Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"), + // Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer), + // Name: to.Ptr("ocwoqpgucvjrsuudtjhb"), + // }, + // PrivateKey: &armiotoperations.CertManagerPrivateKey{ + // Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + // RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + // }, + // San: &armiotoperations.SanForCert{ + // DNS: []*string{ + // to.Ptr("xhvmhrrhgfsapocjeebqtnzarlj"), + // }, + // IP: []*string{ + // to.Ptr("zbgugfzcgsmegevzktsnibyuyp"), + // }, + // }, + // }, + // Manual: &armiotoperations.X509ManualCertificate{ + // SecretRef: to.Ptr("secret-name"), + // }, + // }, + // }, + // }, + // ServiceType: to.Ptr(armiotoperations.ServiceTypeClusterIP), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123"), + // Name: to.Ptr("hoqjaachratt"), + // Type: to.Ptr("hizbknwegcdaeh"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Complex.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Complex.go new file mode 100644 index 0000000000..be8a997c9d --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Complex.go @@ -0,0 +1,99 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_Complex.json +func ExampleBrokerClient_BeginCreateOrUpdate_brokerCreateOrUpdateComplex() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.BrokerResource{ + Properties: &armiotoperations.BrokerProperties{ + Cardinality: &armiotoperations.Cardinality{ + BackendChain: &armiotoperations.BackendChain{ + Partitions: to.Ptr[int32](2), + RedundancyFactor: to.Ptr[int32](2), + Workers: to.Ptr[int32](2), + }, + Frontend: &armiotoperations.Frontend{ + Replicas: to.Ptr[int32](2), + Workers: to.Ptr[int32](2), + }, + }, + DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{ + MaxSize: to.Ptr("50M"), + }, + GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{ + CPU: to.Ptr(armiotoperations.OperationalModeEnabled), + }, + MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileMedium), + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerClientCreateOrUpdateResponse{ + // BrokerResource: &armiotoperations.BrokerResource{ + // Properties: &armiotoperations.BrokerProperties{ + // Cardinality: &armiotoperations.Cardinality{ + // BackendChain: &armiotoperations.BackendChain{ + // Partitions: to.Ptr[int32](2), + // RedundancyFactor: to.Ptr[int32](2), + // Workers: to.Ptr[int32](2), + // }, + // Frontend: &armiotoperations.Frontend{ + // Replicas: to.Ptr[int32](2), + // Workers: to.Ptr[int32](2), + // }, + // }, + // DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{ + // MaxSize: to.Ptr("50M"), + // }, + // GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{ + // CPU: to.Ptr(armiotoperations.OperationalModeEnabled), + // }, + // MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileMedium), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123"), + // Name: to.Ptr("llptmlifnqqwairx"), + // Type: to.Ptr("qwrfzxjfxvismlqvigot"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Complex.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Complex.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Complex.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_MaximumSet_Gen.go new file mode 100644 index 0000000000..a17c1c08c3 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_MaximumSet_Gen.go @@ -0,0 +1,351 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_MaximumSet_Gen.json +func ExampleBrokerClient_BeginCreateOrUpdate_brokerCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.BrokerResource{ + Properties: &armiotoperations.BrokerProperties{ + Advanced: &armiotoperations.AdvancedSettings{ + Clients: &armiotoperations.ClientConfig{ + MaxSessionExpirySeconds: to.Ptr[int32](3859), + MaxMessageExpirySeconds: to.Ptr[int32](3263), + MaxPacketSizeBytes: to.Ptr[int32](3029), + SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{ + Length: to.Ptr[int64](6), + Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone), + }, + MaxReceiveMaximum: to.Ptr[int32](2365), + MaxKeepAliveSeconds: to.Ptr[int32](3744), + }, + EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled), + InternalCerts: &armiotoperations.CertManagerCertOptions{ + Duration: to.Ptr("bchrc"), + RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"), + PrivateKey: &armiotoperations.CertManagerPrivateKey{ + Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + }, + }, + }, + Cardinality: &armiotoperations.Cardinality{ + BackendChain: &armiotoperations.BackendChain{ + Partitions: to.Ptr[int32](11), + RedundancyFactor: to.Ptr[int32](5), + Workers: to.Ptr[int32](15), + }, + Frontend: &armiotoperations.Frontend{ + Replicas: to.Ptr[int32](2), + Workers: to.Ptr[int32](6), + }, + }, + Diagnostics: &armiotoperations.BrokerDiagnostics{ + Logs: &armiotoperations.DiagnosticsLogs{ + Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + }, + Metrics: &armiotoperations.Metrics{ + PrometheusPort: to.Ptr[int32](7581), + }, + SelfCheck: &armiotoperations.SelfCheck{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + IntervalSeconds: to.Ptr[int32](158), + TimeoutSeconds: to.Ptr[int32](14), + }, + Traces: &armiotoperations.Traces{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + CacheSizeMegabytes: to.Ptr[int32](28), + SelfTracing: &armiotoperations.SelfTracing{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + IntervalSeconds: to.Ptr[int32](22), + }, + SpanChannelCapacity: to.Ptr[int32](1000), + }, + }, + DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{ + MaxSize: to.Ptr("500M"), + EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + VolumeName: to.Ptr("c"), + VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + AccessModes: []*string{ + to.Ptr("nuluhigrbb"), + }, + DataSource: &armiotoperations.LocalKubernetesReference{ + APIGroup: to.Ptr("npqapyksvvpkohujx"), + Kind: to.Ptr("wazgyb"), + Name: to.Ptr("cwhsgxxcxsyppoefm"), + }, + DataSourceRef: &armiotoperations.KubernetesReference{ + APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + Kind: to.Ptr("odynqzekfzsnawrctaxg"), + Name: to.Ptr("envszivbbmixbyddzg"), + Namespace: to.Ptr("etcfzvxqd"), + }, + Resources: &armiotoperations.VolumeClaimResourceRequirements{ + Limits: map[string]*string{ + "key2719": to.Ptr("hmphcrgctu"), + }, + Requests: map[string]*string{ + "key2909": to.Ptr("txocprnyrsgvhfrg"), + }, + }, + Selector: &armiotoperations.VolumeClaimSpecSelector{ + MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + { + Key: to.Ptr("e"), + Operator: to.Ptr(armiotoperations.OperatorValuesIn), + Values: []*string{ + to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + }, + }, + }, + MatchLabels: map[string]*string{ + "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + }, + }, + }, + PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + VolumeName: to.Ptr("c"), + VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + AccessModes: []*string{ + to.Ptr("nuluhigrbb"), + }, + DataSource: &armiotoperations.LocalKubernetesReference{ + APIGroup: to.Ptr("npqapyksvvpkohujx"), + Kind: to.Ptr("wazgyb"), + Name: to.Ptr("cwhsgxxcxsyppoefm"), + }, + DataSourceRef: &armiotoperations.KubernetesReference{ + APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + Kind: to.Ptr("odynqzekfzsnawrctaxg"), + Name: to.Ptr("envszivbbmixbyddzg"), + Namespace: to.Ptr("etcfzvxqd"), + }, + Resources: &armiotoperations.VolumeClaimResourceRequirements{ + Limits: map[string]*string{ + "key2719": to.Ptr("hmphcrgctu"), + }, + Requests: map[string]*string{ + "key2909": to.Ptr("txocprnyrsgvhfrg"), + }, + }, + Selector: &armiotoperations.VolumeClaimSpecSelector{ + MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + { + Key: to.Ptr("e"), + Operator: to.Ptr(armiotoperations.OperatorValuesIn), + Values: []*string{ + to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + }, + }, + }, + MatchLabels: map[string]*string{ + "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + }, + }, + }, + }, + GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{ + CPU: to.Ptr(armiotoperations.OperationalModeEnabled), + }, + MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny), + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerClientCreateOrUpdateResponse{ + // BrokerResource: &armiotoperations.BrokerResource{ + // Properties: &armiotoperations.BrokerProperties{ + // Advanced: &armiotoperations.AdvancedSettings{ + // Clients: &armiotoperations.ClientConfig{ + // MaxSessionExpirySeconds: to.Ptr[int32](3859), + // MaxMessageExpirySeconds: to.Ptr[int32](3263), + // MaxPacketSizeBytes: to.Ptr[int32](3029), + // SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{ + // Length: to.Ptr[int64](6), + // Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone), + // }, + // MaxReceiveMaximum: to.Ptr[int32](2365), + // MaxKeepAliveSeconds: to.Ptr[int32](3744), + // }, + // EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled), + // InternalCerts: &armiotoperations.CertManagerCertOptions{ + // Duration: to.Ptr("bchrc"), + // RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"), + // PrivateKey: &armiotoperations.CertManagerPrivateKey{ + // Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + // RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + // }, + // }, + // }, + // Cardinality: &armiotoperations.Cardinality{ + // BackendChain: &armiotoperations.BackendChain{ + // Partitions: to.Ptr[int32](11), + // RedundancyFactor: to.Ptr[int32](5), + // Workers: to.Ptr[int32](15), + // }, + // Frontend: &armiotoperations.Frontend{ + // Replicas: to.Ptr[int32](2), + // Workers: to.Ptr[int32](6), + // }, + // }, + // Diagnostics: &armiotoperations.BrokerDiagnostics{ + // Logs: &armiotoperations.DiagnosticsLogs{ + // Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + // }, + // Metrics: &armiotoperations.Metrics{ + // PrometheusPort: to.Ptr[int32](7581), + // }, + // SelfCheck: &armiotoperations.SelfCheck{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](158), + // TimeoutSeconds: to.Ptr[int32](14), + // }, + // Traces: &armiotoperations.Traces{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // CacheSizeMegabytes: to.Ptr[int32](28), + // SelfTracing: &armiotoperations.SelfTracing{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](22), + // }, + // SpanChannelCapacity: to.Ptr[int32](1000), + // }, + // }, + // DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{ + // MaxSize: to.Ptr("500M"), + // EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // }, + // GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{ + // CPU: to.Ptr(armiotoperations.OperationalModeEnabled), + // }, + // MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123"), + // Name: to.Ptr("dowrkel"), + // Type: to.Ptr("xshjnsdgadygb"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Minimal.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Minimal.go new file mode 100644 index 0000000000..637a4c3b4a --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Minimal.go @@ -0,0 +1,208 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_Minimal.json +func ExampleBrokerClient_BeginCreateOrUpdate_brokerCreateOrUpdateMinimal() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.BrokerResource{ + Properties: &armiotoperations.BrokerProperties{ + MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny), + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerClientCreateOrUpdateResponse{ + // BrokerResource: &armiotoperations.BrokerResource{ + // Properties: &armiotoperations.BrokerProperties{ + // Advanced: &armiotoperations.AdvancedSettings{ + // Clients: &armiotoperations.ClientConfig{ + // MaxSessionExpirySeconds: to.Ptr[int32](3859), + // MaxMessageExpirySeconds: to.Ptr[int32](3263), + // MaxPacketSizeBytes: to.Ptr[int32](3029), + // SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{ + // Length: to.Ptr[int64](6), + // Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone), + // }, + // MaxReceiveMaximum: to.Ptr[int32](2365), + // MaxKeepAliveSeconds: to.Ptr[int32](3744), + // }, + // EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled), + // InternalCerts: &armiotoperations.CertManagerCertOptions{ + // Duration: to.Ptr("bchrc"), + // RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"), + // PrivateKey: &armiotoperations.CertManagerPrivateKey{ + // Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + // RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + // }, + // }, + // }, + // Cardinality: &armiotoperations.Cardinality{ + // BackendChain: &armiotoperations.BackendChain{ + // Partitions: to.Ptr[int32](11), + // RedundancyFactor: to.Ptr[int32](5), + // Workers: to.Ptr[int32](15), + // }, + // Frontend: &armiotoperations.Frontend{ + // Replicas: to.Ptr[int32](2), + // Workers: to.Ptr[int32](6), + // }, + // }, + // Diagnostics: &armiotoperations.BrokerDiagnostics{ + // Logs: &armiotoperations.DiagnosticsLogs{ + // Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + // }, + // Metrics: &armiotoperations.Metrics{ + // PrometheusPort: to.Ptr[int32](7581), + // }, + // SelfCheck: &armiotoperations.SelfCheck{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](158), + // TimeoutSeconds: to.Ptr[int32](14), + // }, + // Traces: &armiotoperations.Traces{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // CacheSizeMegabytes: to.Ptr[int32](28), + // SelfTracing: &armiotoperations.SelfTracing{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](22), + // }, + // SpanChannelCapacity: to.Ptr[int32](1000), + // }, + // }, + // DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{ + // MaxSize: to.Ptr("500M"), + // EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // }, + // GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{ + // CPU: to.Ptr(armiotoperations.OperationalModeEnabled), + // }, + // MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123"), + // Name: to.Ptr("dowrkel"), + // Type: to.Ptr("xshjnsdgadygb"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Minimal.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Minimal.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Minimal.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Simple.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Simple.go new file mode 100644 index 0000000000..226b25b567 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Simple.go @@ -0,0 +1,222 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_Simple.json +func ExampleBrokerClient_BeginCreateOrUpdate_brokerCreateOrUpdateSimple() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.BrokerResource{ + Properties: &armiotoperations.BrokerProperties{ + Cardinality: &armiotoperations.Cardinality{ + BackendChain: &armiotoperations.BackendChain{ + Partitions: to.Ptr[int32](2), + RedundancyFactor: to.Ptr[int32](2), + Workers: to.Ptr[int32](2), + }, + Frontend: &armiotoperations.Frontend{ + Replicas: to.Ptr[int32](2), + Workers: to.Ptr[int32](2), + }, + }, + GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{ + CPU: to.Ptr(armiotoperations.OperationalModeEnabled), + }, + MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileLow), + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerClientCreateOrUpdateResponse{ + // BrokerResource: &armiotoperations.BrokerResource{ + // Properties: &armiotoperations.BrokerProperties{ + // Advanced: &armiotoperations.AdvancedSettings{ + // Clients: &armiotoperations.ClientConfig{ + // MaxSessionExpirySeconds: to.Ptr[int32](3859), + // MaxMessageExpirySeconds: to.Ptr[int32](3263), + // MaxPacketSizeBytes: to.Ptr[int32](3029), + // SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{ + // Length: to.Ptr[int64](6), + // Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone), + // }, + // MaxReceiveMaximum: to.Ptr[int32](2365), + // MaxKeepAliveSeconds: to.Ptr[int32](3744), + // }, + // EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled), + // InternalCerts: &armiotoperations.CertManagerCertOptions{ + // Duration: to.Ptr("bchrc"), + // RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"), + // PrivateKey: &armiotoperations.CertManagerPrivateKey{ + // Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + // RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + // }, + // }, + // }, + // Cardinality: &armiotoperations.Cardinality{ + // BackendChain: &armiotoperations.BackendChain{ + // Partitions: to.Ptr[int32](11), + // RedundancyFactor: to.Ptr[int32](5), + // Workers: to.Ptr[int32](15), + // }, + // Frontend: &armiotoperations.Frontend{ + // Replicas: to.Ptr[int32](2), + // Workers: to.Ptr[int32](6), + // }, + // }, + // Diagnostics: &armiotoperations.BrokerDiagnostics{ + // Logs: &armiotoperations.DiagnosticsLogs{ + // Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + // }, + // Metrics: &armiotoperations.Metrics{ + // PrometheusPort: to.Ptr[int32](7581), + // }, + // SelfCheck: &armiotoperations.SelfCheck{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](158), + // TimeoutSeconds: to.Ptr[int32](14), + // }, + // Traces: &armiotoperations.Traces{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // CacheSizeMegabytes: to.Ptr[int32](28), + // SelfTracing: &armiotoperations.SelfTracing{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](22), + // }, + // SpanChannelCapacity: to.Ptr[int32](1000), + // }, + // }, + // DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{ + // MaxSize: to.Ptr("500M"), + // EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // }, + // GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{ + // CPU: to.Ptr(armiotoperations.OperationalModeEnabled), + // }, + // MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123"), + // Name: to.Ptr("dowrkel"), + // Type: to.Ptr("xshjnsdgadygb"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Simple.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Simple.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_CreateOrUpdate_Simple.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Delete_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Delete_MaximumSet_Gen.go new file mode 100644 index 0000000000..a3ef0de5ab --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Delete_MaximumSet_Gen.go @@ -0,0 +1,30 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Broker_Delete_MaximumSet_Gen.json +func ExampleBrokerClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewBrokerClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Delete_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Delete_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Get_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Get_MaximumSet_Gen.go new file mode 100644 index 0000000000..771b20b9c2 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Get_MaximumSet_Gen.go @@ -0,0 +1,195 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Broker_Get_MaximumSet_Gen.json +func ExampleBrokerClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewBrokerClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.BrokerClientGetResponse{ + // BrokerResource: &armiotoperations.BrokerResource{ + // Properties: &armiotoperations.BrokerProperties{ + // Advanced: &armiotoperations.AdvancedSettings{ + // Clients: &armiotoperations.ClientConfig{ + // MaxSessionExpirySeconds: to.Ptr[int32](3859), + // MaxMessageExpirySeconds: to.Ptr[int32](3263), + // MaxPacketSizeBytes: to.Ptr[int32](3029), + // SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{ + // Length: to.Ptr[int64](6), + // Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone), + // }, + // MaxReceiveMaximum: to.Ptr[int32](2365), + // MaxKeepAliveSeconds: to.Ptr[int32](3744), + // }, + // EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled), + // InternalCerts: &armiotoperations.CertManagerCertOptions{ + // Duration: to.Ptr("bchrc"), + // RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"), + // PrivateKey: &armiotoperations.CertManagerPrivateKey{ + // Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + // RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + // }, + // }, + // }, + // Cardinality: &armiotoperations.Cardinality{ + // BackendChain: &armiotoperations.BackendChain{ + // Partitions: to.Ptr[int32](11), + // RedundancyFactor: to.Ptr[int32](5), + // Workers: to.Ptr[int32](15), + // }, + // Frontend: &armiotoperations.Frontend{ + // Replicas: to.Ptr[int32](2), + // Workers: to.Ptr[int32](6), + // }, + // }, + // Diagnostics: &armiotoperations.BrokerDiagnostics{ + // Logs: &armiotoperations.DiagnosticsLogs{ + // Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + // }, + // Metrics: &armiotoperations.Metrics{ + // PrometheusPort: to.Ptr[int32](7581), + // }, + // SelfCheck: &armiotoperations.SelfCheck{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](158), + // TimeoutSeconds: to.Ptr[int32](14), + // }, + // Traces: &armiotoperations.Traces{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // CacheSizeMegabytes: to.Ptr[int32](28), + // SelfTracing: &armiotoperations.SelfTracing{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](22), + // }, + // SpanChannelCapacity: to.Ptr[int32](1000), + // }, + // }, + // DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{ + // MaxSize: to.Ptr("500M"), + // EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // }, + // GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{ + // CPU: to.Ptr(armiotoperations.OperationalModeEnabled), + // }, + // MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123"), + // Name: to.Ptr("dowrkel"), + // Type: to.Ptr("xshjnsdgadygb"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Get_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_Get_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_ListByResourceGroup_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_ListByResourceGroup_MaximumSet_Gen.go new file mode 100644 index 0000000000..c6f7bdd4ad --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_ListByResourceGroup_MaximumSet_Gen.go @@ -0,0 +1,205 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json +func ExampleBrokerClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewBrokerClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.BrokerClientListByResourceGroupResponse{ + // BrokerResourceListResult: armiotoperations.BrokerResourceListResult{ + // Value: []*armiotoperations.BrokerResource{ + // { + // Properties: &armiotoperations.BrokerProperties{ + // Advanced: &armiotoperations.AdvancedSettings{ + // Clients: &armiotoperations.ClientConfig{ + // MaxSessionExpirySeconds: to.Ptr[int32](3859), + // MaxMessageExpirySeconds: to.Ptr[int32](3263), + // MaxPacketSizeBytes: to.Ptr[int32](3029), + // SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{ + // Length: to.Ptr[int64](6), + // Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone), + // }, + // MaxReceiveMaximum: to.Ptr[int32](2365), + // MaxKeepAliveSeconds: to.Ptr[int32](3744), + // }, + // EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled), + // InternalCerts: &armiotoperations.CertManagerCertOptions{ + // Duration: to.Ptr("bchrc"), + // RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"), + // PrivateKey: &armiotoperations.CertManagerPrivateKey{ + // Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256), + // RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways), + // }, + // }, + // }, + // Cardinality: &armiotoperations.Cardinality{ + // BackendChain: &armiotoperations.BackendChain{ + // Partitions: to.Ptr[int32](11), + // RedundancyFactor: to.Ptr[int32](5), + // Workers: to.Ptr[int32](15), + // }, + // Frontend: &armiotoperations.Frontend{ + // Replicas: to.Ptr[int32](2), + // Workers: to.Ptr[int32](6), + // }, + // }, + // Diagnostics: &armiotoperations.BrokerDiagnostics{ + // Logs: &armiotoperations.DiagnosticsLogs{ + // Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + // }, + // Metrics: &armiotoperations.Metrics{ + // PrometheusPort: to.Ptr[int32](7581), + // }, + // SelfCheck: &armiotoperations.SelfCheck{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](158), + // TimeoutSeconds: to.Ptr[int32](14), + // }, + // Traces: &armiotoperations.Traces{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // CacheSizeMegabytes: to.Ptr[int32](28), + // SelfTracing: &armiotoperations.SelfTracing{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // IntervalSeconds: to.Ptr[int32](22), + // }, + // SpanChannelCapacity: to.Ptr[int32](1000), + // }, + // }, + // DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{ + // MaxSize: to.Ptr("500M"), + // EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{ + // VolumeName: to.Ptr("c"), + // VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"), + // StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"), + // AccessModes: []*string{ + // to.Ptr("nuluhigrbb"), + // }, + // DataSource: &armiotoperations.LocalKubernetesReference{ + // APIGroup: to.Ptr("npqapyksvvpkohujx"), + // Kind: to.Ptr("wazgyb"), + // Name: to.Ptr("cwhsgxxcxsyppoefm"), + // }, + // DataSourceRef: &armiotoperations.KubernetesReference{ + // APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"), + // Kind: to.Ptr("odynqzekfzsnawrctaxg"), + // Name: to.Ptr("envszivbbmixbyddzg"), + // Namespace: to.Ptr("etcfzvxqd"), + // }, + // Resources: &armiotoperations.VolumeClaimResourceRequirements{ + // Limits: map[string]*string{ + // "key2719": to.Ptr("hmphcrgctu"), + // }, + // Requests: map[string]*string{ + // "key2909": to.Ptr("txocprnyrsgvhfrg"), + // }, + // }, + // Selector: &armiotoperations.VolumeClaimSpecSelector{ + // MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{ + // { + // Key: to.Ptr("e"), + // Operator: to.Ptr(armiotoperations.OperatorValuesIn), + // Values: []*string{ + // to.Ptr("slmpajlywqvuyknipgztsonqyybt"), + // }, + // }, + // }, + // MatchLabels: map[string]*string{ + // "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"), + // }, + // }, + // }, + // }, + // GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{ + // CPU: to.Ptr(armiotoperations.OperationalModeEnabled), + // }, + // MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123"), + // Name: to.Ptr("dowrkel"), + // Type: to.Ptr("xshjnsdgadygb"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_ListByResourceGroup_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Broker_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADLSv2.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADLSv2.go new file mode 100644 index 0000000000..c63314047a --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADLSv2.go @@ -0,0 +1,83 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateAdlsv2() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "adlsv2-endpoint", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeDataLakeStorage), + DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{ + Host: to.Ptr("example.blob.core.windows.net"), + Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{ + Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodAccessToken), + AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{ + SecretRef: to.Ptr("my-secret"), + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeDataLakeStorage), + // DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{ + // Host: to.Ptr("example.blob.core.windows.net"), + // Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{ + // Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodAccessToken), + // AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{ + // SecretRef: to.Ptr("my-secret"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADLSv2.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADLSv2.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADLSv2.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADX.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADX.go new file mode 100644 index 0000000000..01624b43e5 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADX.go @@ -0,0 +1,90 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateAdx() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "adx-endpoint", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer), + DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{ + Host: to.Ptr("example.westeurope.kusto.windows.net"), + Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{ + Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity), + SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{}, + }, + Database: to.Ptr("example-database"), + Batching: &armiotoperations.BatchingConfiguration{ + LatencySeconds: to.Ptr[int32](9312), + MaxMessages: to.Ptr[int32](9028), + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer), + // DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{ + // Host: to.Ptr("example.westeurope.kusto.windows.net"), + // Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{ + // Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // }, + // }, + // Database: to.Ptr("example-database"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](9312), + // MaxMessages: to.Ptr[int32](9028), + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADX.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADX.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_ADX.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_AIO.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_AIO.go new file mode 100644 index 0000000000..a7d19df22b --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_AIO.go @@ -0,0 +1,89 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateAio() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "aio-builtin-broker-endpoint", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt), + MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + Host: to.Ptr("aio-broker:18883"), + Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{ + Audience: to.Ptr("aio-internal"), + }, + }, + TLS: &armiotoperations.TLSProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + TrustedCaCertificateConfigMapRef: to.Ptr("aio-ca-trust-bundle-test-only"), + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt), + // MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + // Host: to.Ptr("aio-broker:18883"), + // Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + // ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{ + // Audience: to.Ptr("aio-internal"), + // }, + // }, + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // TrustedCaCertificateConfigMapRef: to.Ptr("aio-ca-trust-bundle-test-only"), + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_AIO.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_AIO.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_AIO.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventGrid.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventGrid.go new file mode 100644 index 0000000000..a54fb1f053 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventGrid.go @@ -0,0 +1,86 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateEventGrid() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "event-grid-endpoint", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt), + MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + Host: to.Ptr("example.westeurope-1.ts.eventgrid.azure.net:8883"), + Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity), + SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{}, + }, + TLS: &armiotoperations.TLSProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt), + // MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + // Host: to.Ptr("example.westeurope-1.ts.eventgrid.azure.net:8883"), + // Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + // Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // }, + // }, + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventGrid.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventGrid.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventGrid.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventHub.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventHub.go new file mode 100644 index 0000000000..83ffd50568 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventHub.go @@ -0,0 +1,88 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateEventHub() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "event-hub-endpoint", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka), + KafkaSettings: &armiotoperations.DataflowEndpointKafka{ + Host: to.Ptr("example.servicebus.windows.net:9093"), + Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{ + Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity), + SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{}, + }, + TLS: &armiotoperations.TLSProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + }, + ConsumerGroupID: to.Ptr("aiodataflows"), + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka), + // KafkaSettings: &armiotoperations.DataflowEndpointKafka{ + // Host: to.Ptr("example.servicebus.windows.net:9093"), + // Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{ + // Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // }, + // }, + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // }, + // ConsumerGroupID: to.Ptr("aiodataflows"), + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventHub.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventHub.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_EventHub.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Fabric.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Fabric.go new file mode 100644 index 0000000000..49a6b9cbb6 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Fabric.go @@ -0,0 +1,90 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateFabric() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "fabric-endpoint", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeFabricOneLake), + FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{ + Host: to.Ptr("onelake.dfs.fabric.microsoft.com"), + Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{ + Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity), + SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{}, + }, + Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{ + WorkspaceName: to.Ptr("example-workspace"), + LakehouseName: to.Ptr("example-lakehouse"), + }, + OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeTables), + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeFabricOneLake), + // FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{ + // Host: to.Ptr("onelake.dfs.fabric.microsoft.com"), + // Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{ + // Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // }, + // }, + // Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{ + // WorkspaceName: to.Ptr("example-workspace"), + // LakehouseName: to.Ptr("example-lakehouse"), + // }, + // OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeTables), + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Fabric.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Fabric.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Fabric.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Kafka.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Kafka.go new file mode 100644 index 0000000000..bbc2b7c2db --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Kafka.go @@ -0,0 +1,117 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateKafka() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "generic-kafka-endpoint", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka), + KafkaSettings: &armiotoperations.DataflowEndpointKafka{ + Host: to.Ptr("example.kafka.local:9093"), + Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{ + Method: to.Ptr(armiotoperations.KafkaAuthMethodSasl), + SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{ + SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain), + SecretRef: to.Ptr("my-secret"), + }, + }, + TLS: &armiotoperations.TLSProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + TrustedCaCertificateConfigMapRef: to.Ptr("ca-certificates"), + }, + ConsumerGroupID: to.Ptr("dataflows"), + Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionGzip), + Batching: &armiotoperations.DataflowEndpointKafkaBatching{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + LatencyMs: to.Ptr[int32](5), + MaxBytes: to.Ptr[int32](1000000), + MaxMessages: to.Ptr[int32](100000), + }, + PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault), + KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksAll), + CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled), + CloudEventAttributes: to.Ptr(armiotoperations.CloudEventAttributeTypePropagate), + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka), + // KafkaSettings: &armiotoperations.DataflowEndpointKafka{ + // Host: to.Ptr("example.kafka.local:9093"), + // Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{ + // Method: to.Ptr(armiotoperations.KafkaAuthMethodSasl), + // SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{ + // SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain), + // SecretRef: to.Ptr("my-secret"), + // }, + // }, + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // TrustedCaCertificateConfigMapRef: to.Ptr("ca-certificates"), + // }, + // ConsumerGroupID: to.Ptr("dataflows"), + // Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionGzip), + // Batching: &armiotoperations.DataflowEndpointKafkaBatching{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // LatencyMs: to.Ptr[int32](5), + // MaxBytes: to.Ptr[int32](1000000), + // MaxMessages: to.Ptr[int32](100000), + // }, + // PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault), + // KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksAll), + // CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled), + // CloudEventAttributes: to.Ptr(armiotoperations.CloudEventAttributeTypePropagate), + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Kafka.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Kafka.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_Kafka.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_LocalStorage.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_LocalStorage.go new file mode 100644 index 0000000000..ac2d09d436 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_LocalStorage.go @@ -0,0 +1,71 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateLocalStorage() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "local-storage-endpoint", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeLocalStorage), + LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{ + PersistentVolumeClaimRef: to.Ptr("example-pvc"), + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeLocalStorage), + // LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{ + // PersistentVolumeClaimRef: to.Ptr("example-pvc"), + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_LocalStorage.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_LocalStorage.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_LocalStorage.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MQTT.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MQTT.go new file mode 100644 index 0000000000..09b906c8c6 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MQTT.go @@ -0,0 +1,103 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateMqtt() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "generic-mqtt-broker-endpoint", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt), + MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + Host: to.Ptr("example.broker.local:1883"), + Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + Method: to.Ptr(armiotoperations.MqttAuthMethodX509Certificate), + X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + SecretRef: to.Ptr("example-secret"), + }, + }, + TLS: &armiotoperations.TLSProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeDisabled), + }, + ClientIDPrefix: to.Ptr("factory-gateway"), + Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep), + SessionExpirySeconds: to.Ptr[int32](3600), + Qos: to.Ptr[int32](1), + Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets), + MaxInflightMessages: to.Ptr[int32](100), + KeepAliveSeconds: to.Ptr[int32](60), + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt), + // MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + // Host: to.Ptr("example.broker.local:1883"), + // Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + // Method: to.Ptr(armiotoperations.MqttAuthMethodX509Certificate), + // X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + // SecretRef: to.Ptr("example-secret"), + // }, + // }, + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeDisabled), + // }, + // ClientIDPrefix: to.Ptr("factory-gateway"), + // Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep), + // SessionExpirySeconds: to.Ptr[int32](3600), + // Qos: to.Ptr[int32](1), + // Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets), + // MaxInflightMessages: to.Ptr[int32](100), + // KeepAliveSeconds: to.Ptr[int32](60), + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MQTT.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MQTT.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MQTT.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.go new file mode 100644 index 0000000000..22b85febdb --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.go @@ -0,0 +1,331 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json +func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.DataflowEndpointResource{ + Properties: &armiotoperations.DataflowEndpointProperties{ + EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer), + DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{ + Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{ + Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity), + SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + Audience: to.Ptr("psxomrfbhoflycm"), + }, + UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + Scope: to.Ptr("zop"), + TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + }, + }, + Database: to.Ptr("yqcdpjsifm"), + Host: to.Ptr("..kusto.windows.net"), + Batching: &armiotoperations.BatchingConfiguration{ + LatencySeconds: to.Ptr[int32](9312), + MaxMessages: to.Ptr[int32](9028), + }, + }, + DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{ + Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{ + Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity), + AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{ + SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"), + }, + SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + Audience: to.Ptr("psxomrfbhoflycm"), + }, + UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + Scope: to.Ptr("zop"), + TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + }, + }, + Host: to.Ptr(".blob.core.windows.net"), + Batching: &armiotoperations.BatchingConfiguration{ + LatencySeconds: to.Ptr[int32](9312), + MaxMessages: to.Ptr[int32](9028), + }, + }, + FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{ + Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{ + Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity), + SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + Audience: to.Ptr("psxomrfbhoflycm"), + }, + UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + Scope: to.Ptr("zop"), + TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + }, + }, + Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{ + LakehouseName: to.Ptr("wpeathi"), + WorkspaceName: to.Ptr("nwgmitkbljztgms"), + }, + OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles), + Host: to.Ptr("https://.fabric.microsoft.com"), + Batching: &armiotoperations.BatchingConfiguration{ + LatencySeconds: to.Ptr[int32](9312), + MaxMessages: to.Ptr[int32](9028), + }, + }, + KafkaSettings: &armiotoperations.DataflowEndpointKafka{ + Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{ + Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity), + SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + Audience: to.Ptr("psxomrfbhoflycm"), + }, + UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + Scope: to.Ptr("zop"), + TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + }, + SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{ + SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain), + SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"), + }, + X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + SecretRef: to.Ptr("afwizrystfslkfqd"), + }, + }, + ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"), + Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"), + Batching: &armiotoperations.DataflowEndpointKafkaBatching{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + LatencyMs: to.Ptr[int32](3679), + MaxBytes: to.Ptr[int32](8887), + MaxMessages: to.Ptr[int32](2174), + }, + CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled), + Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone), + KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero), + PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault), + TLS: &armiotoperations.TLSProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"), + }, + }, + LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{ + PersistentVolumeClaimRef: to.Ptr("jjwqwvd"), + }, + MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity), + SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + Audience: to.Ptr("psxomrfbhoflycm"), + }, + UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + Scope: to.Ptr("zop"), + TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + }, + ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{ + Audience: to.Ptr("ejbklrbxgjaqleoycgpje"), + }, + X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + SecretRef: to.Ptr("afwizrystfslkfqd"), + }, + }, + ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"), + Host: to.Ptr("nyhnxqnbspstctl"), + Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt), + KeepAliveSeconds: to.Ptr[int32](0), + Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep), + MaxInflightMessages: to.Ptr[int32](0), + Qos: to.Ptr[int32](1), + SessionExpirySeconds: to.Ptr[int32](0), + TLS: &armiotoperations.TLSProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"), + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer), + // DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{ + // Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{ + // Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // }, + // Database: to.Ptr("yqcdpjsifm"), + // Host: to.Ptr("..kusto.windows.net"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](1228), + // MaxMessages: to.Ptr[int32](171), + // }, + // }, + // DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{ + // Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{ + // Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity), + // AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{ + // SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"), + // }, + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // }, + // Host: to.Ptr(".blob.core.windows.net"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](1228), + // MaxMessages: to.Ptr[int32](171), + // }, + // }, + // FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{ + // Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{ + // Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // }, + // Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{ + // LakehouseName: to.Ptr("wpeathi"), + // WorkspaceName: to.Ptr("nwgmitkbljztgms"), + // }, + // OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles), + // Host: to.Ptr("https://.fabric.microsoft.com"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](1228), + // MaxMessages: to.Ptr[int32](171), + // }, + // }, + // KafkaSettings: &armiotoperations.DataflowEndpointKafka{ + // Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{ + // Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{ + // SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain), + // SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"), + // }, + // X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + // SecretRef: to.Ptr("afwizrystfslkfqd"), + // }, + // }, + // ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"), + // Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"), + // Batching: &armiotoperations.DataflowEndpointKafkaBatching{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // LatencyMs: to.Ptr[int32](3679), + // MaxBytes: to.Ptr[int32](8887), + // MaxMessages: to.Ptr[int32](2174), + // }, + // CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled), + // Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone), + // KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero), + // PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault), + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"), + // }, + // }, + // LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{ + // PersistentVolumeClaimRef: to.Ptr("jjwqwvd"), + // }, + // MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + // Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + // Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{ + // Audience: to.Ptr("ejbklrbxgjaqleoycgpje"), + // }, + // X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + // SecretRef: to.Ptr("afwizrystfslkfqd"), + // }, + // }, + // ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"), + // Host: to.Ptr("nyhnxqnbspstctl"), + // Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt), + // KeepAliveSeconds: to.Ptr[int32](0), + // Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep), + // MaxInflightMessages: to.Ptr[int32](0), + // Qos: to.Ptr[int32](1), + // SessionExpirySeconds: to.Ptr[int32](0), + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"), + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Delete_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Delete_MaximumSet_Gen.go new file mode 100644 index 0000000000..4d3d0370d8 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Delete_MaximumSet_Gen.go @@ -0,0 +1,30 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json +func ExampleDataflowEndpointClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowEndpointClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Delete_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Delete_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Get_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Get_MaximumSet_Gen.go new file mode 100644 index 0000000000..0921fd2ceb --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Get_MaximumSet_Gen.go @@ -0,0 +1,185 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json +func ExampleDataflowEndpointClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewDataflowEndpointClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowEndpointClientGetResponse{ + // DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{ + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer), + // DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{ + // Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{ + // Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // }, + // Database: to.Ptr("yqcdpjsifm"), + // Host: to.Ptr("..kusto.windows.net"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](1228), + // MaxMessages: to.Ptr[int32](171), + // }, + // }, + // DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{ + // Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{ + // Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity), + // AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{ + // SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"), + // }, + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // }, + // Host: to.Ptr(".blob.core.windows.net"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](1228), + // MaxMessages: to.Ptr[int32](171), + // }, + // }, + // FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{ + // Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{ + // Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // }, + // Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{ + // LakehouseName: to.Ptr("wpeathi"), + // WorkspaceName: to.Ptr("nwgmitkbljztgms"), + // }, + // OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles), + // Host: to.Ptr("https://.fabric.microsoft.com"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](1228), + // MaxMessages: to.Ptr[int32](171), + // }, + // }, + // KafkaSettings: &armiotoperations.DataflowEndpointKafka{ + // Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{ + // Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{ + // SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain), + // SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"), + // }, + // X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + // SecretRef: to.Ptr("afwizrystfslkfqd"), + // }, + // }, + // ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"), + // Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"), + // Batching: &armiotoperations.DataflowEndpointKafkaBatching{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // LatencyMs: to.Ptr[int32](3679), + // MaxBytes: to.Ptr[int32](8887), + // MaxMessages: to.Ptr[int32](2174), + // }, + // CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled), + // Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone), + // KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero), + // PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault), + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"), + // }, + // }, + // LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{ + // PersistentVolumeClaimRef: to.Ptr("jjwqwvd"), + // }, + // MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + // Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + // Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{ + // Audience: to.Ptr("ejbklrbxgjaqleoycgpje"), + // }, + // X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + // SecretRef: to.Ptr("afwizrystfslkfqd"), + // }, + // }, + // ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"), + // Host: to.Ptr("nyhnxqnbspstctl"), + // Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt), + // KeepAliveSeconds: to.Ptr[int32](0), + // Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep), + // MaxInflightMessages: to.Ptr[int32](0), + // Qos: to.Ptr[int32](1), + // SessionExpirySeconds: to.Ptr[int32](0), + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"), + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Get_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_Get_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.go new file mode 100644 index 0000000000..f52a4971b2 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.go @@ -0,0 +1,195 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json +func ExampleDataflowEndpointClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewDataflowEndpointClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.DataflowEndpointClientListByResourceGroupResponse{ + // DataflowEndpointResourceListResult: armiotoperations.DataflowEndpointResourceListResult{ + // Value: []*armiotoperations.DataflowEndpointResource{ + // { + // Properties: &armiotoperations.DataflowEndpointProperties{ + // EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer), + // DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{ + // Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{ + // Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // }, + // Database: to.Ptr("yqcdpjsifm"), + // Host: to.Ptr("..kusto.windows.net"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](1228), + // MaxMessages: to.Ptr[int32](171), + // }, + // }, + // DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{ + // Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{ + // Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity), + // AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{ + // SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"), + // }, + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // }, + // Host: to.Ptr(".blob.core.windows.net"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](1228), + // MaxMessages: to.Ptr[int32](171), + // }, + // }, + // FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{ + // Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{ + // Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // }, + // Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{ + // LakehouseName: to.Ptr("wpeathi"), + // WorkspaceName: to.Ptr("nwgmitkbljztgms"), + // }, + // OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles), + // Host: to.Ptr("https://.fabric.microsoft.com"), + // Batching: &armiotoperations.BatchingConfiguration{ + // LatencySeconds: to.Ptr[int32](1228), + // MaxMessages: to.Ptr[int32](171), + // }, + // }, + // KafkaSettings: &armiotoperations.DataflowEndpointKafka{ + // Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{ + // Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{ + // SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain), + // SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"), + // }, + // X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + // SecretRef: to.Ptr("afwizrystfslkfqd"), + // }, + // }, + // ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"), + // Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"), + // Batching: &armiotoperations.DataflowEndpointKafkaBatching{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // LatencyMs: to.Ptr[int32](3679), + // MaxBytes: to.Ptr[int32](8887), + // MaxMessages: to.Ptr[int32](2174), + // }, + // CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled), + // Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone), + // KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero), + // PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault), + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"), + // }, + // }, + // LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{ + // PersistentVolumeClaimRef: to.Ptr("jjwqwvd"), + // }, + // MqttSettings: &armiotoperations.DataflowEndpointMqtt{ + // Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{ + // Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity), + // SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{ + // Audience: to.Ptr("psxomrfbhoflycm"), + // }, + // UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{ + // ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"), + // Scope: to.Ptr("zop"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{ + // Audience: to.Ptr("ejbklrbxgjaqleoycgpje"), + // }, + // X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{ + // SecretRef: to.Ptr("afwizrystfslkfqd"), + // }, + // }, + // ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"), + // Host: to.Ptr("nyhnxqnbspstctl"), + // Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt), + // KeepAliveSeconds: to.Ptr[int32](0), + // Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep), + // MaxInflightMessages: to.Ptr[int32](0), + // Qos: to.Ptr[int32](1), + // SessionExpirySeconds: to.Ptr[int32](0), + // TLS: &armiotoperations.TLSProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"), + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"), + // Name: to.Ptr("zyhxscudobzfacetvgyjiav"), + // Type: to.Ptr("iay"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.go new file mode 100644 index 0000000000..9f1f18c91c --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.go @@ -0,0 +1,81 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json +func ExampleDataflowProfileClient_BeginCreateOrUpdate_dataflowProfileCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowProfileClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.DataflowProfileResource{ + Properties: &armiotoperations.DataflowProfileProperties{ + Diagnostics: &armiotoperations.ProfileDiagnostics{ + Logs: &armiotoperations.DiagnosticsLogs{ + Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + }, + Metrics: &armiotoperations.Metrics{ + PrometheusPort: to.Ptr[int32](7581), + }, + }, + InstanceCount: to.Ptr[int32](14), + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowProfileClientCreateOrUpdateResponse{ + // DataflowProfileResource: &armiotoperations.DataflowProfileResource{ + // Properties: &armiotoperations.DataflowProfileProperties{ + // Diagnostics: &armiotoperations.ProfileDiagnostics{ + // Logs: &armiotoperations.DiagnosticsLogs{ + // Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + // }, + // Metrics: &armiotoperations.Metrics{ + // PrometheusPort: to.Ptr[int32](7581), + // }, + // }, + // InstanceCount: to.Ptr[int32](14), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123"), + // Name: to.Ptr("bwhcjsnnfnrmbixamyxjau"), + // Type: to.Ptr("ejvancsomtbapgztnerhlvx"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Minimal.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Minimal.go new file mode 100644 index 0000000000..4ad241bf56 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Minimal.go @@ -0,0 +1,65 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json +func ExampleDataflowProfileClient_BeginCreateOrUpdate_dataflowProfileCreateOrUpdateMinimal() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowProfileClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "aio-dataflowprofile", armiotoperations.DataflowProfileResource{ + Properties: &armiotoperations.DataflowProfileProperties{ + InstanceCount: to.Ptr[int32](1), + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowProfileClientCreateOrUpdateResponse{ + // DataflowProfileResource: &armiotoperations.DataflowProfileResource{ + // Properties: &armiotoperations.DataflowProfileProperties{ + // InstanceCount: to.Ptr[int32](1), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123"), + // Name: to.Ptr("bwhcjsnnfnrmbixamyxjau"), + // Type: to.Ptr("ejvancsomtbapgztnerhlvx"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Minimal.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Minimal.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Minimal.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Multi.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Multi.go new file mode 100644 index 0000000000..127108d001 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Multi.go @@ -0,0 +1,65 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json +func ExampleDataflowProfileClient_BeginCreateOrUpdate_dataflowProfileCreateOrUpdateMulti() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowProfileClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "aio-dataflowprofile", armiotoperations.DataflowProfileResource{ + Properties: &armiotoperations.DataflowProfileProperties{ + InstanceCount: to.Ptr[int32](3), + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowProfileClientCreateOrUpdateResponse{ + // DataflowProfileResource: &armiotoperations.DataflowProfileResource{ + // Properties: &armiotoperations.DataflowProfileProperties{ + // InstanceCount: to.Ptr[int32](3), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123"), + // Name: to.Ptr("bwhcjsnnfnrmbixamyxjau"), + // Type: to.Ptr("ejvancsomtbapgztnerhlvx"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Multi.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Multi.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_CreateOrUpdate_Multi.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Delete_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Delete_MaximumSet_Gen.go new file mode 100644 index 0000000000..329cc23e30 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Delete_MaximumSet_Gen.go @@ -0,0 +1,30 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json +func ExampleDataflowProfileClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowProfileClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Delete_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Delete_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Get_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Get_MaximumSet_Gen.go new file mode 100644 index 0000000000..d4e34f8bcd --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Get_MaximumSet_Gen.go @@ -0,0 +1,60 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json +func ExampleDataflowProfileClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewDataflowProfileClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowProfileClientGetResponse{ + // DataflowProfileResource: &armiotoperations.DataflowProfileResource{ + // Properties: &armiotoperations.DataflowProfileProperties{ + // Diagnostics: &armiotoperations.ProfileDiagnostics{ + // Logs: &armiotoperations.DiagnosticsLogs{ + // Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + // }, + // Metrics: &armiotoperations.Metrics{ + // PrometheusPort: to.Ptr[int32](7581), + // }, + // }, + // InstanceCount: to.Ptr[int32](14), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123"), + // Name: to.Ptr("bwhcjsnnfnrmbixamyxjau"), + // Type: to.Ptr("ejvancsomtbapgztnerhlvx"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Get_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_Get_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.go new file mode 100644 index 0000000000..61ead734f5 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.go @@ -0,0 +1,70 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json +func ExampleDataflowProfileClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewDataflowProfileClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.DataflowProfileClientListByResourceGroupResponse{ + // DataflowProfileResourceListResult: armiotoperations.DataflowProfileResourceListResult{ + // Value: []*armiotoperations.DataflowProfileResource{ + // { + // Properties: &armiotoperations.DataflowProfileProperties{ + // Diagnostics: &armiotoperations.ProfileDiagnostics{ + // Logs: &armiotoperations.DiagnosticsLogs{ + // Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"), + // }, + // Metrics: &armiotoperations.Metrics{ + // PrometheusPort: to.Ptr[int32](7581), + // }, + // }, + // InstanceCount: to.Ptr[int32](14), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123"), + // Name: to.Ptr("bwhcjsnnfnrmbixamyxjau"), + // Type: to.Ptr("ejvancsomtbapgztnerhlvx"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexContextualization.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexContextualization.go new file mode 100644 index 0000000000..e5ef1ff84c --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexContextualization.go @@ -0,0 +1,165 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json +func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateComplexContextualization() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-adx-contexualized", armiotoperations.DataflowResource{ + Properties: &armiotoperations.DataflowProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + Operations: []*armiotoperations.DataflowOperation{ + { + OperationType: to.Ptr(armiotoperations.OperationTypeSource), + Name: to.Ptr("source1"), + SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + DataSources: []*string{ + to.Ptr("azure-iot-operations/data/thermostat"), + }, + }, + }, + { + OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation), + Name: to.Ptr("transformation1"), + BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + { + Inputs: []*string{ + to.Ptr("*"), + }, + Output: to.Ptr("*"), + }, + { + Inputs: []*string{ + to.Ptr("$context(quality).*"), + }, + Output: to.Ptr("enriched.*"), + }, + }, + Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{ + { + Key: to.Ptr("quality"), + Inputs: []*string{ + to.Ptr("$source.country"), + to.Ptr("$context.country"), + }, + Expression: to.Ptr("$1 == $2"), + }, + }, + }, + }, + { + OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + Name: to.Ptr("destination1"), + DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + EndpointRef: to.Ptr("adx-endpoint"), + DataDestination: to.Ptr("mytable"), + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowClientCreateOrUpdateResponse{ + // DataflowResource: &armiotoperations.DataflowResource{ + // Properties: &armiotoperations.DataflowProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // Operations: []*armiotoperations.DataflowOperation{ + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeSource), + // Name: to.Ptr("source1"), + // SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + // EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + // DataSources: []*string{ + // to.Ptr("azure-iot-operations/data/thermostat"), + // }, + // }, + // }, + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation), + // Name: to.Ptr("transformation1"), + // BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + // Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + // { + // Inputs: []*string{ + // to.Ptr("*"), + // }, + // Output: to.Ptr("*"), + // }, + // { + // Inputs: []*string{ + // to.Ptr("$context(quality).*"), + // }, + // Output: to.Ptr("enriched.*"), + // }, + // }, + // Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{ + // { + // Key: to.Ptr("quality"), + // Inputs: []*string{ + // to.Ptr("$source.country"), + // to.Ptr("$context.country"), + // }, + // Expression: to.Ptr("$1 == $2"), + // }, + // }, + // }, + // }, + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + // Name: to.Ptr("destination1"), + // DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + // EndpointRef: to.Ptr("adx-endpoint"), + // DataDestination: to.Ptr("mytable"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"), + // Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"), + // Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexContextualization.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexContextualization.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexContextualization.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexEventHub.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexEventHub.go new file mode 100644 index 0000000000..fff1773c35 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexEventHub.go @@ -0,0 +1,198 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_ComplexEventHub.json +func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateComplexEventHub() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-event-hub-transformed", armiotoperations.DataflowResource{ + Properties: &armiotoperations.DataflowProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + Operations: []*armiotoperations.DataflowOperation{ + { + OperationType: to.Ptr(armiotoperations.OperationTypeSource), + Name: to.Ptr("source1"), + SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + DataSources: []*string{ + to.Ptr("azure-iot-operations/data/thermostat"), + }, + }, + }, + { + OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation), + BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{ + { + Inputs: []*string{ + to.Ptr("temperature.Value"), + to.Ptr("\"Tag 10\".Value"), + }, + Expression: to.Ptr("$1 > 9000 && $2 >= 8000"), + }, + }, + Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + { + Inputs: []*string{ + to.Ptr("*"), + }, + Output: to.Ptr("*"), + }, + { + Inputs: []*string{ + to.Ptr("temperature.Value"), + to.Ptr("\"Tag 10\".Value"), + }, + Expression: to.Ptr("($1+$2)/2"), + Output: to.Ptr("AvgTemp.Value"), + }, + { + Inputs: []*string{}, + Expression: to.Ptr("true"), + Output: to.Ptr("dataflow-processed"), + }, + { + Inputs: []*string{ + to.Ptr("temperature.SourceTimestamp"), + }, + Expression: to.Ptr(""), + Output: to.Ptr(""), + }, + { + Inputs: []*string{ + to.Ptr("\"Tag 10\""), + }, + Expression: to.Ptr(""), + Output: to.Ptr("pressure"), + }, + { + Inputs: []*string{ + to.Ptr("temperature.Value"), + }, + Expression: to.Ptr("cToF($1)"), + Output: to.Ptr("temperatureF.Value"), + }, + { + Inputs: []*string{ + to.Ptr("\"Tag 10\".Value"), + }, + Expression: to.Ptr("scale ($1,0,10,0,100)"), + Output: to.Ptr("\"Scale Tag 10\".Value"), + }, + }, + }, + }, + { + OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + Name: to.Ptr("destination1"), + DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + EndpointRef: to.Ptr("event-hub-endpoint"), + DataDestination: to.Ptr("myuniqueeventhub"), + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowClientCreateOrUpdateResponse{ + // DataflowResource: &armiotoperations.DataflowResource{ + // Properties: &armiotoperations.DataflowProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // Operations: []*armiotoperations.DataflowOperation{ + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeSource), + // Name: to.Ptr("source1"), + // SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + // EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + // DataSources: []*string{ + // to.Ptr("azure-iot-operations/data/thermostat"), + // }, + // }, + // }, + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation), + // Name: to.Ptr("transformation1"), + // BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + // Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + // { + // Inputs: []*string{ + // to.Ptr("*"), + // }, + // Output: to.Ptr("*"), + // }, + // { + // Inputs: []*string{ + // to.Ptr("$context(quality).*"), + // }, + // Output: to.Ptr("enriched.*"), + // }, + // }, + // Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{ + // { + // Key: to.Ptr("quality"), + // Inputs: []*string{ + // to.Ptr("$source.country"), + // to.Ptr("$context.country"), + // }, + // Expression: to.Ptr("$1 == $2"), + // }, + // }, + // }, + // }, + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + // Name: to.Ptr("destination1"), + // DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + // EndpointRef: to.Ptr("adx-endpoint"), + // DataDestination: to.Ptr("mytable"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"), + // Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"), + // Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexEventHub.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexEventHub.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_ComplexEventHub.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_FilterToTopic.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_FilterToTopic.go new file mode 100644 index 0000000000..43ef56af8c --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_FilterToTopic.go @@ -0,0 +1,157 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_FilterToTopic.json +func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateFilterToTopic() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "mqtt-filter-to-topic", armiotoperations.DataflowResource{ + Properties: &armiotoperations.DataflowProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + Operations: []*armiotoperations.DataflowOperation{ + { + OperationType: to.Ptr(armiotoperations.OperationTypeSource), + Name: to.Ptr("source1"), + SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + DataSources: []*string{ + to.Ptr("azure-iot-operations/data/thermostat"), + }, + }, + }, + { + OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation), + Name: to.Ptr("transformation1"), + BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{ + { + Type: to.Ptr(armiotoperations.FilterTypeFilter), + Description: to.Ptr("filter-datapoint"), + Inputs: []*string{ + to.Ptr("temperature.Value"), + to.Ptr("\"Tag 10\".Value"), + }, + Expression: to.Ptr("$1 > 9000 && $2 >= 8000"), + }, + }, + Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + { + Type: to.Ptr(armiotoperations.DataflowMappingTypePassThrough), + Inputs: []*string{ + to.Ptr("*"), + }, + Output: to.Ptr("*"), + }, + }, + }, + }, + { + OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + Name: to.Ptr("destination1"), + DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + DataDestination: to.Ptr("data/filtered/thermostat"), + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowClientCreateOrUpdateResponse{ + // DataflowResource: &armiotoperations.DataflowResource{ + // Properties: &armiotoperations.DataflowProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // Operations: []*armiotoperations.DataflowOperation{ + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeSource), + // Name: to.Ptr("source1"), + // SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + // EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + // DataSources: []*string{ + // to.Ptr("azure-iot-operations/data/thermostat"), + // }, + // }, + // }, + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation), + // Name: to.Ptr("transformation1"), + // BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + // Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{ + // { + // Type: to.Ptr(armiotoperations.FilterTypeFilter), + // Description: to.Ptr("filter-datapoint"), + // Inputs: []*string{ + // to.Ptr("temperature.Value"), + // to.Ptr("\"Tag 10\".Value"), + // }, + // Expression: to.Ptr("$1 > 9000 && $2 >= 8000"), + // }, + // }, + // Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + // { + // Type: to.Ptr(armiotoperations.DataflowMappingTypePassThrough), + // Inputs: []*string{ + // to.Ptr("*"), + // }, + // Output: to.Ptr("*"), + // }, + // }, + // }, + // }, + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + // Name: to.Ptr("destination1"), + // DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + // EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + // DataDestination: to.Ptr("data/filtered/thermostat"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"), + // Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"), + // Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_FilterToTopic.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_FilterToTopic.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_FilterToTopic.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_MaximumSet_Gen.go new file mode 100644 index 0000000000..66f00d3b73 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_MaximumSet_Gen.go @@ -0,0 +1,175 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json +func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.DataflowResource{ + Properties: &armiotoperations.DataflowProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + Operations: []*armiotoperations.DataflowOperation{ + { + OperationType: to.Ptr(armiotoperations.OperationTypeSource), + Name: to.Ptr("knnafvkwoeakm"), + SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + EndpointRef: to.Ptr("iixotodhvhkkfcfyrkoveslqig"), + AssetRef: to.Ptr("zayyykwmckaocywdkohmu"), + SerializationFormat: to.Ptr(armiotoperations.SourceSerializationFormatJSON), + SchemaRef: to.Ptr("pknmdzqll"), + DataSources: []*string{ + to.Ptr("chkkpymxhp"), + }, + }, + BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatDelta), + SchemaRef: to.Ptr("mcdc"), + Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{ + { + Key: to.Ptr("qsfqcgxaxnhfumrsdsokwyv"), + Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + SchemaRef: to.Ptr("n"), + Inputs: []*string{ + to.Ptr("mosffpsslifkq"), + }, + Expression: to.Ptr("aatbwomvflemsxialv"), + }, + }, + Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{ + { + Type: to.Ptr(armiotoperations.FilterTypeFilter), + Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + Inputs: []*string{ + to.Ptr("sxmjkbntgb"), + }, + Expression: to.Ptr("n"), + }, + }, + Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + { + Type: to.Ptr(armiotoperations.DataflowMappingTypeNewProperties), + Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + Inputs: []*string{ + to.Ptr("xsbxuk"), + }, + Expression: to.Ptr("txoiltogsarwkzalsphvlmt"), + Output: to.Ptr("nvgtmkfl"), + }, + }, + }, + DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + EndpointRef: to.Ptr("kybkchnzimerguekuvqlqiqdvvrt"), + DataDestination: to.Ptr("cbrh"), + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowClientCreateOrUpdateResponse{ + // DataflowResource: &armiotoperations.DataflowResource{ + // Properties: &armiotoperations.DataflowProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // Operations: []*armiotoperations.DataflowOperation{ + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeSource), + // Name: to.Ptr("knnafvkwoeakm"), + // SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + // EndpointRef: to.Ptr("iixotodhvhkkfcfyrkoveslqig"), + // AssetRef: to.Ptr("zayyykwmckaocywdkohmu"), + // SerializationFormat: to.Ptr(armiotoperations.SourceSerializationFormatJSON), + // SchemaRef: to.Ptr("pknmdzqll"), + // DataSources: []*string{ + // to.Ptr("chkkpymxhp"), + // }, + // }, + // BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + // SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatDelta), + // SchemaRef: to.Ptr("mcdc"), + // Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{ + // { + // Key: to.Ptr("qsfqcgxaxnhfumrsdsokwyv"), + // Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + // SchemaRef: to.Ptr("n"), + // Inputs: []*string{ + // to.Ptr("mosffpsslifkq"), + // }, + // Expression: to.Ptr("aatbwomvflemsxialv"), + // }, + // }, + // Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{ + // { + // Type: to.Ptr(armiotoperations.FilterTypeFilter), + // Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + // Inputs: []*string{ + // to.Ptr("sxmjkbntgb"), + // }, + // Expression: to.Ptr("n"), + // }, + // }, + // Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + // { + // Type: to.Ptr(armiotoperations.DataflowMappingTypeNewProperties), + // Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + // Inputs: []*string{ + // to.Ptr("xsbxuk"), + // }, + // Expression: to.Ptr("txoiltogsarwkzalsphvlmt"), + // Output: to.Ptr("nvgtmkfl"), + // }, + // }, + // }, + // DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + // EndpointRef: to.Ptr("kybkchnzimerguekuvqlqiqdvvrt"), + // DataDestination: to.Ptr("cbrh"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"), + // Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"), + // Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleEventGrid.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleEventGrid.go new file mode 100644 index 0000000000..338e50fad0 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleEventGrid.go @@ -0,0 +1,105 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json +func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateSimpleEventGrid() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-event-grid", armiotoperations.DataflowResource{ + Properties: &armiotoperations.DataflowProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + Operations: []*armiotoperations.DataflowOperation{ + { + OperationType: to.Ptr(armiotoperations.OperationTypeSource), + Name: to.Ptr("source1"), + SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + DataSources: []*string{ + to.Ptr("thermostats/+/telemetry/temperature/#"), + }, + }, + }, + { + OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + Name: to.Ptr("destination1"), + DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + EndpointRef: to.Ptr("event-grid-endpoint"), + DataDestination: to.Ptr("factory/telemetry"), + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowClientCreateOrUpdateResponse{ + // DataflowResource: &armiotoperations.DataflowResource{ + // Properties: &armiotoperations.DataflowProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // Operations: []*armiotoperations.DataflowOperation{ + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeSource), + // Name: to.Ptr("source1"), + // SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + // EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + // DataSources: []*string{ + // to.Ptr("thermostats/+/telemetry/temperature/#"), + // }, + // }, + // }, + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + // Name: to.Ptr("destination1"), + // DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + // EndpointRef: to.Ptr("event-grid-endpoint"), + // DataDestination: to.Ptr("factory/telemetry"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"), + // Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"), + // Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleEventGrid.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleEventGrid.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleEventGrid.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleFabric.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleFabric.go new file mode 100644 index 0000000000..d99ae6063b --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleFabric.go @@ -0,0 +1,119 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_SimpleFabric.json +func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateSimpleFabric() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-fabric", armiotoperations.DataflowResource{ + Properties: &armiotoperations.DataflowProperties{ + Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + Operations: []*armiotoperations.DataflowOperation{ + { + OperationType: to.Ptr(armiotoperations.OperationTypeSource), + Name: to.Ptr("source1"), + SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + DataSources: []*string{ + to.Ptr("azure-iot-operations/data/thermostat"), + }, + }, + }, + { + OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation), + BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatParquet), + SchemaRef: to.Ptr("aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0"), + }, + }, + { + OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + Name: to.Ptr("destination1"), + DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + EndpointRef: to.Ptr("fabric-endpoint"), + DataDestination: to.Ptr("telemetryTable"), + }, + }, + }, + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowClientCreateOrUpdateResponse{ + // DataflowResource: &armiotoperations.DataflowResource{ + // Properties: &armiotoperations.DataflowProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // Operations: []*armiotoperations.DataflowOperation{ + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeSource), + // Name: to.Ptr("source1"), + // SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + // EndpointRef: to.Ptr("aio-builtin-broker-endpoint"), + // DataSources: []*string{ + // to.Ptr("azure-iot-operations/data/thermostat"), + // }, + // }, + // }, + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation), + // BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + // SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatParquet), + // SchemaRef: to.Ptr("aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0"), + // }, + // }, + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeDestination), + // Name: to.Ptr("destination1"), + // DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + // EndpointRef: to.Ptr("fabric-endpoint"), + // DataDestination: to.Ptr("telemetryTable"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"), + // Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"), + // Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleFabric.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleFabric.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_CreateOrUpdate_SimpleFabric.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Delete_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Delete_MaximumSet_Gen.go new file mode 100644 index 0000000000..ad561129b5 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Delete_MaximumSet_Gen.go @@ -0,0 +1,30 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json +func ExampleDataflowClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewDataflowClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Delete_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Delete_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Get_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Get_MaximumSet_Gen.go new file mode 100644 index 0000000000..356064a3fa --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Get_MaximumSet_Gen.go @@ -0,0 +1,107 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json +func ExampleDataflowClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewDataflowClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.DataflowClientGetResponse{ + // DataflowResource: &armiotoperations.DataflowResource{ + // Properties: &armiotoperations.DataflowProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // Operations: []*armiotoperations.DataflowOperation{ + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeSource), + // Name: to.Ptr("knnafvkwoeakm"), + // SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + // EndpointRef: to.Ptr("iixotodhvhkkfcfyrkoveslqig"), + // AssetRef: to.Ptr("zayyykwmckaocywdkohmu"), + // SerializationFormat: to.Ptr(armiotoperations.SourceSerializationFormatJSON), + // SchemaRef: to.Ptr("pknmdzqll"), + // DataSources: []*string{ + // to.Ptr("chkkpymxhp"), + // }, + // }, + // BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + // SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatDelta), + // SchemaRef: to.Ptr("mcdc"), + // Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{ + // { + // Key: to.Ptr("qsfqcgxaxnhfumrsdsokwyv"), + // Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + // SchemaRef: to.Ptr("n"), + // Inputs: []*string{ + // to.Ptr("mosffpsslifkq"), + // }, + // Expression: to.Ptr("aatbwomvflemsxialv"), + // }, + // }, + // Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{ + // { + // Type: to.Ptr(armiotoperations.FilterTypeFilter), + // Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + // Inputs: []*string{ + // to.Ptr("sxmjkbntgb"), + // }, + // Expression: to.Ptr("n"), + // }, + // }, + // Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + // { + // Type: to.Ptr(armiotoperations.DataflowMappingTypeNewProperties), + // Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + // Inputs: []*string{ + // to.Ptr("xsbxuk"), + // }, + // Expression: to.Ptr("txoiltogsarwkzalsphvlmt"), + // Output: to.Ptr("nvgtmkfl"), + // }, + // }, + // }, + // DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + // EndpointRef: to.Ptr("kybkchnzimerguekuvqlqiqdvvrt"), + // DataDestination: to.Ptr("cbrh"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"), + // Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"), + // Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Get_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_Get_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_ListByProfileResource_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_ListByProfileResource_MaximumSet_Gen.go new file mode 100644 index 0000000000..57a7aab107 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_ListByProfileResource_MaximumSet_Gen.go @@ -0,0 +1,117 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json +func ExampleDataflowClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewDataflowClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", "resource-name123", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.DataflowClientListByResourceGroupResponse{ + // DataflowResourceListResult: armiotoperations.DataflowResourceListResult{ + // Value: []*armiotoperations.DataflowResource{ + // { + // Properties: &armiotoperations.DataflowProperties{ + // Mode: to.Ptr(armiotoperations.OperationalModeEnabled), + // Operations: []*armiotoperations.DataflowOperation{ + // { + // OperationType: to.Ptr(armiotoperations.OperationTypeSource), + // Name: to.Ptr("knnafvkwoeakm"), + // SourceSettings: &armiotoperations.DataflowSourceOperationSettings{ + // EndpointRef: to.Ptr("iixotodhvhkkfcfyrkoveslqig"), + // AssetRef: to.Ptr("zayyykwmckaocywdkohmu"), + // SerializationFormat: to.Ptr(armiotoperations.SourceSerializationFormatJSON), + // SchemaRef: to.Ptr("pknmdzqll"), + // DataSources: []*string{ + // to.Ptr("chkkpymxhp"), + // }, + // }, + // BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{ + // SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatDelta), + // SchemaRef: to.Ptr("mcdc"), + // Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{ + // { + // Key: to.Ptr("qsfqcgxaxnhfumrsdsokwyv"), + // Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + // SchemaRef: to.Ptr("n"), + // Inputs: []*string{ + // to.Ptr("mosffpsslifkq"), + // }, + // Expression: to.Ptr("aatbwomvflemsxialv"), + // }, + // }, + // Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{ + // { + // Type: to.Ptr(armiotoperations.FilterTypeFilter), + // Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + // Inputs: []*string{ + // to.Ptr("sxmjkbntgb"), + // }, + // Expression: to.Ptr("n"), + // }, + // }, + // Map: []*armiotoperations.DataflowBuiltInTransformationMap{ + // { + // Type: to.Ptr(armiotoperations.DataflowMappingTypeNewProperties), + // Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."), + // Inputs: []*string{ + // to.Ptr("xsbxuk"), + // }, + // Expression: to.Ptr("txoiltogsarwkzalsphvlmt"), + // Output: to.Ptr("nvgtmkfl"), + // }, + // }, + // }, + // DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{ + // EndpointRef: to.Ptr("kybkchnzimerguekuvqlqiqdvvrt"), + // DataDestination: to.Ptr("cbrh"), + // }, + // }, + // }, + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123"), + // Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"), + // Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_ListByProfileResource_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_ListByProfileResource_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Dataflow_ListByProfileResource_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_CreateOrUpdate_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_CreateOrUpdate_MaximumSet_Gen.go new file mode 100644 index 0000000000..0866237682 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_CreateOrUpdate_MaximumSet_Gen.go @@ -0,0 +1,88 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json +func ExampleInstanceClient_BeginCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewInstanceClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "aio-instance", armiotoperations.InstanceResource{ + Properties: &armiotoperations.InstanceProperties{ + SchemaRegistryRef: &armiotoperations.SchemaRegistryRef{ + ResourceID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123"), + }, + Description: to.Ptr("kpqtgocs"), + }, + ExtendedLocation: &armiotoperations.ExtendedLocation{ + Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + }, + Identity: &armiotoperations.ManagedServiceIdentity{ + Type: to.Ptr(armiotoperations.ManagedServiceIdentityTypeNone), + UserAssignedIdentities: map[string]*armiotoperations.UserAssignedIdentity{}, + }, + Tags: map[string]*string{}, + Location: to.Ptr("xvewadyhycrjpu"), + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.InstanceClientCreateOrUpdateResponse{ + // InstanceResource: &armiotoperations.InstanceResource{ + // Properties: &armiotoperations.InstanceProperties{ + // SchemaRegistryRef: &armiotoperations.SchemaRegistryRef{ + // ResourceID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123"), + // }, + // Description: to.Ptr("kpqtgocs"), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // Version: to.Ptr("vjjbmunthiphfmekvxgxcxkzdwjti"), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // Identity: &armiotoperations.ManagedServiceIdentity{ + // Type: to.Ptr(armiotoperations.ManagedServiceIdentityTypeNone), + // UserAssignedIdentities: map[string]*armiotoperations.UserAssignedIdentity{ + // }, + // PrincipalID: to.Ptr("4a6e4195-75b8-4685-aa0c-0b5704779327"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // Tags: map[string]*string{ + // }, + // Location: to.Ptr("xvewadyhycrjpu"), + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123"), + // Name: to.Ptr("llptmlifnqqwairx"), + // Type: to.Ptr("qwrfzxjfxvismlqvigot"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_CreateOrUpdate_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Delete_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Delete_MaximumSet_Gen.go new file mode 100644 index 0000000000..0f9a48833f --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Delete_MaximumSet_Gen.go @@ -0,0 +1,30 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Instance_Delete_MaximumSet_Gen.json +func ExampleInstanceClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewInstanceClient().BeginDelete(ctx, "rgiotoperations", "aio-instance", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Delete_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Delete_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Get_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Get_MaximumSet_Gen.go new file mode 100644 index 0000000000..a1a181ffca --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Get_MaximumSet_Gen.go @@ -0,0 +1,66 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Instance_Get_MaximumSet_Gen.json +func ExampleInstanceClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewInstanceClient().Get(ctx, "rgiotoperations", "aio-instance", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.InstanceClientGetResponse{ + // InstanceResource: &armiotoperations.InstanceResource{ + // Properties: &armiotoperations.InstanceProperties{ + // SchemaRegistryRef: &armiotoperations.SchemaRegistryRef{ + // ResourceID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123"), + // }, + // Description: to.Ptr("rlfvvnnhcypp"), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // Version: to.Ptr("vjjbmunthiphfmekvxgxcxkzdwjti"), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // Identity: &armiotoperations.ManagedServiceIdentity{ + // Type: to.Ptr(armiotoperations.ManagedServiceIdentityTypeNone), + // UserAssignedIdentities: map[string]*armiotoperations.UserAssignedIdentity{ + // }, + // PrincipalID: to.Ptr("4a6e4195-75b8-4685-aa0c-0b5704779327"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // Tags: map[string]*string{ + // }, + // Location: to.Ptr("xvewadyhycrjpu"), + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123"), + // Name: to.Ptr("llptmlifnqqwairx"), + // Type: to.Ptr("qwrfzxjfxvismlqvigot"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Get_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Get_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListByResourceGroup_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListByResourceGroup_MaximumSet_Gen.go new file mode 100644 index 0000000000..578063896e --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListByResourceGroup_MaximumSet_Gen.go @@ -0,0 +1,76 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json +func ExampleInstanceClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewInstanceClient().NewListByResourceGroupPager("rgiotoperations", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.InstanceClientListByResourceGroupResponse{ + // InstanceResourceListResult: armiotoperations.InstanceResourceListResult{ + // Value: []*armiotoperations.InstanceResource{ + // { + // Properties: &armiotoperations.InstanceProperties{ + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // Version: to.Ptr("vjjbmunthiphfmekvxgxcxkzdwjti"), + // SchemaRegistryRef: &armiotoperations.SchemaRegistryRef{ + // ResourceID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123"), + // }, + // Description: to.Ptr("vmujggxdvxk"), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // Identity: &armiotoperations.ManagedServiceIdentity{ + // PrincipalID: to.Ptr("4a6e4195-75b8-4685-aa0c-0b5704779327"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // Type: to.Ptr(armiotoperations.ManagedServiceIdentityTypeNone), + // UserAssignedIdentities: map[string]*armiotoperations.UserAssignedIdentity{ + // }, + // }, + // Tags: map[string]*string{ + // }, + // Location: to.Ptr("xvewadyhycrjpu"), + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123"), + // Name: to.Ptr("llptmlifnqqwairx"), + // Type: to.Ptr("qwrfzxjfxvismlqvigot"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListByResourceGroup_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListBySubscription_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListBySubscription_MaximumSet_Gen.go new file mode 100644 index 0000000000..e25a037a60 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListBySubscription_MaximumSet_Gen.go @@ -0,0 +1,76 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json +func ExampleInstanceClient_NewListBySubscriptionPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewInstanceClient().NewListBySubscriptionPager(nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.InstanceClientListBySubscriptionResponse{ + // InstanceResourceListResult: armiotoperations.InstanceResourceListResult{ + // Value: []*armiotoperations.InstanceResource{ + // { + // Properties: &armiotoperations.InstanceProperties{ + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // Version: to.Ptr("vjjbmunthiphfmekvxgxcxkzdwjti"), + // SchemaRegistryRef: &armiotoperations.SchemaRegistryRef{ + // ResourceID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123"), + // }, + // Description: to.Ptr("empgqmbhvklcqlyahmdsjemlep"), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // Identity: &armiotoperations.ManagedServiceIdentity{ + // PrincipalID: to.Ptr("4a6e4195-75b8-4685-aa0c-0b5704779327"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // Type: to.Ptr(armiotoperations.ManagedServiceIdentityTypeNone), + // UserAssignedIdentities: map[string]*armiotoperations.UserAssignedIdentity{ + // }, + // }, + // Tags: map[string]*string{ + // }, + // Location: to.Ptr("xvewadyhycrjpu"), + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123"), + // Name: to.Ptr("llptmlifnqqwairx"), + // Type: to.Ptr("qwrfzxjfxvismlqvigot"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListBySubscription_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListBySubscription_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_ListBySubscription_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Update_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Update_MaximumSet_Gen.go new file mode 100644 index 0000000000..c9c17f0a0f --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Update_MaximumSet_Gen.go @@ -0,0 +1,73 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Instance_Update_MaximumSet_Gen.json +func ExampleInstanceClient_Update() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewInstanceClient().Update(ctx, "rgiotoperations", "aio-instance", armiotoperations.InstancePatchModel{ + Tags: map[string]*string{}, + Identity: &armiotoperations.ManagedServiceIdentity{ + Type: to.Ptr(armiotoperations.ManagedServiceIdentityTypeNone), + UserAssignedIdentities: map[string]*armiotoperations.UserAssignedIdentity{}, + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armiotoperations.InstanceClientUpdateResponse{ + // InstanceResource: &armiotoperations.InstanceResource{ + // Properties: &armiotoperations.InstanceProperties{ + // SchemaRegistryRef: &armiotoperations.SchemaRegistryRef{ + // ResourceID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123"), + // }, + // Description: to.Ptr("wwihkapmgjbyrtyaj"), + // ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded), + // Version: to.Ptr("vjjbmunthiphfmekvxgxcxkzdwjti"), + // }, + // ExtendedLocation: &armiotoperations.ExtendedLocation{ + // Name: to.Ptr("qmbrfwcpwwhggszhrdjv"), + // Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation), + // }, + // Identity: &armiotoperations.ManagedServiceIdentity{ + // Type: to.Ptr(armiotoperations.ManagedServiceIdentityTypeNone), + // UserAssignedIdentities: map[string]*armiotoperations.UserAssignedIdentity{ + // }, + // PrincipalID: to.Ptr("4a6e4195-75b8-4685-aa0c-0b5704779327"), + // TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"), + // }, + // Tags: map[string]*string{ + // }, + // Location: to.Ptr("xvewadyhycrjpu"), + // ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123"), + // Name: to.Ptr("llptmlifnqqwairx"), + // Type: to.Ptr("qwrfzxjfxvismlqvigot"), + // SystemData: &armiotoperations.SystemData{ + // CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"), + // CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // LastModifiedBy: to.Ptr("gnicpuszwd"), + // LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()), + // }, + // }, + // } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Update_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Update_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Instance_Update_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Operations_List_MaximumSet_Gen.go b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Operations_List_MaximumSet_Gen.go new file mode 100644 index 0000000000..a3ffe4e117 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Operations_List_MaximumSet_Gen.go @@ -0,0 +1,53 @@ +package armiotoperations_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations" +) + +// Generated from example definition: 2024-11-01/Operations_List_MaximumSet_Gen.json +func ExampleOperationsClient_NewListPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotoperations.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewOperationsClient().NewListPager(nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotoperations.OperationsClientListResponse{ + // OperationListResult: armiotoperations.OperationListResult{ + // Value: []*armiotoperations.Operation{ + // { + // Name: to.Ptr("xzxqfusky"), + // IsDataAction: to.Ptr(true), + // Display: &armiotoperations.OperationDisplay{ + // Provider: to.Ptr("lrveskajtuwf"), + // Resource: to.Ptr("d"), + // Operation: to.Ptr("icuckgobartrrgmirax"), + // Description: to.Ptr("dsbfnxzvnoqdm"), + // }, + // Origin: to.Ptr(armiotoperations.OriginUser), + // ActionType: to.Ptr(armiotoperations.ActionTypeInternal), + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} diff --git a/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Operations_List_MaximumSet_Gen.json b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Operations_List_MaximumSet_Gen.json new file mode 100644 index 0000000000..83c6938a17 --- /dev/null +++ b/specification/iotoperations/resource-manager/Microsoft.IoTOperations/stable/2024-11-01/examples-go/Operations_List_MaximumSet_Gen.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"} \ No newline at end of file