protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListEntitySourceAssociationsRequest request;

            try
            {
                request = new ListEntitySourceAssociationsRequest
                {
                    NamespaceName         = NamespaceName,
                    CompartmentId         = CompartmentId,
                    EntityId              = EntityId,
                    EntityType            = EntityType,
                    EntityTypeDisplayName = EntityTypeDisplayName,
                    LifeCycleState        = LifeCycleState,
                    IsShowTotal           = IsShowTotal,
                    Limit        = Limit,
                    Page         = Page,
                    SortOrder    = SortOrder,
                    SortBy       = SortBy,
                    OpcRequestId = OpcRequestId
                };
                IEnumerable <ListEntitySourceAssociationsResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.LogAnalyticsAssociationCollection, true);
                }
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
Ejemplo n.º 2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListEntitySourceAssociationsRequest request;

            try
            {
                request = new ListEntitySourceAssociationsRequest
                {
                    NamespaceName         = NamespaceName,
                    CompartmentId         = CompartmentId,
                    EntityId              = EntityId,
                    EntityType            = EntityType,
                    EntityTypeDisplayName = EntityTypeDisplayName,
                    LifeCycleState        = LifeCycleState,
                    IsShowTotal           = IsShowTotal,
                    Limit        = Limit,
                    Page         = Page,
                    SortOrder    = SortOrder,
                    SortBy       = SortBy,
                    OpcRequestId = OpcRequestId
                };
                IEnumerable <ListEntitySourceAssociationsResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.LogAnalyticsAssociationCollection, true);
                }
                if (!ParameterSetName.Equals(AllPageSet) && !ParameterSetName.Equals(LimitSet) && response.OpcNextPage != null)
                {
                    WriteWarning("This operation supports pagination and not all resources were returned. Re-run using the -All option to auto paginate and list all resources.");
                }
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }