Пример #1
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListLogAnalyticsEntitiesRequest request;

            try
            {
                request = new ListLogAnalyticsEntitiesRequest
                {
                    NamespaceName            = NamespaceName,
                    CompartmentId            = CompartmentId,
                    Name                     = Name,
                    NameContains             = NameContains,
                    EntityTypeName           = EntityTypeName,
                    CloudResourceId          = CloudResourceId,
                    LifecycleState           = LifecycleState,
                    LifecycleDetailsContains = LifecycleDetailsContains,
                    IsManagementAgentIdNull  = IsManagementAgentIdNull,
                    Hostname                 = Hostname,
                    HostnameContains         = HostnameContains,
                    SourceId                 = SourceId,
                    CreationSourceType       = CreationSourceType,
                    CreationSourceDetails    = CreationSourceDetails,
                    Limit                    = Limit,
                    Page                     = Page,
                    SortOrder                = SortOrder,
                    SortBy                   = SortBy,
                    OpcRequestId             = OpcRequestId
                };
                IEnumerable <ListLogAnalyticsEntitiesResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.LogAnalyticsEntityCollection, 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);
            }
        }
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListLogAnalyticsEntitiesRequest request;

            try
            {
                request = new ListLogAnalyticsEntitiesRequest
                {
                    NamespaceName            = NamespaceName,
                    CompartmentId            = CompartmentId,
                    Name                     = Name,
                    NameContains             = NameContains,
                    EntityTypeName           = EntityTypeName,
                    CloudResourceId          = CloudResourceId,
                    LifecycleState           = LifecycleState,
                    LifecycleDetailsContains = LifecycleDetailsContains,
                    IsManagementAgentIdNull  = IsManagementAgentIdNull,
                    Hostname                 = Hostname,
                    HostnameContains         = HostnameContains,
                    SourceId                 = SourceId,
                    Limit                    = Limit,
                    Page                     = Page,
                    SortOrder                = SortOrder,
                    SortBy                   = SortBy,
                    OpcRequestId             = OpcRequestId
                };
                IEnumerable <ListLogAnalyticsEntitiesResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.LogAnalyticsEntityCollection, true);
                }
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }